From 7e575db7921717befbda86e1a39de4f8708145ee Mon Sep 17 00:00:00 2001 From: Raresh Nistor Date: Mon, 22 Mar 2021 14:08:09 +1300 Subject: [PATCH] make paths relative --- BuildScripts/BuildInstaller.ps1 | 7 +++++-- Installer/Setup.iss | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/BuildScripts/BuildInstaller.ps1 b/BuildScripts/BuildInstaller.ps1 index 38ca52d..a871147 100644 --- a/BuildScripts/BuildInstaller.ps1 +++ b/BuildScripts/BuildInstaller.ps1 @@ -2,7 +2,9 @@ $innoPath = "C:\Program Files (x86)\Inno Setup 6" $projectVersion = Get-ProjectVersion -$runtimeInstallerPath = "Installer/windowsdesktop-runtime-5.0.4-win-x86.exe" +$platform = "win-x86" # installer is always x86, cbf making x64 or arm64 for now + +$runtimeInstallerPath = "Installer/windowsdesktop-runtime-5.0.4-$platform.exe" # if the .net runtime isn't downloaded, download it if (-not ( Test-Path -Path $runtimeInstallerPath )) { @@ -15,7 +17,8 @@ if (-not ( Test-Path -Path $runtimeInstallerPath )) { & "$innoPath/iscc.exe" ` /DMyAppVersion="$projectVersion" ` /DRuntimeInstallerPath="$runtimeInstallerPath" ` + /DAppPlatform="$platform" ` Installer/Setup.iss # move the installer to releases -mv -Force "Installer/Output/win-x86-installer.exe" "Releases/" +mv -Force "Installer/Output/$platform-installer.exe" "Releases/" diff --git a/Installer/Setup.iss b/Installer/Setup.iss index 7ec6049..4b9ca6a 100644 --- a/Installer/Setup.iss +++ b/Installer/Setup.iss @@ -30,12 +30,12 @@ DisableProgramGroupPage=yes ; Uncomment the following line to run in non administrative install mode (install for current user only.) ;PrivilegesRequired=lowest PrivilegesRequiredOverridesAllowed=dialog -OutputBaseFilename=win-x86-installer -SetupIconFile=D:\Sources\SuperSize\Assets\Logo\Installer.ico +OutputBaseFilename={#AppPlatform}-installer +SetupIconFile=..\Assets\Logo\Installer.ico Compression=lzma SolidCompression=yes -WizardImageFile=D:\Sources\SuperSize\Installer\WizModernImage.bmp -WizardSmallImageFile=D:\Sources\SuperSize\Installer\WizModernSmallImage.bmp +WizardImageFile=WizModernImage.bmp +WizardSmallImageFile=WizModernSmallImage.bmp [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" @@ -55,7 +55,7 @@ Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: de [Run] Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}" -Filename: "{app}\windowsdesktop-runtime-5.0.4-win-x86.exe"; Parameters: "/install /quiet /norestart"; Description: "Install .NET Runtime"; StatusMsg: "Installing .NET 5 Desktop Runtime" +Filename: "{app}\windowsdesktop-runtime-5.0.4-{#AppPlatform}.exe"; Parameters: "/install /quiet /norestart"; Description: "Install .NET Runtime"; StatusMsg: "Installing .NET 5 Desktop Runtime" [InstallDelete] -Type: files; Name: "{app}\windowsdesktop-runtime-5.0.4-win-x86.exe" +Type: files; Name: "{app}\windowsdesktop-runtime-5.0.4-{#AppPlatform}.exe"