GLX Application FrameworkGLX Application Framework 1.2Building Your ApplicationHow Do I Integrate Deployments with My Favorite Installers?

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

Add a File to Copy to Build Folder

Open the Build Profiles (1) tab and select the build profile (2) you want to modify.

Click on the button (3) to select a file to copy to the build folder.

Select File

Select File

I'm going to select an Inno Setup (.iss) file that I will use to build a installer for Windows.

Note: Using Variables in Files

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

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

Select the File

I use FileStorm to build DMG images on OS X. I'm going to run an AppleScript that will configure the FileStorm project file and then build the DMG file in the build folder.

Note: More About Using Variables in Files

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).

Now that both the Inno Setup script and the AppleScript have been set we can package a build of the application to see the results.

Open the Packager

Open the Packager

Open the GLX Application Packager, select the build profile to build (1) and click Build Installer (2). If Run AppleScript is checked then the AppleScript in the file you selected will be executed. In this case the DMG will be built using FileStorm.

The Result

The Result

This is the result of the build. Notice that the DMG file was built (1) and the Inno Setup script (2) was copied into the folder.

2 Comments

Jérôme Rosat

I use SimplyDisk to build DMG images on OS X. It is possible to built an DMG images by using a template and a command line tool provided by SimplyDisk. Usage: sdtool -t template -o destination [-v volume_name] [item_name:new_path]

How to use a shell command in the "Build Profiles" tab ?

Trevor DeVore

The Application Packager doesn't have any tools to make shell calls directly, just AppleScript right now.

I recently added Linux support in my internal version and along with it the ability to execute RevTalk after the build finishes. For the time being you could just customize the Application Packager to make your shell call and then move that code into the proper spot once I release the new Application Packager.

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.