How to Create Windows Inno Setup Installer for XULRunner Application
From MDC
XULRunner Application has no installer, however, these instructions can help you to easily create a Windows installer with Inno Setup. This article introduce how to make windows installer with My App sample from the Getting_started_with_XULRunner article.
Contents |
[edit] Step 1: Installing Inno Setup
Download Inno Setup from Inno Setup Downloads. If you only want to compile installer, install only Stable Release. If you want to edit scripts, QuickStart Pack (includes ISTool (script editor)) is recommended. But you can get ISTool from Inno Setup Third-Party Files.
[edit] Step 2: Creating Application
To make your application standalone, deploy your application according to the Deploying XULRunner 1.8 article. My App's case as follows:
- myapp/
- application.ini
- chrome/
- default/
- myapp.exe (copy xulrunner-stub.exe and rename)
- xulrunner/
Please test your application before deploying it. If your application does not run, neither will the installed version. ;-)
[edit] Step 3: Creating Inno Setup script
Create an Inno Setup Script (.iss file). Inno Setup Script Wizard can't set chrome directory's deployment point, so you have to edit the iss file yourself. Also you had better set AppName, AppPublisher properties the same with application.ini file.
My App's .iss file sample as follows:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
AppName=My App
AppVerName=My App 1.0
AppPublisher=Mark Finkle
AppPublisherURL=http://developer.mozilla.org/en/docs/Getting_started_with_XULRunner
AppSupportURL=http://developer.mozilla.org/en/docs/Getting_started_with_XULRunner
AppUpdatesURL=http://developer.mozilla.org/en/docs/Getting_started_with_XULRunner
DefaultDirName={pf}\My App
DefaultGroupName=My App
AllowNoIcons=yes
OutputDir=..\build\output
OutputBaseFilename=myapp-1.0-win32
; SetupIconFile=
Compression=lzma
SolidCompression=yes
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Components]
Name: main; Description: My App; Types: full compact custom; Flags: fixed
Name: runtime; Description: XUL Runner Runtime; Types: full custom
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: C:\develop\XULRunnerInstaller\myapp\myapp.exe; DestDir: {app}; Components: main; Flags: ignoreversion
Source: C:\develop\XULRunnerInstaller\myapp\application.ini; DestDir: {app}; Components: main; Flags: ignoreversion
Source: C:\develop\XULRunnerInstaller\myapp\chrome\*; Excludes: .svn; DestDir: {app}\chrome; Components: main; Flags: ignoreversion recursesubdirs createallsubdirs
Source: C:\develop\XULRunnerInstaller\myapp\defaults\*; Excludes: .svn; DestDir: {app}\defaults; Components: main; Flags: ignoreversion recursesubdirs createallsubdirs
Source: C:\develop\XULRunnerInstaller\myapp\xulrunner\*; DestDir: {app}\xulrunner; Components: runtime; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: {group}\My App; Filename: {app}\myapp.exe
Name: {group}\{cm:UninstallProgram,XUL Explorer}; Filename: {uninstallexe}
Name: {userdesktop}\My App; Filename: {app}\myapp.exe; Tasks: desktopicon
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\My App; Filename: {app}\myapp.exe; Tasks: quicklaunchicon
[Run]
Filename: {app}\myapp.exe; Description: {cm:LaunchProgram,My App}; OnlyBelowVersion: 0,6; Flags: nowait postinstall skipifsilent
Be careful this sample XULRunner under as runtime.
[edit] Step 4: Building an installer
You start Inno Setup Compiler, load a script file and compile. You will test an installer after compiling. After installation, you must test your application. If your application completes the startup, making the installer has been successful.
Download the myapp.iss sample.
[edit] Original Document Information
- Author: Taro Matsuzawa
- Inno Setup Script Original Author: Mark Finkle
- Japanese version is original.