Where is the implementation of <plistentry> option support in ant AppBundler task?
Closed this issue · 3 comments
Hi, repo maintainer, as the README.md
revealed:
Allows writing arbitrary key-value pairs to Info.plist via plistentry
I can't find the implementation of plistentry
support.
Which I want to add a default JVM option into ant bundleapp
task, the doc doesn't say anthing about default option support over ant task.
I'm newbie to ant, please help. ;)
Hello! I'm not sure about plistentry as I haven't used that in a long time, if at all, but I'd be surprised if it wasn't possible. However if you'd just like to set JVM options you can do so with the following within the bundleapp part of your ant build.xml file:
<option value="-Dapple.laf.useScreenMenuBar=true"/>
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>
However if you'd just like to set JVM options you can do so with the following within the bundleapp part of your ant build.xml file:
Yay, but that's the JVM options, I want the default JVM options, which described in
https://github.com/TheInfiniteKind/appbundler/blob/master/appbundler/native/main.m#L336-L360
The README doesn't say about that, I assume last resort is to use PlistBuddy
to add them into Info.plist
manually:
<key>JVMDefaultOptions</key>
<dict>
<!-- ... -->
</dict>
P.S. As the appbundler/native/main.m
coded, it uses a dictionary in defaults
, yet the key
isn't useful, you can refine to use an array instead..
see: https://github.com/TheInfiniteKind/appbundler/blob/master/appbundler/native/main.m#L351-L359
FYI, I added an empty dictionary manually via PlistBuddy
:
<exec executable="/usr/libexec/PlistBuddy">
<arg value="-c"/>
<arg value="Add :JVMDefaultOptions dict"/>
<arg value="${dist}/${bundle.name}.app/Contents/Info.plist"/>
</exec>
Output entry in Info.plist
:
<key>JVMDefaultOptions</key>
<dict/>