Posts Tagged ‘Forgotten Times’

Setup Utility

January 31, 2011

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

Fixing Forgotten Times

September 28, 2010

Maybe a month and a half ago, I decided to enter Forgotten Times in the Indie Game Challenge. I figured it would be a piece of cake. From what I had recalled, I finished the game seven or eight years ago back in law school. My thought was that I’d throw together an manual and an elevator speech (both required for the contest), put it all in an installer, and be done.

Obviously, that isn’t what happened.

Apparently, I didn’t actually finish it back in law school. I got it mostly finished back in law school. I’d say it was 98% finished. However, trying to squeeze out that last 2% reminded me of just how much work goes into these things.

Happily though, thanks in large part to my very patient wife who played through it 5-10 times as she found bugs and I fixed them, we worked out all the obvious kinks, made a couple of significant upgrades to the interface, and got it all done. Now, I just have to pull the rest of the submission package together and everything will be ready to ship well before the October 1 deadline.

Manual Installer

May 31, 2009

I discovered something recently. What I discovered is that my original method of distributing the Forgotten Times series doesn’t work. Originally, I had thrown the Forgotten Times executables, and the data files that actually power the games into a folder creatively called “Files”, made a shortcut to the executable in the main distribution folder, then zipped everything up and put it on the web site.

The problem with the above approach is that windows shortcuts use absolute locations, and every location is different depending on the name of the user account it’s running under. As an example, if my user name is “Sid” (which, on this computer, it is), then the path name for any file located on my desktop will start with “C:\Documents and Settings\Sid\Desktop\”. Because of this, whenever the zipped distribution folder was downloaded onto a new machine, the shortcut would try and look for the data files the executable needs to run in the location they were stored on the original machine (e.g., “C:\Documents and Settings\Sid\Desktop\FT\Files”) rather than their location after the download (e.g., C:\Documents and Settings\Your Name\Desktop\FT\Files”). The result, predictably, was that the executable would enter an infinite loop, forlornly looking for the data files in a location that simply didn’t exist in its new host environment. Very sad.

Anyway, I ended up deciding to solve this problem by making a wink program demonstrating for a user how to find the executables, and make a new shortcut on their own machines. It isn’t the most elegant solution, but it should get over the fact that I have no real way of knowing what the relevant user names will be on the machines where my programs are downloaded. Someday, I may end up writing a full install script. However, for now, wink it shall be.