Has anyone written a MacOS .app target ?
Right now I usually use an empty Foo.app tree; with the Contents/MacOS
default runner; and then simply change the Info.plist to point to the
right jar(s) and class after copying them into Contents/Resources/Java.
But this means a lot of replication of Resources, Java strings and
Manifest info in other places.
I.e. it is now done along the lines of
<target name="dist-osx" depends="compile">
<mkdir dir="bin/Foo.app"/>
<copy todir="bin/Foo.app/">
<fileset dir="resources/Empty.app">
</fileset>
</copy>
<chmod file="bin/Foo.app/Contents/MacOS/Empty" perm="a+rx"/>
<copy todir="bin/Foo.app/Contents/Resources">
<fileset dir="resources">
<include name="*.icns"/>
</fileset>
</copy>
<copy file="resources/Info.plist"
tofile="bin/Foo.app/Contents/Info.plist"/>
<jar jarfile="bin/Foo.app/Contents/Resources/Java/Foo.jar"
<fileset dir="build"/>
</jar>
</target>
and then an Info.plist which is generated:
... usual CF Bundle stuff...
<key>CFBundleVersion</key>
<string>$VERSION (c) $YEAR $PROJECT</string>
<key>CFBundleGetInfoString</key>
<string>$PROJECT</string>
<key>CFBundleShortVersionString</key>
<string>$VERSION</string>
<key>CFBundleName</key>
<string>$NAME $PROJECT</string>
<key>Java</key>
<dict>
<key>ClassPath</key>
<array>
<string>$JAVAROOT/Foo.jar</string>
</array>
<key>MainClass</key>
<string>Foo.startup.FooStartup</string>
<key>Properties</key>
<dict>
<key>com.apple.macos.useScreenMenuBar</key>
<string>false</string>
</dict>
But this relies on a fair number of files and an empty .app template.
I was wondering if anyone with more mac/java experience had gone to the
trouble of making an ant target which fundamentally understands this; and
creates the right files on the fly; and using data from the Manifest
ideally. (So that a double click on the Jar gives the same results).
Any pointers ?
Thanks !
Dw
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>