Simple Package

One task that has always seemed to me to take more time than it should is the process of packaging applications like Firefox, Google Chrome or other applications which are self-contained and can be copied as-is into /Applications. While tools like AutoPkg have helped a good deal by automating the download and packaging of various self-contained applications, this approach still requires some setup work and requires a recipe to be written to handle the application.

Screen Shot 2014-04-28 at 3.06.33 PM

To help make this task easier, I’ve developed Simple Package, an Automator application that will allow the selection of a self-contained application and creates an installer package that enables the installation of the application with pre-set permissions into /Applications. For more details, see below the jump.

Using Simple Package

1. If needed, download the Simple_Package_Creator_Installer zip file from the installer directory in my GitHub repo.

2. Once downloaded and installed, double-click on the Simple Package Creator application in /Applications.

Screen Shot 2014-04-28 at 5.01.30 PM

3. You’ll be prompted to select the self-contained application that you want to create an installer package from.

Screen Shot 2014-04-28 at 5.00.02 PM

4. Once you’ve selected the self-contained application, the application will be copied to a temporary build location and a dialog window will appear to let you know that this may take a little while.

Screen Shot 2014-04-28 at 4.52.09 PM

5. Once the application has been copied, you’ll be prompted to name the installer package.

Screen Shot 2014-04-28 at 4.52.29 PM

By default, the name filled in will be My Great Application Installer Package, but this name can be changed as desired.

Screen Shot 2014-04-28 at 4.52.36 PM

6. Once you’ve entered a name for the installer package, you’ll be prompted for a package identifier.

Screen Shot 2014-04-28 at 4.52.42 PM

By default, the name filled in will be com.github.simple_package, but this name should be changed to be something unique.

Screen Shot 2014-04-28 at 4.52.52 PM

7. Once you’ve entered an identifier for the installer package, you’ll be prompted for a version number.

Screen Shot 2014-04-28 at 4.53.10 PM

By default, the value filled in will be 1.0, but this value should be changed to be something unique (preferably related to the application’s version number.)

Screen Shot 2014-04-28 at 4.53.16 PM

8. Once the package name, package identifier and package version have been set, Simple Package will prompt for an administrator’s username and password.

Screen Shot 2014-04-28 at 4.53.23 PM

9. Once the admin username and password are provided, Simple Package will create the installer package and prompt you when it’s finished.

Screen Shot 2014-04-28 at 4.53.41 PM

10. Click OK at the prompt and a new Finder window will open and display the newly-created installer package.

Screen Shot 2014-04-28 at 4.53.57 PM

11. Simple Package will automatically exit.

Once installed, the self-contained application will be stored in /Applications and will have the following permissions:

Owner: root (read-write)

Group: wheel (read-only)

Everyone: (read-only)

Screen Shot 2014-04-28 at 5.03.43 PM

Screen Shot 2014-04-28 at 5.03.51 PM

How Simple Package works

Simple Package is an Automator application that uses AppleScript, shell scripting and pkgbuild behind the scenes to create installer packages. When a script is selected, the following process takes place:

1. The self-contained application is copied to /tmp as a zip archive named, to give the package-building script a consistent value to work with.

2. After the package name, package identifier and package version are set, /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.

3. A new directory is created in /tmp that matches the chosen name of the package.

4. Next, a Payload directory is created inside of /tmp/package_name_here

5. The application zip archive’s contents are extracted to /tmp/package_name_here/Payload.

6. The installer package is built by pkgbuild using the application now stored in /tmp/package_name_here/Payload

7. The file is removed from /tmp

8. The finished installer package is stored in /tmp/package_name_here and the user is prompted that the process is finished.

9. Once the user is notified and clicks OK, a new Finder window opens for /tmp/package_name_here

The total workflow looks like this:

Screen Shot 2014-04-28 at 4.39.59 PM

All Simple Package Creator components and scripts are available at my GitHub repo:

  1. April 29, 2014 at 4:22 am

    Looks good!

  2. April 30, 2014 at 2:12 pm

    Looks great Rich. Assuming you’re targeting the quick drag-to-install applications here, but what’s the possibility of an option to select/add a single postinstall script? Does that tread too far into the traditional packaging utilities realm?

    • April 30, 2014 at 4:52 pm


      I’m planning to keep this tool focused on its current design, which unfortunately doesn’t include adding scripts to the package.

      That said, you are not limited to my choices. All the components are available in my Github repo; please feel free to modify it to meet your needs:

  3. cashxx
    April 30, 2014 at 5:07 pm

    Looks great, nice simple tool for a quick package of Firefox or something… favorite has always been PackageMaker from Apple and sadly its not supported anymore and no one uses it. After figuring out how to use it I can have a package and prefs or other files simply created in a few minutes and still use it today and hate to think its going to stop working one of these days. What I do is make a dummy file system and keep it on the side, copy it for a new package and put the files where I want them and create the package. Simple once you know how to use it, why it died I have no idea why!

  4. May 9, 2014 at 1:17 am

    Reblogged this on SutoCom Solutions.

  5. December 14, 2014 at 1:33 am

    Have you had any problem using this with some applications? I’m trying to use this with the Horizon View client and I get an error. I took a screenshot and added here is the link:

    • December 14, 2014 at 5:58 pm

      It looks like the application needed to be re-compiled on 10.10.1 before it would run correctly on 10.10.1. I’ve compiled it and posted an updated installer here:

      The only change was compiling it on Yosemite, so there should be no functionality changes. There is a compatibility change, as it appears the Yosemite-compiled version now only runs on 10.8.x and later, instead of 10.7.x and later. I’ve updated the OS Compatibility notes on my Github repo.

  6. August 12, 2015 at 1:50 pm

    I seem to have problems on 10.10.4 – The Action “Create Archive” encountered an error, Check the action’s properties and try running the workflow again.

  7. Zesa
    March 10, 2016 at 2:40 pm


    i get this problem:
    Syntax Error: Set: Entry, “:0:BundleisRelocatable”,Does Not Exists.

    See it here.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: