How Do I Integrate Deployments with My Favorite Installers?
During the build process the application packager can copy files into the build folder and run an AppleScript file. You can use these features to quickly build installers for the new build.
Add a File to Copy to Build Folder
Note: Using Variables in Files
Any file that you decide to have copied into the build folder can use variables that will be replaced with values relating to the build being packaged. In this Inno Setup script for example I'm using the [[LONG_VERSION]] variable. After the file is copied into the build folder [[LONG_VERSION]] will be replaced with a value like 1.0.0b1. I'm using the variable to uniquely name the installer that is being built.
The variables you can use are:
[[VERSION]]: Value returned by glxapp_getProp("version")
[[LONG_VERSION]]: Value returned by glxapp_getProp("long version")
[[BUILD_FOLDER]]: The full path to the folder where the packager placed the build of your application files.
[[APP_BUNDLE]]: The full path to the OS X application bundle in the build folder.
Adding an AppleScript to Run
Now that I have added the file (1) each time I package my application this file will be copied to the build folder. I can then open the file in Inno Setup, compile the script and have an installer that is ready to go.
I will now select a file containing an AppleScript to run after the build is packaged by clicking on the button (2).
Select the File
Note: More About Using Variables in Files
You can use the same variables in the AppleScript file as you do in files that are copied to the build folder.
Rather than hard coding the full path to the FileStorm project on my computer I use the [[BUILD_FOLDER]] variable (1) and then create the path to the FileStorm project (2) in relation to the build folder.
I then use the [[BUILD_FOLDER]] to point files on the disk image to the files in the build folder (3).
I use the [[APP_BUNDLE]] to assign the application to an icon in the disk image (4).