Creating a package for Installer 1.

Sammy Guichelaar

Administrator
Staff member
Administrator
Premium Member
Developer
2 May 2018
45
15
8
The Netherlands
apptapp.me
Github
https://github.com/sammyguichelaar
User Role
Developer
Repository
http://samguichelaar.com
Support Email
[email protected]
  • plist structure
  • bundleIdentifier (string, required) - The unique bundle identifier of this package, this is how Installer knows what you are talking about. Do not ever change this value once a package goes live, unless you want to fork your package.
  • name (string, required) - The name of the package as it will appear in the Installer package listings.
  • version (string, required) - The version of your package. Currently, Installer.app does not parse version numbers, but rather compares them -- meaning that you can only have one version of a product at a time live on the repositories. This shortcoming will be addressed in the near future.
  • location (string, required) - The location for the associated package zip file. This zip file MUST retain executable permissions if you are going to be installing any executables.
  • size (string, required) - The exact byte size of the package zip file. This must match or the Installer will not be able to install the package.
  • url (string, optional) - A url to link the "More info..." button to.
  • description (string, optional) - A package description or README. At this time Installer can only view a small portion of this text, but this will be addressed soon.
  • maintainer (string, optional) - The third party maintainer name for this package. You do not need to set this if it is the same as the repository maintainer.
  • contact (string, optional) - The third party maintainer contact (e-mail) for this package. You do not need to set this if it is the same as the repository maintainer's contact.
  • restartInstaller (boolean, optional) - set to true if you want installer to prompt the user to restart Installer itself after installing or updating this package.
  • scripts (array, required) - This is where the core installation procedure takes place. It is composed of one or more Installer scripts:
    • preflight (array, optional) - this script is executed before any installs or updates, but NOT uninstalls. It is typically used to check whether the package can be installed.
    • install (array, required) - this is the install script, without this, the user won't be able to install the package. Makes sense, doesn't it?
    • update (array, optional) - this script is executed when the user updates the package, if it is not defined, installer uses the install script (see above) to update instead, effectively overwriting the old package -- this is useful for smaller packages that don't really need a separate update script.
    • postflight (array, optional) - this script is executed after any install or update of the package, but NOT uninstalls.
    • uninstall (array, optional) - this script is executed when the user chooses to uninstall the package. Although it is optional, it is HIGHLY recommended that you do define it so that your package can be uninstalled. If it is not defined, the uninstall button will not show up in Installer.
    Each of these scripts is an array, containing script commands in the following format:

    <array>
    <string>CommandName</string>
    <string>Argument 1</string>
    <string>Argument 2</string>
    </array>

    A command may take any number of arguments, as well as some commands take array arguments that can even contain other scripts embedded in the same format. The commandn name however, is always a string. Please note that in the event that the Installer cannot identify a command name, the script execution will be aborted (notifying the user).


    script commands
    • CopyPath(source, destination) - Copies a path recursively. You can specify a folder or a file, but in either case the destination path must be absolute, do not leave out the filename when copying to a folder! It may work, but it is bad practice to do so and may cause unexpected results in some circumstances. The source path, when specified without a preceding slash (/, absolute path) will resolve to the contents of the zip file -- in the case that a full path is specified, it will resolve against the user's filesystem.