In order to generate a macOS installer for Apache NetBeans you will need the following prerequisites:
For the code snippets, you will need to update the following values according to the version of Apache NetBeans you are creating the installer for |
Update the permissions of the `installermac.sh` script which will be used to create the installer
$ chmod 777 distpreparation/netbeans/XX.X/vcX/installer/installermac.sh |
Generate the installer
$ distpreparation/netbeans/XX.X/vcX/installer/installermac.sh dist/netbeans/XX.X/vcX/netbeans-XX.X-bin.zip XX.X YYMMDD certificate.txt |
certificate.txt is a file containing your Apple Developer ID Certificate |
Test the Installer locally
In order to test the installer works locally you will need to first remove files created during the previous step, once this is removed you can install Apache NetBeans as normal from the newly created installer:
rm -rf distpreparation/netbeans/XX.X/vcX/installer/nbbuild/installer/mac/newbuild/netBeans/nbide/build |
Installers will be generated under dist/bundles
Notorize & Staple Installer
xcrun altool --notarize-app --primary-bundle-id "org.apache.netbeans-XX.X" -u "AC_USERNAME" -p "@keychain:AC_PASSWORD" --file Apache-NetBeans-XX.X-bin-macosx.dmg |
Notarising the application can take a few minutes, you can check the progress of the notorization process via (where UUID is the UUID provided when you started the notarization process): |
"AC_USERNAME" = Your Apache Apple Developer username, for example: johnmcdonnell@apache.org |
Once the notarisation process is complete, you need staple this to your distribution:
xcrun stapler staple Apache-NetBeans-XX.X-bin-macosx.dmg |