2016-08-18 10:17:14 +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
;
2020-12-23 10:05:05 +00:00
; Note: Files root path is defined in the FgHarnessPath (in InstallConfig.iss)
;
; For example if You want to use X: drive as a root path
2016-08-18 10:17:14 +00:00
; 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:\
2016-09-28 22:11:14 +00:00
;
2020-12-23 10:05:05 +00:00
;
; InstallConfig.iss example content:
;
; #define FGHarnessPath "x:"
; #define FGVersion "2020.4.1"
; #define FGVersionGroup "2020.4"
; #define OSGVersion "3.0.0"
; #define OSGSoNumber "2"
; #define OTSoNumber "3"
; #define FGDetails "-nightly"
; #define IncludeData "FALSE"
2016-08-18 10:17:14 +00:00
#include "InstallConfig.iss"
2020-12-23 10:05:05 +00:00
#define FGSourcePath FgHarnessPath + "\flightgear"
#define InstallDir64 FgHarnessPath + "\install\msvc140-64"
2016-08-18 10:17:14 +00:00
#define OSG64InstallDir InstallDir64 + "\OpenSceneGraph"
#define OSG64PluginsDir OSG64InstallDir + "\bin\osgPlugins-" + OSGVersion
2020-12-23 10:05:05 +00:00
#define ThirdPartyDir FgHarnessPath + "\windows-3rd-party\msvc140"
2016-08-18 10:17:14 +00:00
; we copy everything in install/<arch>/bin except these, which aren't
; useful to the end-user to ship
2020-05-24 20:12:24 +00:00
#define ExcludedBinaries "*smooth.exe,metar.exe"
2016-08-18 10:17:14 +00:00
[Setup]
2020-12-23 10:05:05 +00:00
AppId=FlightGear_{#FGVersionGroup}
2016-08-18 10:17:14 +00:00
AppName=FlightGear
AppPublisher=The FlightGear Team
OutputBaseFilename=FlightGear-{#FGVersion}{#FGDetails}
AppVerName=FlightGear v{#FGVersion}
2020-12-23 10:05:05 +00:00
AppVersion={#FGVersion}
2016-08-18 10:17:14 +00:00
AppPublisherURL=http://www.flightgear.org
AppSupportURL=http://www.flightgear.org
AppUpdatesURL=http://www.flightgear.org
2020-12-23 10:05:05 +00:00
DefaultDirName={pf}\FlightGear {#FGVersionGroup}
2016-08-18 10:17:14 +00:00
UsePreviousAppDir=no
2020-12-23 10:05:05 +00:00
DefaultGroupName=FlightGear {#FGVersionGroup}
2016-08-18 10:17:14 +00:00
UsePreviousGroup=no
2020-12-23 10:05:05 +00:00
LicenseFile={#FGSourcePath}\COPYING
2016-08-18 10:17:14 +00:00
Uninstallable=yes
2020-12-23 10:05:05 +00:00
SetupIconFile={#FGSourcePath}\package\flightgear.ico
2016-08-18 10:17:14 +00:00
VersionInfoVersion={#FGVersion}.0
2020-12-23 10:05:05 +00:00
WizardImageFile={#FGSourcePath}\package\windows\setupimg.bmp
2016-08-18 10:17:14 +00:00
WizardImageStretch=No
2020-12-23 10:05:05 +00:00
WizardSmallImageFile={#FGSourcePath}\package\windows\setupsmall.bmp
2016-08-18 10:17:14 +00:00
VersionInfoCompany=The FlightGear Team
UninstallDisplayIcon={app}\bin\fgfs.exe
ArchitecturesInstallIn64BitMode=x64
2020-10-15 11:18:55 +00:00
ArchitecturesAllowed=x64
2016-08-18 10:17:14 +00:00
; Sign tool must be defined in the Inno Setup GUI, to avoid
; exposing the certificate password
2017-10-02 11:36:40 +00:00
; SignTool=fg_code_sign1
2016-08-18 10:17:14 +00:00
[Tasks]
2020-12-23 10:05:05 +00:00
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "Additional icons:"
2016-08-18 10:17:14 +00:00
[Files]
; 64 bits install
Source: "{#InstallDir64}\bin\*.*"; DestDir: "{app}\bin"; Excludes: "{#ExcludedBinaries}"; Flags: ignoreversion recursesubdirs; Check: Is64BitInstallMode
2016-11-18 07:52:27 +00:00
;locale only exists for fgrun - which has been disabled
;Source: "{#InstallDir64}\share\locale\*"; DestDir: "{app}\bin\locale"; Flags: ignoreversion recursesubdirs; Check: Is64BitInstallMode
2016-08-18 10:17:14 +00:00
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\zlib.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
2021-01-10 12:00:07 +00:00
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\liblzma.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
2016-08-18 10:17:14 +00:00
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\OpenAL32.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libpng.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libcurl.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\libintl-8.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
2020-04-18 18:54:00 +00:00
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\sentry.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\crashpad_handler.exe"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
2019-05-23 10:02:10 +00:00
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\dbus-1-3.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
2019-05-17 08:54:29 +00:00
Source: "{#ThirdPartyDir}\3rdParty.x64\bin\event_core.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
2016-08-18 10:17:14 +00:00
; Include the base package
#if IncludeData == "TRUE"
2020-12-23 10:05:05 +00:00
Source: "{#FgHarnessPath}\fgdata\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
2016-08-18 10:17:14 +00:00
#endif
; 64 bits install
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgGA.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgParticle.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgText.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgUtil.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgViewer.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgSim.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgFX.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
2020-11-14 20:13:52 +00:00
Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgTerrain.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
2016-08-18 10:17:14 +00:00
Source: "{#OSG64InstallDir}\bin\ot{#OTSoNumber}-OpenThreads.dll"; DestDir: "{app}\bin"; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_ac.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_osga.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_3ds.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_mdl.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_jpeg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_dds.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_tiff.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
Source: "{#OSG64PluginsDir}\osgdb_freetype.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osganimation.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgfx.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgmanipulator.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgparticle.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgshadow.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgsim.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgterrain.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgtext.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_serializers_osgvolume.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_deprecated_osg.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
;Source: "{#OSG64PluginsDir}\osgdb_deprecated_osgparticle.dll"; DestDir: "{app}\bin\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode
2020-12-23 10:05:05 +00:00
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"; InfoBeforeFile: "{#FGSourcePath}\package\windows\infobefore-en.txt"
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"; InfoBeforeFile: "{#FGSourcePath}\package\windows\infobefore-pl.txt"
[Messages]
ConfirmUninstall=Are you sure you want to completely remove %1 {#FGVersion} and all of its components?
pl.ConfirmUninstall=Czy na pewno chcesz ca<63> kowicie usun<75> <6E> %1 {#FGVersion} i wszystkie jego komponenty?
[CustomMessages]
CreateDesktopIcon=Create a &desktop icon
RemoveAllSettings=Remove all settings, downloaded scenery and aircraft
RemoveAllSettingsDescription=FlightGear stores some settings in your user folder. In addition, scenery or aircraft data may have been downloaded to the download directory. To completely remove all these files, select this option.
FirewallFgException=Allows FlightGear to send and receive data over the multiplayer network and to get METARs.
FirewallFgcomException=Allows FGCom to establish a connection to FlightGear and the VoIP server for voice ATC communication.
pl.CreateDesktopIcon=Utw<74> rz ikony na pulpicie
pl.RemoveAllSettings=Usu<73> wszystkie ustawienia, pobran<61> sceneri<72> i samoloty
pl.RemoveAllSettingsDescription=FlightGear zapisuje niekt<6B> re ustawienia w katalogach u<> ytkownika. Dodatkowo, sceneria lub dane statk<74> w powietrznych mog<6F> by<62> pobierane do katalogu pobra<72> . Aby ca<63> kowicie usun<75> <6E> te ustawienia, wybierz t<> opcj<63> .
pl.FirewallFgException=Pozwala aplikacji FlightGear na wysy<73> anie i pobieranie danych przez sie<69> multiplayer oraz aby pobra<72> dane pogodowe METAR.
pl.FirewallFgcomException=Pozwala aplikacji FGCom na ustanowienie po<70> <6F> czenia do aplikacji FlightGear i do serwer<65> w VoIP dla komunikacji g<> osowej z ATC (kontrolerem lot<6F> w).
2016-08-18 10:17:14 +00:00
[Dirs]
; Make the user installable scenery directory
2020-12-23 10:05:05 +00:00
Name: "{%USERPROFILE}\FlightGear\Downloads"; Permissions: creatorowner-modify; Check: not DirExists(ExpandConstant('{%USERPROFILE}\FlightGear\Downloads'))
Name: "{%USERPROFILE}\FlightGear\Custom Aircraft"; Permissions: creatorowner-modify; Check: not DirExists(ExpandConstant('{%USERPROFILE}\FlightGear\Custom Aircraft'))
Name: "{%USERPROFILE}\FlightGear\Custom Scenery"; Permissions: creatorowner-modify; Check: not DirExists(ExpandConstant('{%USERPROFILE}\FlightGear\Custom Scenery'))
2016-08-18 10:17:14 +00:00
[Icons]
2020-12-23 10:05:05 +00:00
Name: "{userdesktop}\FlightGear {#FGVersionGroup}"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--launcher"; WorkingDir: "{app}\bin"; Tasks: desktopicon;
Name: "{group}\FlightGear {#FGVersionGroup}"; Filename: "{app}\bin\fgfs.exe"; Parameters: "--launcher"; WorkingDir: "{app}\bin";
2016-08-18 10:17:14 +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"
2020-12-23 10:05:05 +00:00
Name: "{group}\Tools\Uninstall FlightGear {#FGVersion}"; Filename: "{uninstallexe}"
2016-08-18 10:17:14 +00:00
Name: "{group}\Tools\fgjs"; Filename: "cmd"; Parameters: "/k fgjs.exe ""--fg-root={app}\data"""; WorkingDir: "{app}\bin"
Name: "{group}\Tools\yasim"; Filename: "cmd"; Parameters: "/k ""{app}\bin\yasim.exe"" -h"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\fgpanel"; Filename: "cmd"; Parameters: "/k ""{app}\bin\fgpanel.exe"" -h"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\FGCom"; Filename: "{app}\bin\fgcom.exe"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\FGCom-testing"; Filename: "{app}\bin\fgcom.exe"; Parameters: "--frequency=910"; WorkingDir: "{app}\bin"
Name: "{group}\Tools\Explore Documentation Folder"; Filename: "{app}\data\Docs"
[Code]
const
NET_FW_SCOPE_ALL = 0;
NET_FW_IP_VERSION_ANY = 2;
NET_FW_ACTION_ALLOW = 1;
NET_FW_RULE_DIR_ALL = 0;
NET_FW_RULE_DIR_IN = 1;
NET_FW_RULE_DIR_OUT = 2;
NET_FW_IP_PROTOCOL_ALL = 0;
NET_FW_IP_PROTOCOL_TCP = 6;
NET_FW_IP_PROTOCOL_UDP = 17;
NET_FW_PROFILE2_DOMAIN = 1;
NET_FW_PROFILE2_PRIVATE = 2;
NET_FW_PROFILE2_PUBLIC = 4;
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;
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
S: String;
begin
S := '';
S := S + MemoDirInfo + NewLine + NewLine;
S := S + MemoGroupInfo + NewLine + NewLine;
S := S + MemoTasksInfo + NewLine + NewLine;
Result := S;
end;
procedure AddBasicFirewallException(AppName, FileName: String);
var
FirewallObject: variant;
RuleObject: variant;
begin
try
FirewallObject := CreateOleObject('HNetCfg.FwMgr');
RuleObject := CreateOleObject('HNetCfg.FwAuthorizedApplication');
RuleObject.ProcessImageFileName := FileName;
RuleObject.Name := AppName;
RuleObject.Scope := NET_FW_SCOPE_ALL;
RuleObject.IpVersion := NET_FW_IP_VERSION_ANY;
RuleObject.Enabled := true;
FirewallObject.LocalPolicy.CurrentProfile.AuthorizedApplications.Add(RuleObject);
except
end;
end;
procedure AddAdvancedFirewallException(AppName, AppDescription, FileName: String; Protocol: Integer; LocalPorts, RemotePorts: String; Direction: Integer);
var
FirewallObject: variant;
RuleObject: variant;
begin
try
FirewallObject := CreateOleObject('HNetCfg.FwPolicy2');
RuleObject := CreateOleObject('HNetCfg.FWRule');
RuleObject.Name := AppName;
RuleObject.Description := AppDescription;
RuleObject.ApplicationName := FileName;
if (Protocol <> NET_FW_IP_PROTOCOL_ALL) then
RuleObject.Protocol := Protocol;
if (LocalPorts <> '') then
RuleObject.LocalPorts := LocalPorts;
if (RemotePorts <> '') then
RuleObject.RemotePorts := RemotePorts;
if (Direction <> NET_FW_RULE_DIR_ALL) then
RuleObject.Direction := Direction;
RuleObject.Enabled := true;
RuleObject.Grouping := 'FlightGear';
RuleObject.Profiles := NET_FW_PROFILE2_DOMAIN + NET_FW_PROFILE2_PRIVATE + NET_FW_PROFILE2_PUBLIC;
RuleObject.Action := NET_FW_ACTION_ALLOW;
RuleObject.RemoteAddresses := '*';
FirewallObject.Rules.Add(RuleObject);
except
end;
end;
procedure RemoveFirewallException(AppName, FileName: String);
var
FirewallObject: variant;
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
try
if (Version.Major >= 6) then
begin
FirewallObject := CreateOleObject('HNetCfg.FwPolicy2');
FirewallObject.Rules.Remove(AppName);
end
else if (Version.Major = 5) and (((Version.Minor = 1) and (Version.ServicePackMajor >= 2)) or ((Version.Minor = 2) and (Version.ServicePackMajor >= 1))) then
begin
FirewallObject := CreateOleObject('HNetCfg.FwMgr');
FirewallObject.LocalPolicy.CurrentProfile.AuthorizedApplications.Remove(FileName);
end;
except
end;
end;
2018-01-17 21:48:21 +00:00
var
UninstallCheckCleanPage: TNewNotebookPage;
UninstallBackButton: TNewButton;
UninstallNextButton: TNewButton;
DoCleanCheckbox : TNewCheckBox;
CleanHelp : TNewStaticText;
procedure InitializeUninstallProgressForm();
begin
UninstallCheckCleanPage := TNewNotebookPage.Create(UninstallProgressForm);
UninstallCheckCleanPage.Notebook := UninstallProgressForm.InnerNotebook;
UninstallCheckCleanPage.Parent := UninstallProgressForm.InnerNotebook;
UninstallCheckCleanPage.Align := alClient
DoCleanCheckbox := TNewCheckBox.Create(UninstallProgressForm);
DoCleanCheckbox.Parent := UninstallCheckCleanPage;
2020-12-23 10:05:05 +00:00
DoCleanCheckbox.Caption := ExpandConstant('{cm:RemoveAllSettings}');
2018-01-17 21:48:21 +00:00
DoCleanCheckbox.Left := ScaleX(10);
DoCleanCheckbox.Top := ScaleY(10);
DoCleanCheckbox.Width := UninstallProgressForm.InnerNotebook.Width - ScaleX(20)
DoCleanCheckbox.Height := ScaleY(30)
CleanHelp := TNewStaticText.Create(UninstallProgressForm);
CleanHelp.Parent := UninstallCheckCleanPage;
CleanHelp.Top := DoCleanCheckbox.Top + DoCleanCheckbox.Height + ScaleY(10);
CleanHelp.Left := DoCleanCheckbox.Left;
CleanHelp.Width := DoCleanCheckbox.Width;
CleanHelp.Height := CleanHelp.AdjustHeight();
CleanHelp.WordWrap := True;
2020-12-23 10:05:05 +00:00
CleanHelp.Caption := ExpandConstant('{cm:RemoveAllSettingsDescription}');
2018-01-17 21:48:21 +00:00
UninstallProgressForm.InnerNotebook.ActivePage := UninstallCheckCleanPage;
UninstallNextButton := TNewButton.Create(UninstallProgressForm);
UninstallNextButton.Caption := 'Next';
UninstallNextButton.Parent := UninstallProgressForm;
UninstallNextButton.Left :=
UninstallProgressForm.CancelButton.Left -
UninstallProgressForm.CancelButton.Width -
ScaleX(10);
UninstallNextButton.Top := UninstallProgressForm.CancelButton.Top;
UninstallNextButton.Width := UninstallProgressForm.CancelButton.Width;
UninstallNextButton.Height := UninstallProgressForm.CancelButton.Height;
UninstallNextButton.ModalResult := mrOk;
UninstallProgressForm.CancelButton.Enabled := True;
UninstallProgressForm.CancelButton.ModalResult := mrCancel;
if UninstallProgressForm.ShowModal = mrCancel then Abort;
UninstallProgressForm.InnerNotebook.ActivePage := UninstallProgressForm.InstallingPage;
end;
2016-08-18 10:17:14 +00:00
procedure CurStepChanged(CurStep: TSetupStep);
var
Version: TWindowsVersion;
begin
if CurStep = ssPostInstall then
begin
GetWindowsVersionEx(Version);
if (Version.Major >= 6) then
begin
{ IN and OUT rules must be specified separately, otherwise the firewall will create only the IN rule }
2020-12-23 10:05:05 +00:00
AddAdvancedFirewallException('FlightGear', ExpandConstant('{cm:FirewallFgException}'), ExpandConstant('{app}') + '\bin\fgfs.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_IN);
AddAdvancedFirewallException('FlightGear', ExpandConstant('{cm:FirewallFgException}'), ExpandConstant('{app}') + '\bin\fgfs.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_OUT);
AddAdvancedFirewallException('FlightGear FGCom', ExpandConstant('{cm:FirewallFgcomException}'), ExpandConstant('{app}') + '\bin\fgcom.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_IN);
AddAdvancedFirewallException('FlightGear FGCom', ExpandConstant('{cm:FirewallFgcomException}'), ExpandConstant('{app}') + '\bin\fgcom.exe', NET_FW_IP_PROTOCOL_ALL, '', '', NET_FW_RULE_DIR_OUT);
2016-08-18 10:17:14 +00:00
end
else if (Version.Major = 5) and (((Version.Minor = 1) and (Version.ServicePackMajor >= 2)) or ((Version.Minor = 2) and (Version.ServicePackMajor >= 1))) then
begin
{ The Windows XP/Server 2003 firewall does not block outgoing connections at all, so only listening processes should be added }
AddBasicFirewallException('FlightGear', ExpandConstant('{app}') + '\bin\fgfs.exe');
AddBasicFirewallException('FlightGear FGCom', ExpandConstant('{app}') + '\bin\fgcom.exe');
end;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
2018-01-17 21:48:21 +00:00
var ResultCode: Integer;
2016-08-18 10:17:14 +00:00
begin
2018-01-17 21:48:21 +00:00
if CurUninstallStep = usUninstall then
begin
if DoCleanCheckbox.Checked = True then
begin
Log('Running clean uninstall');
Exec(ExpandConstant('{app}\bin\fgfs.exe'), '--uninstall', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
Log('clean uninstall completed');
end;
end;
2016-08-18 10:17:14 +00:00
if CurUninstallStep = usPostUninstall then
begin
RemoveFirewallException('FlightGear', ExpandConstant('{app}') + '\bin\fgfs.exe');
RemoveFirewallException('FlightGear FGCom', ExpandConstant('{app}') + '\bin\fgcom.exe');
end;
end;