mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Update installer.iss
This commit is contained in:
@@ -123,14 +123,13 @@ Name: "{code:GetUserDesktopFolder}\{cm:ShortcutLauncher}"; Filename: "{app}\VCMI
|
|||||||
|
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: "desktop"; Description: "{cm:CreateDesktopShortcuts}"; GroupDescription: "{cm:SystemIntegration}"
|
Name: "desktop"; Description: "{cm:CreateDesktopShortcuts}"; GroupDescription: "{cm:SystemIntegration}"; Check: not IsPRInstaller
|
||||||
Name: "startmenu"; Description: "{cm:CreateStartMenuShortcuts}"; GroupDescription: "{cm:SystemIntegration}"
|
Name: "startmenu"; Description: "{cm:CreateStartMenuShortcuts}"; GroupDescription: "{cm:SystemIntegration}"; Check: not IsPRInstaller
|
||||||
Name: "fileassociation_h3m"; Description: "{cm:AssociateH3MFiles}"; GroupDescription: "{cm:SystemIntegration}"; Flags: unchecked
|
Name: "fileassociation_h3m"; Description: "{cm:AssociateH3MFiles}"; GroupDescription: "{cm:SystemIntegration}"; Flags: unchecked; Check: not IsPRInstaller
|
||||||
Name: "fileassociation_vcmimap"; Description: "{cm:AssociateVCMIMapFiles}"; GroupDescription: "{cm:SystemIntegration}"
|
Name: "fileassociation_vcmimap"; Description: "{cm:AssociateVCMIMapFiles}"; GroupDescription: "{cm:SystemIntegration}"; Check: not IsPRInstaller
|
||||||
|
|
||||||
Name: "firewallrules"; Description: "{cm:AddFirewallRules}"; GroupDescription: "{cm:VCMISettings}"; Check: IsAdminInstallMode
|
|
||||||
Name: "h3copyfiles"; Description: "{cm:CopyH3Files}"; GroupDescription: "{cm:VCMISettings}"; Check: IsHeroes3Installed and IsCopyFilesNeeded
|
|
||||||
|
|
||||||
|
Name: "firewallrules"; Description: "{cm:AddFirewallRules}"; GroupDescription: "{cm:VCMISettings}"; Check: not IsPRInstaller and IsAdminInstallMode
|
||||||
|
Name: "h3copyfiles"; Description: "{cm:CopyH3Files}"; GroupDescription: "{cm:VCMISettings}"; Check: not IsPRInstaller and IsHeroes3Installed and IsCopyFilesNeeded
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKCU; Subkey: "Software\{#VCMIFolder}"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"; Flags: uninsdeletekey
|
Root: HKCU; Subkey: "Software\{#VCMIFolder}"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"; Flags: uninsdeletekey
|
||||||
@@ -172,7 +171,6 @@ var
|
|||||||
InstallModePage: TInputOptionWizardPage;
|
InstallModePage: TInputOptionWizardPage;
|
||||||
FooterLabel: TLabel;
|
FooterLabel: TLabel;
|
||||||
IsUpgrade: Boolean;
|
IsUpgrade: Boolean;
|
||||||
IsPR: Boolean;
|
|
||||||
Heroes3Path: String;
|
Heroes3Path: String;
|
||||||
GlobalUserName: String;
|
GlobalUserName: String;
|
||||||
GlobalUserDocsFolder: String;
|
GlobalUserDocsFolder: String;
|
||||||
@@ -465,6 +463,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function IsPRInstaller(): Boolean;
|
||||||
|
begin
|
||||||
|
// Check if is PR build
|
||||||
|
Result := Pos('-PR-', ExpandConstant('{#InstallerName}')) > 0;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function InitializeSetup(): Boolean;
|
function InitializeSetup(): Boolean;
|
||||||
var
|
var
|
||||||
InstallPath: String;
|
InstallPath: String;
|
||||||
@@ -519,10 +525,6 @@ end;
|
|||||||
|
|
||||||
procedure InitializeWizard();
|
procedure InitializeWizard();
|
||||||
begin
|
begin
|
||||||
|
|
||||||
// Detect if installer name contains "-PR-"
|
|
||||||
IsPR := Pos('-PR-', ExpandConstant('{#InstallerName}')) > 0;
|
|
||||||
|
|
||||||
// Check if the application is already installed
|
// Check if the application is already installed
|
||||||
if not IsUpgrade then
|
if not IsUpgrade then
|
||||||
begin
|
begin
|
||||||
@@ -585,7 +587,7 @@ begin
|
|||||||
Result := False; // Default is not to skip the page
|
Result := False; // Default is not to skip the page
|
||||||
|
|
||||||
// Skip Tasks page if this is a PR build
|
// Skip Tasks page if this is a PR build
|
||||||
if IsPR and (PageID = wpSelectTasks) then
|
if IsPRInstaller and (PageID = wpSelectTasks) then
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
Exit;
|
Exit;
|
||||||
@@ -608,14 +610,6 @@ var
|
|||||||
begin
|
begin
|
||||||
// Ensure the footer message is visible on every page
|
// Ensure the footer message is visible on every page
|
||||||
FooterLabel.Visible := True;
|
FooterLabel.Visible := True;
|
||||||
|
|
||||||
if IsPR then
|
|
||||||
begin
|
|
||||||
// Uncheck all tasks manually for PR builds
|
|
||||||
for i := 0 to WizardForm.TasksList.Items.Count - 1 do
|
|
||||||
WizardForm.TasksList.Checked[i] := False;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -886,3 +880,4 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user