Skip to content

Packaging Legacy

Simone Martorelli edited this page Mar 16, 2021 · 1 revision

What you will need

  1. An Apple ID with Developer access. If you do not have an Apple ID:

    1. You can create one here.
    2. With your Apple ID created, visit developer.apple.com
    3. Click the Account link at the top of the page
    4. Authenticate with your Apple ID and agree to the terms and conditions
  2. A copy of PackageMaker :

    1. Visit More Downloads for Apple Developers
    2. You will need to authenticate with your Apple Developer ID credentials
    3. Performa a search for PackageMaker
    4. Download the latest copy of "Auxiliary Tools for XCode"
    5. Open the downloaded DMG file and copy PackageMaker to the /Applications directory on your Mac

Overview of the completed installer package

Package contents:

  1. Enrollment application
  2. LaunchDaemon for the JAMFIntegrationHelper
  3. JAMFIntegrationHelper
  4. PostInstall script

Building the installer package with PackageMaker

Preparing the package contents

We need to change the ownership and permissions for the PrivilegedHelperTool and LaunchDaemon before adding them to the package project. We can use the Terminal.app (found in /Applications/Utilities/ on your Mac) to set the correct values. Replace /path/to/ with the path for each item. You can also drag and drop the file you are looking to set into the terminal to get the path.
PrivilegedHelperTool (com.ibm.JAMFIntegrationHelper)
  1. change the ownership for helper: sudo chown root:wheel /path/to/com.ibm.JAMFIntegrationHelper
  2. change the permissions for the helper: sudo chmod 755 /path/to/com.ibm.JAMFIntegrationHelper
LaunchDaemon (com.ibm.jamf.IntegrationHelper.plist):
  1. retrieve a copy of the launch daemon
  2. change ownership of the property list file: sudo chown root:wheel /path/to/com.ibm.jamf.IntegrationHelper.plist
  3. change permissions of the property list file: sudo chmod 644 /path/to/com.ibm.jamf.IntegrationHelper.plist
PostInstall script
  1. retrieve a copy of the post install script
  2. add the execute flag permission to the script: sudo chmod +x /path/to/postinstall

Constructing the package

  1. Launch PackageMaker.app from /Applications
  2. Upon launch you will be required to provide an organization name in a reverse domain name style identifier format:
  3. Provide a name for the soon to be completed installer package under the configuration tab:
  4. Drag and drop the compiled and signed build of the enrollment application into the Contents side bar of PackageMaker. In the Configuration tab, set the Destination path to /Applications:
  5. In the Contents tab, click the button to Apply Recommendations to set the proper permissions:
  6. Drag and drop the compiled and signed build of the JAMFIntegrationHelper into the Contents side bar of PackageMaker. In the Configuration tab, set the Destination path to /Library/PrivilegedHelperTools: You should see that the permissions / ownership you set earlier are reflected in the Contents tab for the JAMFIntegrationHelper:
  7. Drag and drop the LaunchDaemon into the Contents side bar of PackageMaker. In the Configuration tab, set the Destination path to /Library/PrivilegedHelperTools: You should see that the permissions / ownership you set earlier are reflected in the Contents tab for the LaunchDaemon:
  8. Click the Scripts tab for the LaunchDaemon and drag and drop the PostInstall field. The path to the script should be displayed:
  9. Click Build and save your package with a name:
Clone this wiki locally