只需使用带有自定义build.xml文件的ant生成器
使用蚂蚁的命令是。
点击命令后,通过终端转到build.xml文件的位置。
$ant yourTargetName
在build.xml文件中声明目标名称的位置。
<?xml version="1.0"?>
<project name="Project Name" default="default" basedir=".">
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="lib/appbundler-1.0.jar" />
<target name="bundle-Target Name">
<bundleapp outputdirectory="."
name="Your Project Name"
displayname="yourProjectDisplayName"
identifier="yourMainClassName"
shortversion="1.0"
applicationCategory="public.app-category.developer-tools"
mainclassname="yourMainClassName">
<classpath file="/yourJarFileLocation"/>
<option value="-Dapple.laf.useScreenMenuBar=true"/>
</bundleapp>
</target>
</project>
要包装此.app文件。
点击终端上的命令。
$productbuild --component filename.pkg /your app file location