I have built a Java/Swing Application and I have successfully deployed it using Ant, to Windows (using launch4j) and for Mac (using jarbundler ant task). However I want to use Ant to zip the .app along with other files, but since an .app is just a special folder, I am having some problems. Here is my Ant target:
<property name="jarbundler.dir" location="lib/jarbundler" />
<taskdef name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler"
classpath="${jarbundler.dir}/jarbundler-2.2.0.jar"/>
<target name="app">
<jarbundler dir="release" name="MobilityCollector" mainclass="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader" jar="mc.jar" icon="img/icon.icns"/>
<zip destfile="release/MobilityCollector_MacOSX.zip">
<zipfileset dir="img" prefix="img/"/>
<zipfileset dir="release/MobilityCollector.app" prefix="MobilityCollector.app"/>
</zip>
</target>
Here is the problem:
<zip destfile="release/MobilityCollector_MacOSX.zip">
<zipfileset dir="img" prefix="img/"/>
<zipfileset dir="release/MobilityCollector.app" prefix="MobilityCollector.app"/>
</zip>
The problem is that when I run the app (after zippig and unzipping it) it stays bouncing in the dock for ever, and if I click it, it shuts down immediately. I thought that maybe it is a permissions problem, but the permissions are the same as the original app (before zipping) .
Since a .app is a special folder, do I have to zip it in another way? I tryied zipping the way that FailedDev suggested, but it happens anyway.