New bundler in 8u20 question...

Danno Ferrin danno.ferrin at oracle.com
Sun Jun 15 14:55:51 UTC 2014


Now that ramp down phase 2 is upon us I was going to post a blog post about it this week, but looks like there are some burning questions...
On Jun 14, 2014, at 8:52 PM, Tony Anecito <adanecito at yahoo.com> wrote:

> Hi All,
>  
> The new bundler in 8u20 seems to create a .pkg file.

It can create two pkg files.  One is the normal PKG wizard installer, like you see when you install Java.  The other pkg installer crease a Mac App Store Ready pkg that ban be uploaded via iTunes connect.  The problem is right now they will have the same name and overwrite each other, so later today I’ll submit a patch to make the packages default file name to be <AppName>-<version>.pkg and <AppName>-<version>-MAS.pkg where the -MAS variant is for Mac App Store, this will show up in next weeks build.

> I am wondering if that is also codesigned via apple codesign command and if so how does it find the entitlements file?

If you have your Apple keys downloaded in the typical place the signing will be automatic.  This also extends to Gatekeeper signing.  The bundle arguments to set are…

For gatekeeper you can set one or both of these
mac.signing-key-developer-id-app - for .app files for gatekeeper
mac.signing-key-developer-id-installer - for .pkg files for gatekeeper

For mac app store you can set two arguments 
mac.signing-key-app - for the MAS .app file
mac.signing-key-pkg - for the MAS .pkg file

The defaults are "Developer ID Application: “, "Developer ID Installer: “, "3rd Party Mac Developer Application: “, and "3rd Party Mac Developer Installer: “ respectively (as of next weeks build).  So if you have your keys in the typical place the signing is automatic.  If you have multiple keys following the default names you can set "mac.signing-key-user-name” to append a user name after each of the defaults, or manually set all of them.

As for entitlements, set a bundle parameter 'mac.app-store-entitlements’ to the location of your entitlements file.  This is relative to the local file system of the build tool.  By default the bundler adds a sandbox entitlement with no other grants.  So if you do anything special (such as access a web service) you will need to provide a file.

> So is the goal of the new bundler to replace ALL the manual steps Danno mentioned previously for it to be ready for the Apple iTunes store?
>  

That’s the goal.  In fact, the manual steps are basically the steps the MacAppStoreBundler goes through, that’s how I proved they work.

I mentioned bundler arguments. These are new in the 8u20 bundler.  To set them you can use the -B flag in the CLI or the <fx:bundleArgument /> int he ant build.  I’m working on the Gradle and Maven plugins but won’t be releasing those for a month or so, but most of the code is in the relevant bitbucket/github reps.

For example, you would want to set at least…

fxpackager -native mac.appStore -Bmac.app-store-entitlements=src/deploy/package/MyEntitlements.entitlements (… rest of arguments…)

or

<fx:deploy nativeBundles=“mac.appStore” …rest of attributes …>
  <!-- other XML elements -->
  <fx:bundleArgument arg="mac.app-store-entitlements” value="src/deploy/package/MyEntitlements.entitlements”/>
</fx:deploy>

But you may want to set the other signing key arguments as well.



More information about the openjfx-dev mailing list