* added an ant target for building an osx app bundle
This commit is contained in:
parent
c09ad32c06
commit
8c95bf25d5
65
build.xml
65
build.xml
|
@ -13,6 +13,11 @@
|
|||
<property name="dir.build" location="${basedir}/build" />
|
||||
<property name="dir.dist" location="${basedir}/dist" />
|
||||
<property name="dir.lib" location="${basedir}/lib" />
|
||||
<property name="dir.installer" location="${basedir}/installer" />
|
||||
|
||||
<property name="path.fatjar" location="${dir.dist}/${title}_${version}.jar" />
|
||||
<property name="path.appbundle.zip" location="${dir.dist}/${title}_${version}.app.zip" />
|
||||
<property name="path.source.zip" location="${dir.dist}/filebot-${version}-src.zip" />
|
||||
|
||||
|
||||
<target name="jar" depends="build">
|
||||
|
@ -29,19 +34,16 @@
|
|||
<fileset dir="${dir.build}" includes="**/*Test*" />
|
||||
</jar>
|
||||
|
||||
<!-- source zip -->
|
||||
<zip destfile="${dir.dist}/filebot-${version}-src.zip">
|
||||
<!-- source as zip -->
|
||||
<zip destfile="${path.source.zip}">
|
||||
<fileset dir="source" />
|
||||
<fileset dir="test" />
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="fatjar" depends="jar">
|
||||
<!-- create dist/fatjar dir -->
|
||||
<mkdir dir="${dir.dist}/fatjar" />
|
||||
|
||||
<jar destfile="${dir.dist}/fatjar/FileBot_${version}.jar" filesetmanifest="merge" duplicate="fail">
|
||||
<target name="fatjar" depends="jar" description="Merge all class files into a single executable jar file">
|
||||
<jar destfile="${path.fatjar}" filesetmanifest="merge" duplicate="fail">
|
||||
<manifest>
|
||||
<attribute name="Built-By" value="${user.name}" />
|
||||
<attribute name="Built-Date" value="${today}" />
|
||||
|
@ -119,10 +121,32 @@
|
|||
</target>
|
||||
|
||||
|
||||
<target name="webstart" depends="jar">
|
||||
<target name="appbundle" depends="fatjar" description="Build an OSX application bundle">
|
||||
<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler" />
|
||||
|
||||
<!-- build app bundle folder and add native libs -->
|
||||
<jarbundler dir="${dir.dist}" name="${title}" version="${version}" icon="${dir.installer}/appbundle/icon.icns" bundleid="net.sourceforge.filebot" jar="${path.fatjar}" stubfile="${dir.installer}/appbundle/JavaApplicationStub" workingdirectory="$APP_PACKAGE/Contents/Resources/Java" mainclass="net.sourceforge.filebot.Main" jvmversion="1.6+" vmoptions="-Xmx256m" />
|
||||
<copy todir="${dir.dist}/${title}.app/Contents/Resources/Java">
|
||||
<fileset dir="${dir.lib}/native/mac-x86_64" includes="*.dylib" />
|
||||
</copy>
|
||||
|
||||
<!-- application bundle folder as zip -->
|
||||
<zip destfile="${path.appbundle.zip}">
|
||||
<fileset dir="${dir.dist}" includes="${title}.app/**" />
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="webstart" depends="jar" description="Build and compress jars used for webstart deployment">
|
||||
<!-- create dirs -->
|
||||
<mkdir dir="${dir.dist}/webstart" />
|
||||
|
||||
<!-- copy jnlp descriptors and icons -->
|
||||
<copy todir="${dir.dist}/webstart">
|
||||
<fileset dir="${dir.installer}/webstart" />
|
||||
<fileset dir="${dir.installer}/icons" />
|
||||
</copy>
|
||||
|
||||
<!-- copy jars -->
|
||||
<copy todir="${dir.dist}/webstart">
|
||||
<fileset dir="${dir.dist}" includes="filebot.jar" />
|
||||
|
@ -242,7 +266,7 @@
|
|||
<target name="test-fatjar" depends="fatjar">
|
||||
<junit printsummary="yes" fork="true">
|
||||
<classpath>
|
||||
<pathelement location="${dir.dist}/fatjar/FileBot_${version}.jar" />
|
||||
<pathelement location="${path.fatjar}" />
|
||||
<pathelement location="${dir.dist}/filebot-test.jar" />
|
||||
<pathelement location="${dir.lib}/junit.jar" />
|
||||
</classpath>
|
||||
|
@ -255,7 +279,7 @@
|
|||
|
||||
|
||||
<target name="run-fatjar" depends="fatjar">
|
||||
<java jar="${dir.dist}/fatjar/FileBot_${version}.jar" fork="true" />
|
||||
<java jar="${path.fatjar}" fork="true" />
|
||||
</target>
|
||||
|
||||
<target name="deploy">
|
||||
|
@ -266,23 +290,28 @@
|
|||
<mkdir dir="${dir.dist}/release" />
|
||||
|
||||
<!-- copy fatjar and source -->
|
||||
<copy todir="${dir.dist}/release/FileBot_${version}">
|
||||
<fileset dir="${dir.dist}" includes="*-src.zip" />
|
||||
<fileset dir="${dir.dist}/fatjar" includes="*.jar" />
|
||||
</copy>
|
||||
<copy todir="${dir.dist}/release/${title}_${version}" file="${path.fatjar}" />
|
||||
<copy todir="${dir.dist}/release/${title}_${version}" file="${path.appbundle.zip}" />
|
||||
<copy todir="${dir.dist}/release/${title}_${version}" file="${path.source.zip}" />
|
||||
|
||||
<!-- deploy source zip first-->
|
||||
<!-- deploy source zip first so it will be the oldest file in the release folder -->
|
||||
<scp todir="rednoah,filebot:${sf.password}@web.sourceforge.net:/home/frs/project/f/fi/filebot/filebot" trust="yes">
|
||||
<fileset dir="${dir.dist}/release" includes="**/*-src.zip" />
|
||||
</scp>
|
||||
|
||||
<!-- deploy fatjar afterwards so it will be the latest file release -->
|
||||
<sleep minutes="1" />
|
||||
<!-- deploy fatjar -->
|
||||
<sleep seconds="20" />
|
||||
<scp todir="rednoah,filebot:${sf.password}@web.sourceforge.net:/home/frs/project/f/fi/filebot/filebot" trust="yes">
|
||||
<fileset dir="${dir.dist}/release" includes="**/*.jar" />
|
||||
</scp>
|
||||
|
||||
<!-- deploy webstart jars -->
|
||||
<!-- deploy osx app bundle -->
|
||||
<sleep seconds="20" />
|
||||
<scp todir="rednoah,filebot:${sf.password}@web.sourceforge.net:/home/frs/project/f/fi/filebot/filebot" trust="yes">
|
||||
<fileset dir="${dir.dist}/release" includes="**/*.app.zip" />
|
||||
</scp>
|
||||
|
||||
<!-- deploy webstart jars and jnlp descriptors -->
|
||||
<scp todir="rednoah,filebot:${sf.password}@web.sourceforge.net:htdocs/webstart" trust="yes">
|
||||
<fileset dir="${dir.dist}/webstart" />
|
||||
</scp>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue