Awesome
Payload-Free-Package-Creator
OS Compatibility:
The current release of Payload-Free Package Creator.app has been tested and verified to run on the following versions of macOS:
- 12.3.1
- 11.6.5
- 10.15.7
Not tested on the following versions of macOS:
- 10.14.6 or earlier
============================
Using Payload-Free Package Creator.app
-
As needed, download the Payload-Free_Package_Creator_Application.zip file from the application directory in this GitHub repo.
-
Once downloaded and unzipped, double-click on the Payload-Free Package Creator application.
-
You'll be prompted to select the script that you want to create a payload-free package from.
-
Once you've selected the script, you'll be prompted to name the payload-free package. By default, the name filled in will be Payload-Free Installer Package, but this name can be changed as desired.
-
Once you've entered a name for the installer package, you'll be prompted for a package identifier. By default, the name filled in will be com.github.payload_free, but this name should be changed to be something unique.
-
Once you’ve entered an identifier for the installer package, you’ll be prompted for a version number. By default, the value filled in will be 1.0, but this value should be changed to be something unique.
-
Once the package name, package identifier and package version number have been set, Payload-Free Package Creator.app will prompt for an administrator's username and password.
-
Once the admin username and password are provided, Payload-Free Package Creator.app will create the payload-free package and prompt you when it's finished.
-
Click OK at the prompt and a new Finder window will open and display the newly-created payload-free package.
-
Payload-Free Package Creator.app will automatically exit.
How Payload-Free Package Creator.app works
Payload-Free Package Creator.app is an Automator application that uses AppleScript, shell scripting and pkgbuild behind the scenes to create payload-free packages. When a script is selected, the following process takes place:
-
The script is copied to /tmp and renamed to postinstall, to match the name that pkgbuild is expecting for a post-installation script.
-
After the package name and package identifier are chosen, /tmp is checked to make sure that there is not an existing directory that is named the same as the chosen name. If a matching directory is found, it is removed.
-
A new directory is created in /tmp that matches the chosen name of the package.
-
Next, a scripts directory and an empty directory named nopayload are created inside of /tmp/package_name_here. The nopayload directory provides the empty directory for pkgbuild's --root option
-
The postinstall script is moved to /tmp/package_name_here/scripts
-
The payload-free package is built by pkgbuild using the postinstall script stored in /tmp/package_name_here/scripts
-
The finished payload-free package is stored in /tmp/package_name_here and the user is prompted that the process is finished.
-
Once the user is notified and clicks OK, a new Finder window opens for /tmp/package_name_here
Blog posts: https://derflounder.wordpress.com/category/payload-free-package-creator/