2011-02-28 14:08:08 +00:00
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
;
; This script creates an installable FlightGear package for Win32 using the
; "Inno Setup" package builder. Inno Setup is free (but probably not open
; source?.) The official web site for this package building software is:
;
; http://www.jrsoftware.org/isinfo.php
;
; Note: the files must appear in the X: drive.
; You can do this with the command below:
;
; subst X: path_to_files
;
; For example:
;
; C:\> subst X: F:\Path\to\FlightGear\root
; C:\> subst X: F:\
; C:\> subst X: E:\Package\FlightGear-YYYYMMDD
; C:\> subst X: /d
;
2011-12-06 15:47:56 +00:00
#define FGVER "v20111205"
2011-10-29 15:36:34 +00:00
;#define FGVER "2.4.0"
2011-12-06 15:47:56 +00:00
[Setup]
AppId=FlightGear {#FGVER}
AppName=FlightGear {#FGVER}
AppPublisher=The FlightGear Team
OutputBaseFilename=Setup FlightGear {#FGVER}
2011-02-28 14:08:08 +00:00
AppVerName=FlightGear {#FGVER}
AppPublisherURL=http://www.flightgear.org
AppSupportURL=http://www.flightgear.org
AppUpdatesURL=http://www.flightgear.org
DefaultDirName={pf}\FlightGear {#FGVER}
DefaultGroupName=FlightGear {#FGVER}
LicenseFile=X:\data\COPYING
Uninstallable=yes
SetupIconFile=x:\flightgear.ico
2011-09-11 14:18:36 +00:00
VersionInfoVersion=2.5.0.0
2011-02-28 14:08:08 +00:00
WizardImageFile=X:\setupimg.bmp
WizardImageStretch=No
WizardSmallImageFile=X:\setupsmall.bmp
VersionInfoCompany=The FlightGear Team
2011-12-06 15:47:56 +00:00
UninstallDisplayIcon={app}\bin\fgrun.exe
2011-02-28 14:08:08 +00:00
[Tasks]
; NOTE: The following entry contains English phrases ("Create a desktop icon" and "Additional icons"). You are free to translate them into another language if required.
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
Name: "insoal"; Description: "Install OpenAL (the sound engine)"
[Files]
; NOTE: run subst X: F:\ (or whatever path the expanded tree resides at)
Source: "X:\*.txt"; DestDir: "{app}"; Flags: ignoreversion
2011-12-06 15:47:56 +00:00
Source: "X:\bin\*.*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs
2011-03-24 19:31:13 +00:00
;;; Source: "X:\bin\vcredist_x86.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
2011-02-28 14:08:08 +00:00
Source: "X:\bin\oalinst.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "X:\data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Dirs]
; Make the user installable scenery directory
Name: "{app}\scenery"; Permissions: everyone-modify
Name: "{code:TerrasyncDir}"; Permissions: everyone-modify
[Icons]
2011-12-06 15:47:56 +00:00
Name: "{group}\FlightGear {#FGVER}"; Filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}";
; Name: "{group}\FlightGear"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--fg-root=."; WorkingDir: "{app}";
2011-02-28 14:08:08 +00:00
Name: "{group}\FlightGear Manual"; Filename: "{app}\data\Docs\getstart.pdf"
Name: "{group}\FlightGear Documentation"; Filename: "{app}\data\Docs\index.html"
Name: "{group}\Flightgear Wiki"; Filename: "http://wiki.flightgear.org"
2011-12-06 15:47:56 +00:00
Name: "{userdesktop}\FlightGear {#FGVER}"; Filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}"; Tasks: desktopicon
2011-02-28 14:08:08 +00:00
2011-12-06 15:47:56 +00:00
Name: "{group}\Tools\Install & Uninstall Scenery"; Filename: "{app}\bin\fgadmin.exe"; WorkingDir: "{app}";
Name: "{group}\Tools\TerraSync"; Filename: "{app}\bin\terrasync.exe"; Parameters: "-S -p 5505 -d ""{app}\terrasync"""; WorkingDir: "{app}";
2011-02-28 14:08:08 +00:00
Name: "{group}\Tools\Uninstall FlightGear {#FGVER}"; Filename: "{uninstallexe}"
2011-12-06 15:47:56 +00:00
Name: "{group}\Tools\js_demo"; Filename: "{app}\bin\js_demo.exe"
Name: "{group}\Tools\fgjs"; Filename: "cmd"; Parameters: "/k fgjs.exe ""--fg-root={app}\data"""; WorkingDir: "{app}\bin";
Name: "{group}\Tools\GPSsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\GPSsmooth.exe"" -h"; WorkingDir: "{app}\bin";
Name: "{group}\Tools\UGsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\UGsmooth.exe"" -h"; WorkingDir: "{app}\bin";
Name: "{group}\Tools\MIDSsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\MIDSsmooth.exe"" -h"; WorkingDir: "{app}\bin";
Name: "{group}\Tools\metar"; Filename: "cmd"; Parameters: "/k ""{app}\bin\metar.exe"" -h"; WorkingDir: "{app}\bin";
Name: "{group}\Tools\yasim"; Filename: "cmd"; Parameters: "/k ""{app}\bin\yasim.exe"" -h"; WorkingDir: "{app}\bin";
2011-02-28 14:08:08 +00:00
Name: "{group}\Tools\Explore Documentation Folder"; Filename: "{app}\data\Docs"
; For running flightgear directly
2011-12-06 15:47:56 +00:00
; Name: "{userdesktop}\FlightGear {#FGVER}"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--fg-root=."; WorkingDir: "{app}"; Tasks: desktopicon
2011-02-28 14:08:08 +00:00
[Run]
2011-12-06 15:47:56 +00:00
Filename: "{app}\bin\vcredist_x86.exe"; WorkingDir: "{app}"; Parameters: "/passive /norestart"; Description: "Installing MS Visual C++ runtime components"
2011-02-28 14:08:08 +00:00
; Put installation directory into the fgrun.prefs
2011-12-06 15:47:56 +00:00
Filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}\bin"; Parameters: "--silent ""--fg-exe={app}\bin\fgfs.exe"" ""--ts-exe={app}\bin\terrasync.exe"" ""--fg-root={app}\data"" ""--fg-scenery={app}\data\Scenery;{app}\scenery;{code:TerrasyncDir}"" --ts-dir=3"
2011-02-28 14:08:08 +00:00
; Put installation and source directories into the fgadmin.prefs
2011-12-06 15:47:56 +00:00
Filename: "{app}\bin\fgadmin.exe"; WorkingDir: "{app}\bin"; Parameters: "--silent ""--install-source={src}\..\Scenery"" ""--scenery-dest={app}\scenery"""
2011-02-28 14:08:08 +00:00
Filename: "{app}\bin\oalinst.exe"; WorkingDir: "{app}"; Description: "Installing OpenAL"; Tasks: insoal
2011-12-06 15:47:56 +00:00
;Filename: "{app}\bin\fgrun.exe"; WorkingDir: "{app}"; Description: "Launch FlightGear"; Flags: postinstall skipifsilent
2011-02-28 14:08:08 +00:00
[Registry]
2011-08-17 05:56:11 +00:00
Root: HKLM; Subkey: "Software\flightgear.org"; ValueType: string; ValueName: "TerrasyncDir"; ValueData: "{code:TerrasyncDir}"
2011-02-28 14:08:08 +00:00
[Code]
var
TerrasyncDirPage: TInputDirWizardPage;
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://www.flightgear.org', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure CreateURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton);
var
URLLabel: TNewStaticText;
begin
URLLabel := TNewStaticText.Create(ParentForm);
URLLabel.Caption := 'www.flightgear.org';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := ParentForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := CancelButton.Top + CancelButton.Height - URLLabel.Height - 2;
URLLabel.Left := ScaleX(20);
end;
procedure InitializeWizard();
begin
TerrasyncDirPage := CreateInputDirPage(wpSelectDir,
'Select Terrasync Directory', 'Where should scenery downloaded by Terrasync be put?',
'Select the folder in which Terrasync would download additional scenery, then click Next.',
False, 'Terrasync Folder');
TerrasyncDirPage.Add('');
CreateURLLabel(WizardForm, WizardForm.CancelButton);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID = wpSelectDir then begin
TerrasyncDirPage.Values[0] := GetPreviousData( 'TerrasyncDir', ExpandConstant('{reg:HKLM\Software\flightgear.org,TerrasyncDir|{app}\terrasync}') );
end;
Result := True;
end;
function TerrasyncDir(Param: String): String;
begin
Result := TerrasyncDirPage.Values[0];
end;
procedure RegisterPreviousData(PreviousDataKey: Integer);
begin
{ Store the settings so we can restore them next time }
SetPreviousData(PreviousDataKey, 'TerrasyncDir', TerrasyncDirPage.Values[0]);
end;
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
S: String;
begin
S := '';
S := S + MemoDirInfo + NewLine + NewLine;
S := S + 'Terrasync folder:' + NewLine;
S := S + Space + TerrasyncDirPage.Values[0] + NewLine + NewLine;
S := S + MemoGroupInfo + NewLine + NewLine;
S := S + MemoTasksInfo + NewLine + NewLine;
Result := S;
end;