From a0fb9bc4abfce995f884d541cf2efdb9ee9b0b14 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 7 Aug 2021 06:57:33 +0200 Subject: [PATCH] Setup: Skip LttP Rom Selection if the Rom is not needed. --- inno_setup_38.iss | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/inno_setup_38.iss b/inno_setup_38.iss index 206a0ca6..287074b0 100644 --- a/inno_setup_38.iss +++ b/inno_setup_38.iss @@ -29,6 +29,7 @@ ArchitecturesAllowed=x64 AllowNoIcons=yes SetupIconFile={#MyAppIcon} UninstallDisplayIcon={app}\{#MyAppExeName} +; you will likely have to remove the following signtool line when testing/debugging localy. Don't include that change in PRs. SignTool= signtool LicenseFile= LICENSE WizardStyle= modern @@ -126,7 +127,6 @@ end; var ROMFilePage: TInputFileWizardPage; var R : longint; var rom: string; - procedure InitializeWizard(); begin rom := FileSearch('Zelda no Densetsu - Kamigami no Triforce (Japan).sfc', WizardDirValue()); @@ -144,7 +144,7 @@ begin rom := '' ROMFilePage := CreateInputFilePage( - wpLicense, + wpSelectComponents, 'Select ROM File', 'Where is your Zelda no Densetsu - Kamigami no Triforce (Japan).sfc located?', 'Select the file, then click Next.'); @@ -155,6 +155,13 @@ begin '.sfc'); end; +function ShouldSkipPage(PageID: Integer): Boolean; +begin + Result := False; + if PageID = ROMFilePage.ID then + Result := not (WizardIsComponentSelected('client/lttp') or WizardIsComponentSelected('generator')); +end; + function GetROMPath(Param: string): string; begin if Length(rom) > 0 then