Make Packages with Packages: Beginner’s Introduction

Why use a package?

For backing up documents and photos, you would be better off using a program like Keka and just compress the data. However, if you are making a custom OS install and always need the same files and applications in the same places, building an install package is a faster, easier way to do things. Mac users are lucky to have a great, free program that makes the process simple too.


Image

Packagesas the name would have you guess, is creates packages on the Mac OS. It’s homepage can be found here. It was built using part of the source code from Iceburg, a project by Stéphane Sudre that was used by developers in the pre OSX 10.7 days. Packages’ interface is easy to use for both beginners and advanced users. This introduction will walk through the steps needed to make your first installer package.

Upon the first launch you will be greeted with the New Project menu. Select the default, “Distribution”, and press “Next”.

Image

Your next step will be naming your project and selecting the location of the project’s work files. This becomes your package’s default name, but that can be changed later if you wish. I will be using the name “Installer”, with a directory of “~/Documents/Installer/”.

The next screen is your project window. The top tool bar has the options for Settings, Presentation, Requirements, and Comments. I will go into detail about these in a later post. For now, just ignore them.

Image


Image
Click on your package name as seen on the left. You will see a new layout and menu come up. The top tool bar has changed for the options for Settings, Payload, and Scripts

 

Click on the Payload tab and you will see the following window. This layout is used for choosing which files or applications you want to have installed, and to where. It might look scary at first, but it is easier than it initially looks.

Image

For practice, we’re going to make an install package that will put the applications TextEdit and Calculator in the Applications folderTo do this we right-click on the “Applications” folder (our destination) and select “Add Files…”, followed by selecting the TextEdit and Calculator applications in your Applications folder. At this point your basic package is complete. The final step is to compile.

To make your final install package. Save your work with a quick CMD + S, and then go to the Build menu and click “Build”. Simple, right?

Image

Once completed, you will find your package in your save directory, in my case “~/Documents/Installer/build/Installer.mpkg”.

Image

Congratulations! You have built your first installer package. Using this basic knowledge you will be able to make your own installation packages for the Mac OS.

Leave a Reply

Your email address will not be published. Required fields are marked *