1 ; Script generated by the Inno Setup Script Wizard.
2 ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
4 ; This script creates an installable FlightGear package for Win32 using the
5 ; "Inno Setup" package builder. Inno Setup is free (but probably not open
6 ; source?.) The official web site for this package building software is:
8 ; http://www.jrsoftware.org/isinfo.php
10 ; Note: the files must appear in the X: drive.
11 ; You can do this with the command below:
13 ; subst X: path_to_files
17 ; C:\> subst X: F:\Path\to\FlightGear\root
24 AppPublisher=The FlightGear Team
25 OutputBaseFilename=fgsetup-2.0.0-RC3
26 AppVerName=FlightGear v2.0.0-RC3
27 AppPublisherURL=http://www.flightgear.org
28 AppSupportURL=http://www.flightgear.org
29 AppUpdatesURL=http://www.flightgear.org
30 DefaultDirName={pf}\FlightGear
31 DefaultGroupName=FlightGear v2.0.0-RC3
32 LicenseFile=X:\data\COPYING
34 SetupIconFile=x:\flightgear.ico
35 VersionInfoVersion=1.9.9.993
36 WizardImageFile=X:\setupimg.bmp
38 WizardSmallImageFile=X:\setupsmall.bmp
39 VersionInfoCompany=The FlightGear Team
40 UninstallDisplayIcon={app}\bin\Win32\fgrun.exe
43 ; 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.
44 Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
45 Name: "insoal"; Description: "Install OpenAL (the sound engine)"
48 ; NOTE: run subst X: F:\ (or whatever path the expanded tree resides at)
49 Source: "X:\*.txt"; DestDir: "{app}"; Flags: ignoreversion
50 Source: "X:\bin\Win32\*.*"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion recursesubdirs
51 Source: "X:\bin\vcredist_x86.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
52 Source: "X:\bin\OpenAL\oalinst.exe"; DestDir: "{app}\bin\OpenAL"; Flags: ignoreversion
53 Source: "X:\data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs
54 ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
57 ; Make the user installable scenery directory
58 Name: "{app}\scenery"; Permissions: everyone-modify
59 Name: "{code:TerrasyncDir}"; Permissions: everyone-modify
62 Name: "{group}\FlightGear Launcher"; Filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}";
63 ; Name: "{group}\FlightGear"; Filename: "{app}\bin\Win32\fgfs.exe"; Parameters: "--fg-root=."; WorkingDir: "{app}";
64 Name: "{group}\FlightGear Manual"; Filename: "{app}\data\Docs\getstart.pdf"
65 Name: "{group}\FlightGear Documentation"; Filename: "{app}\data\Docs\index.html"
66 Name: "{group}\Flightgear Wiki"; Filename: "http://wiki.flightgear.org"
67 Name: "{userdesktop}\FlightGear v2.0.0-RC3"; Filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}"; Tasks: desktopicon
69 Name: "{group}\Tools\Install & Uninstall Scenery"; Filename: "{app}\bin\Win32\fgadmin.exe"; WorkingDir: "{app}";
70 Name: "{group}\Tools\TerraSync"; Filename: "{app}\bin\Win32\terrasync.exe"; Parameters: "-S -p 5505 -d ""{app}\terrasync"""; WorkingDir: "{app}";
71 Name: "{group}\Tools\Uninstall FlightGear"; Filename: "{uninstallexe}"
73 Name: "{group}\Tools\js_demo"; Filename: "{app}\bin\Win32\js_demo.exe"
74 Name: "{group}\Tools\fgjs"; Filename: "cmd"; Parameters: "/k fgjs.exe ""--fg-root={app}\data"""; WorkingDir: "{app}\bin\Win32";
75 Name: "{group}\Tools\GPSsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\GPSsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32";
76 Name: "{group}\Tools\UGsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\UGsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32";
77 Name: "{group}\Tools\MIDSsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\MIDSsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32";
78 Name: "{group}\Tools\metar"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\metar.exe"" -h"; WorkingDir: "{app}\bin\Win32";
79 Name: "{group}\Tools\yasim"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\yasim.exe"" -h"; WorkingDir: "{app}\bin\Win32";
81 Name: "{group}\Tools\Explore Documentation Folder"; Filename: "{app}\data\Docs"
83 ; For running flightgear directly
84 ; Name: "{userdesktop}\FlightGear v2.0.0"; Filename: "{app}\bin\Win32\fgfs.exe"; Parameters: "--fg-root=."; WorkingDir: "{app}"; Tasks: desktopicon
87 Filename: "{app}\bin\vcredist_x86.exe"; WorkingDir: "{app}"; Parameters: "/qb!"; Description: "Installing Flightgear prerequisites"
89 ; Put installation directory into the fgrun.prefs
90 filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}\bin\Win32"; Parameters: "--silent ""--fg-exe={app}\bin\Win32\fgfs.exe"" ""--ts-exe={app}\bin\Win32\terrasync.exe"" ""--fg-root={app}\data"" ""--fg-scenery={app}\data\Scenery;{app}\scenery;{code:TerrasyncDir}"" --ts-dir=3"
92 ; Put installation and source directories into the fgadmin.prefs
93 filename: "{app}\bin\Win32\fgadmin.exe"; WorkingDir: "{app}\bin\Win32"; Parameters: "--silent ""--install-source={src}\..\Scenery"" ""--scenery-dest={app}\scenery"""
94 Filename: "{app}\bin\OpenAL\oalinst.exe"; WorkingDir: "{app}"; Description: "Installing OpenAL"; Tasks: insoal
95 ;Filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}"; Description: "Launch FlightGear"; Flags: postinstall skipifsilent
99 TerrasyncDirPage: TInputDirWizardPage;
101 procedure URLLabelOnClick(Sender: TObject);
105 ShellExec('open', 'http://www.flightgear.org', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
108 procedure CreateURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton);
110 URLLabel: TNewStaticText;
112 URLLabel := TNewStaticText.Create(ParentForm);
113 URLLabel.Caption := 'www.flightgear.org';
114 URLLabel.Cursor := crHand;
115 URLLabel.OnClick := @URLLabelOnClick;
116 URLLabel.Parent := ParentForm;
117 { Alter Font *after* setting Parent so the correct defaults are inherited first }
118 URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
119 URLLabel.Font.Color := clBlue;
120 URLLabel.Top := CancelButton.Top + CancelButton.Height - URLLabel.Height - 2;
121 URLLabel.Left := ScaleX(20);
124 procedure InitializeWizard();
126 TerrasyncDirPage := CreateInputDirPage(wpSelectDir,
127 'Select Terrasync Directory', 'Where should scenery downloaded by Terrasync be put?',
128 'Select the folder in which Terrasync would download additional scenery, then click Next.',
129 False, 'New Folder');
130 TerrasyncDirPage.Add('');
132 CreateURLLabel(WizardForm, WizardForm.CancelButton);
135 function NextButtonClick(CurPageID: Integer): Boolean;
137 if CurPageID = wpSelectDir then begin
138 TerrasyncDirPage.Values[0] := GetPreviousData( 'TerrasyncDir', ExpandConstant('{app}\terrasync') );
143 function TerrasyncDir(Param: String): String;
145 Result := TerrasyncDirPage.Values[0];
148 procedure RegisterPreviousData(PreviousDataKey: Integer);
150 { Store the settings so we can restore them next time }
151 SetPreviousData(PreviousDataKey, 'TerrasyncDir', TerrasyncDirPage.Values[0]);