Packaging For Mac Os X



As Mac OS X admins, it is important to know why and how to package up software. Packaging is a generally simple process that will make software deployment easier. ARD (Apple Remote Desktop) and LANDesk require software be in be in the .pkg format so it uses the Apple Installer.app (or command line version). This makes it simple to push new software or updates to many Macs remotely. If you are using volume licensing, you can also usually include the license for the packaged software in your package so you don’t have to visit each machine to enter a serial number. Also, in my area (Chemistry dept.), we have some X11 apps that require extensive setup such as command line install, updates, PATH setup and I bundle in GUI icons to launch those apps using XDroplets (described below). This post is does not aim to be a how-to, but rather a list and description of different applications used for packaging and tools used in conjunction with packaging.

Posted on September 26, 2017 September 26, 2017 Categories Mac OS X, Packaging, Technology Deploying Epson EasyMP Multi PC Projection for Mac When adding Epson EasyMP Multi PC Projection 2.1.0 to Munki, I found that the built-in postinstall script fails. Creating a Mac OS X package for a Java application The following article uses options that are available starting with the Professional edition and project type. This tutorial will guide you through the packaging of a Java application into a Mac OS X compliant package. File Packaging Mac Informer. Featured File Packaging free downloads and reviews. Latest updates on everything File Packaging Software related. Log in / Sign up. File Date Changer 5 is the ultimate file date changing tool for Mac OS X.from existing files.

In the Apple macOS operating system, a package is a file system directory that is normally displayed to the user by the Finder as if it were a single file. Such a directory may be the top-level of a directory tree of objects stored as files, or it may be other archives of files or objects for various purposes, such as installer packages, or backup archives. BSD (4.4 Lite) operating system from UC Berkeley and others for Mac OS X and/or Mac OS X Server: All advertising materials mentioning features or use of this software must include the following acknowledgement: 'This product includes software developed.

Types of Packages
There are three main types of packages:

Package
This is a regular, “Single Package” that is used most of the time. You would use this for a single software package or common set of files (payload). This can also be used for a “payload-less” package which basically means no files are actually included with the package; the package can be used as a vehicle to run shell script(s) in the pre or post [install|upgrade|flight] scripts.

Metapackage
A metapackage is basically multiple single packages. Instead of making a super single package that includes everything you want to distribute, you can just take existing packages you already created or licensed and bundle them together to deploy a bunch of software with less steps. Metapackages are also used to allow the user to customize what gets installed.

Distribution Project
Similar to a metapackage but provides more control over the UI and control over requirements. Distribution Projects are only compatible with Tiger or later.

For more detail about the different types of packages, see Apple’s documentation.

Packaging Tools
PackageMaker The main tool available is PackageMaker from Apple. This is included with the Developer Tools (Xcode) and Apple Remote Desktop 3. Xcode can be downloaded from http://developer.apple.com and is also included with OS X on the discs but is not installed by default. Package Maker can be used to create Single Packages, Metapackages and Distribution packages. With this tool, you basically create a package directory that contains the folder structure and payload (files/folders) that you want to install. Full instructions are available here. Here is another manual.

IceBerg
Iceberg is probably the most popular alternative to PackageMaker for creating packages and metapackages. It is free and the source code can be downloaded. Iceberg has the advantage of being able to create an installer without creating a “dummy” folder structure. You can select any file(s) or folder(s) on your HD and they will be installed in the same hierarchy as the source.

License: Free
Product Homepage
Documentation
Iceberg vs PackageMaker comparison

Composer Standard Edition
Composer is a commercial tool from JAMF Software, the makers of the Casper Suite. Composer takes a snapshot of your filesystem, you install your software and make any necessary changes then Composer takes another snapshot and compares the difference. You are then shown the files that have changed or have been added and given the opportunity to tweak what will be included with the package before it is built.

License: Commercial $99.95 ($49.95, discount for ARD users)
Product Homepage
Documentation (26MB PDF, Casper Suite manual)

Doppelgänger
New kid on the block. I haven’t heard of this until researching for this article but it appears to be a snapshot type builder similar to Composer.

License: $29.99 (15 day trial available)
Product Homepage
Documentation – Included with app.

OS X Packager
This is a little known app from Ohio State that was mentioned on the MacEnterprisemailing list. With this nifty little app, you can drag a well-behaved .app or .prefpane into its window and click on button and it will create a package of it and contain it within a disk image. This will not work as a general packaging utility, only for application bundles or Preference Panes. Useful if you want something small packaged for use with ARD or as part of a metapackage.

License: Free
Download (direct link)

diffPackageMaker
Another snapshot package maker from the creator(s) of DeployStudio. What is nice about this utility is that you can select which folders you want to create the snapshot of. So if you have an idea of where an item will be installed, you don’t have to snapshot the whole drive. However, you can not customize the package before it is created and it will name the Identifier as com.deploystudio.diffpackagemaker. So it is best to open the resulting package in PackageMaker and customize and personalize as needed.

License: Free
Product Homepage

Packaging For Mac Os X 10.13

Command Line Packaging Tools
packagemaker
The CLI version of PackageMaker which can be used in scripts. It is also included with Xcode (in /Developer/Tools/). Includes a snapshot option.

License: Free
Documentation – man packagemaker

logGen
While this is not a packaging application, it is frequently used when packaging. This is a command line utillity for detecting filesystem changes to help you determine which files have changed. For instance, if you entered a serial number for an application and can’t figure out where the app put that file, you can run logGen before and after and then run it a third time to log the changes to a file.

License: Free
Product Homepage
Documentation
Office 2004 PackageMaker
One of the long standing pains in the ass is that MS Office on the Mac uses the Vise installer for updates. Vise installers do not work with ARD so Mac admins have had to find creative ways to handle Office updates across their enterprise. The most creative way I have seen is this perl script on MacEnterprise that basicially looks at an updater log from an Office update and copies those files to a similar directory structure ready for PackageMaker. This script may also work with some other Vise installers.

Other Tools
Xdroplets
Xdroplets is a nifty little app that creates GUI launchers for X11 apps. To create a launcher, you just double click an icon, it prompts you for the path to the application you are creating the launcher for and asks for any arguments you want to pass to it and path to working directory. You can then use the Finders “Get Info” window if you want to give it a custom icon. I include these launchers with any X11 app that I package up so it makes it real easy for the users (faculty and students) to know the apps are there. It also launches X11 for you when you open one of the X11 apps.

License: Free
Product Homepage

If you have anything to add, please use the comments below.

No related posts.

Find more like this:Mac, Software Packaging , Mac, Packaging


Table Of Contents

  • Creating packages for OS X
    • Using PyInstaller and Homebrew
      • Additional Libraries
    • Using the Kivy SDK
      • To include other frameworks

Note

This guide describes multiple ways for packaging Kivy applications.Packaging with PyInstaller is recommended for general use.

Using PyInstaller and Homebrew¶

Note

Package your app on the oldest OS X version you want to support.

Complete guide¶

  1. Install Homebrew

  2. Install Python:

    Note

    To use Python 3, brewinstallpython3 and replace pip withpip3 in the guide below.

  3. (Re)install your dependencies with --build-bottle to make sure they canbe used on other machines:

    Note

    If your project depends on GStreamer or other additional libraries(re)install them with --build-bottle as describedbelow.

  4. Install Cython and Kivy:

  5. Install PyInstaller:

  6. Package your app using the path to your main.py:

    Note

    This will not yet copy additional image or sound files. You would need toadapt the created .spec file for that.

Editing the spec file¶

The specs file is named touchtracer.spec and is located in the directorywhere you ran the pyinstaller command.

You need to change the COLLECT() call to add the data of touchtracer(touchtracer.kv, particle.png, …). Change the line to add a Tree()object. This Tree will search and add every file found in the touchtracerdirectory to your final package. Your COLLECT section should look somethinglike this:

This will add the required hooks so that PyInstaller gets the required Kivyfiles. We are done. Your spec is ready to be executed.

Build the spec and create a DMG¶

  1. Open a console.

  2. Go to the PyInstaller directory, and build the spec:

  3. Run:

  4. You will now have a Touchtracer.dmg available in the dist directory.

Additional Libraries¶

GStreamer¶

If your project depends on GStreamer:

Note

Packaging For Mac Os X

If your Project needs Ogg Vorbis support be sure to add the--with-libvorbis option to the command above.

If you are using Python from Homebrew you will also need the following stepuntil this pull requestgets merged:

Using PyInstaller without Homebrew¶

First install Kivy and its dependencies without using Homebrew as mentioned herehttp://kivy.org/docs/installation/installation.html#development-version.

Once you have kivy and its deps installed, you need to install PyInstaller.

Let’s assume we use a folder like testpackaging:

Create a file named touchtracer.spec in this directory and add the followingcode to it:

Change the paths with your relevant paths:

Then run the following command:

Replace touchtracer with your app where appropriate.This will give you a <yourapp>.app in the dist/ folder.

Using Buildozer¶

pip install git+http://github.com/kivy/buildozercd /to/where/I/Want/to/packagebuildozer init
For

Note

Packaging Kivy applications with the following method must be done insideOS X, 32-bit platforms are no longer supported.

Edit the buildozer.spec and add the details for your app.Dependencies can be added to the requirements= section.

By default the kivy version specified in the requirements is ignored.

If you have a Kivy.app at /Applications/Kivy.app then that is used,for packaging. Otherwise the latest build from kivy.org using Kivymaster will be downloaded and used.

If you want to package for python 3.x.x simply download the packagenamed Kivy3.7z from the download section of kivy.org and extract itto Kivy.app in /Applications, then run:

How to update mac os x

Once the app is packaged, you might want to remove unneededpackages like gstreamer, if you don’t need video support.Same logic applies for other things you do not use, just reducethe package to its minimal state that is needed for the app to run.

As an example we are including the showcase example packaged usingthis method for both Python 2 (9.xMB) and 3 (15.xMB), you can find thepackages here:https://drive.google.com/drive/folders/0B1WO07-OL50_alFzSXJUajBFdnc .

That’s it. Enjoy!

Buildozer right now uses the Kivy SDK to package your app.If you want to control more details about your app than buildozercurrently offers then you can use the SDK directly, as detailed in thesection below.

Using the Kivy SDK¶

Note

Kivy.app is not available for download at the moment. For details,see this issue.

Note

Packaging Kivy applications with the following method must be done insideOS X, 32-bit platforms are no longer supported.

Since version 1.9.0, Kivy is released for the OS X platform in aself-contained, portable distribution.

Apps can be packaged and distributed with the Kivy SDK using the methoddescribed below, making it easier to include frameworks like SDL2 andGStreamer.

  1. Make sure you have the unmodified Kivy SDK (Kivy.app) from the download page.

  2. Run the following commands:

Note

This step above is important, you have to make sure to preserve the pathsand permissions. A command like cp-rf will copy but make the appunusable and lead to error later on.

  1. Now all you need to do is to include your compiled app in the Kivy.appby running the following command: Music tag editor mac crack.

Where <app_folder_name> is the name of your app.

Packaging For Mac Os X 10.7

This copies Kivy.app to <app_folder_name>.app and includes a compiled copyof your app into this package.

  1. That’s it, your self-contained package is ready to be deployed!You can now further customize your app as described bellow.

Installing modules¶

Kivy package on osx uses its own virtual env that is activated when you runyour app using kivy command.To install any module you need to install the module like so:

Where are the modules/files installed?¶

Inside the portable venv within the app at:

If you install a module that installs a binary for example like kivy-gardenThat binary will be only available from the venv above, as in after you do:

The garden lib will be only available when you activate this env.

source /Applications/Kivy.app/Contents/Resources/venv/bin/activategarden install mapviewdeactivate

To install binary files¶

Just copy the binary to the Kivy.app/Contents/Resources/venv/bin/ directory.

To include other frameworks¶

Kivy.app comes with SDL2 and Gstreamer frameworks provided.To include frameworks other than the ones provided do the following:

For

Do not forget to replace <Framework_name> with your framework.This tool osxrelocator essentially changes the path for thelibs in the framework such that they are relative to the executablewithin the .app, making the Framework portable with the .app.

Shrinking the app size¶

The app has a considerable size right now, however the unneeded parts can beremoved from the package.

For example if you don’t use GStreamer, simply remove it fromYourApp.app/Contents/Frameworks.Similarly you can remove the examples folder from/Applications/Kivy.app/Contents/Resources/kivy/examples/ or kivy/tools,kivy/docs etc.

This way the package can be made to only include the parts that are needed foryour app.

Adjust settings¶

Icons and other settings of your app can be changed by editingYourApp/Contents/info.plist to suit your needs.

Packaging For Mac Os X

Create a DMG¶

To make a DMG of your app use the following command:

Mac Os X Leopard

Note the lack of / at the end.This should give you a compressed dmg that will further shrink the size of yourdistributed app.

How To Update Mac Os X

« Kivy on AndroidCreate a package for IOS »