Prerequisites

In order to generate a macOS installer for Apache NetBeans you will need the following prerequisites:


Steps for Building

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

XX.X = Version of Apache NetBeans generating the installer for, i.e. 12.4
vcX = Voting Candidate number
YYMMDD = The date the installer is being generated
  1. Download both the `dist` and `distpreparation` folders from Jenkins, and unzip it in a directory of your choice.
    Apache NetBeans is built on the Apache Jenkins: https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/ Based on the version your generating an installer for ensure you download the correct files for the release/job as outlined in the main Apache NetBeans Release vote thread.

  2. 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
  3. 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
    1. 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

  4. 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):
    $ xcrun altool --notarization-info <UUID> -u "AC_USERNAME" -p "@keychain:AC_PASSWORD"

    "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
  5. Sign installers & upload to SVN & start vote thread
    Same steps as required for the Windows and Linux installers
  • No labels