Jpackage and MacOs with gatekeeper
George Motes
georgemotes at gmail.com
Mon May 20 16:21:41 UTC 2019
I have created a dmg file with jpackage on MacOS High Sierra version using jpackage.
I would like to sign the dmg file but the signing parts do not seem work with this version of the OS.
There seem to be several problems.
1. The program is hardcoded to look for an application certificate and does not support an installer certificate.
2. The login cert file is in db format and jpackage cannot find the specified cert.
I am no expert on Mac so I could be doing something wrong, it would be great if you could provide a working example of signing a dmg file.
If you need any more info let me know.
Here is my package script:
/Users/steve/jdk-13.jdk/Contents/Home/bin/jpackage create-installer --verbose --vendor "My Company,Inc." --icon /Users/steve/Java-Dev4/Icon/dta.icns --description "My Company Desktop Application" --installer-type dmg --input /Users/steve/Java-Dev4/MY_Desktop/dist/ --output DTA --name MY_Desktop --main-jar MY_Desktop.jar --mac-bundle-identifier MY-Desktop --mac-bundle-name MY-Desktop --mac-sign --mac-signing-key-user-name "My Company, Inc. (XXXXWJW)" --mac-signing-keychain /Users/steve/Library/Keychains/login.keychain-db
The error:
Running [security, find-certificate, -c, Developer ID Application: My Company, Inc. (XXXXWJW), -a, /Users/steve/Library/Keychains/login.keychain-db]
Did not find a key matching 'Developer ID Application: My Company, Inc. (XXXXWJW)'
jdk.jpackage.internal.PackagerException: Bundler DMG Installer skipped because of a configuration problem: Signature explicitly requested but no signing certificate specified..
Advice to fix: Either specify a valid cert in 'mac.signing-key-developer-id-app' or unset 'signBundle' or set 'signBundle' to false.
Thanks
More information about the core-libs-dev
mailing list