Setup Utility

Before I forget, I wanted to mention Inno Setup. Back in 2009, I wrote this post describing how I was using Wink as a sort of cut rate installer alternative. As I mentioned then, it was ugly, and a clearly inferior alternative to an actual installation utility. Since then, I found Inno Setup. Inno Setup is great. It’s actually easier to use it to create a real installer than it was to use my Wink-based workaround. All that’s necessary is to adapt the following script, which I used to create the installer for Forgotten Times:

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{8B6CE104-25D3-40E8-8681-F2B7DA29E855}
AppName=Forgotten Times
AppVersion=1.1
;AppVerName=Forgotten Times 1.1
AppPublisher=Morriss, William S.
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\Forgotten Times
DefaultGroupName=Forgotten Times
AllowNoIcons=yes
OutputBaseFilename=setup
SetupIconFile=C:\FT2\Forgotten Times\res\GameEngine.ico
Compression=lzma
SolidCompression=yes

[Languages]
Name: “english”; MessagesFile: “compiler:Default.isl”

[Tasks]
Name: “desktopicon”; Description: “{cm:CreateDesktopIcon}”; GroupDescription: “{cm:AdditionalIcons}”; Flags: unchecked
Name: “quicklaunchicon”; Description: “{cm:CreateQuickLaunchIcon}”; GroupDescription: “{cm:AdditionalIcons}”; Flags: unchecked; OnlyBelowVersion: 0,6.1

; Set the source to your root directory
[Files]
Source: “C:\FT\Forgotten Times\GameEngine.exe”; DestDir: “{app}”; Flags: ignoreversion
Source: “C:\FT\Forgotten Times\*”; DestDir: “{app}”; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don’t use “Flags: ignoreversion” on any shared system files

; For these icons, to get them to work with your GameEngine.exe you must set ‘WorkingDir:’ to ‘{app}’ because it creates
; local files
[Icons]
Name: “{group}\Forgotten Times”; Filename: “{app}\GameEngine.exe”; WorkingDir: {app}
Name: “{group}\{cm:UninstallProgram,Forgotten Times}”; Filename: “{uninstallexe}”; WorkingDir: {app}
Name: “{commondesktop}\Forgotten Times”; Filename: “{app}\GameEngine.exe”; Tasks: desktopicon; WorkingDir: {app}
Name: “{userappdata}\Microsoft\Internet Explorer\Quick Launch\Forgotten Times”; Filename: “{app}\GameEngine.exe”; Tasks: quicklaunchicon; WorkingDir: {app}

[Run]
Filename: “{app}\GameEngine.exe”; Description: “{cm:LaunchProgram,Forgotten Times}”; Flags: nowait postinstall skipifsilent

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: