From 10145bb9381d95e286fb56b842eb5a977b027bfe Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 6 Jun 2022 01:25:08 +0200 Subject: [PATCH] build: add an option in the Windows installer to disable update check. This will allow to use the official Windows installer directly in the Windows Store, as per the new proposed workflow by Microsoft. Nevertheless our GIMP for Windows has a built-in update check which would check if a new version exist and warn people (advising them to go on the website and download the new installer to update). We obviously don't want this on the Windows Store which has its own update channel. It would be confusing. Therefore I added a feature to disable the built-in update check (not even showing in Preferences) by tweaking a single package variable. The installer now comes with new option /DISABLECHECKUPDATE=true which will add said variable. --- build/windows/installer/gimp3264.iss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build/windows/installer/gimp3264.iss b/build/windows/installer/gimp3264.iss index 6eaf6cd218..ebeaf320fe 100755 --- a/build/windows/installer/gimp3264.iss +++ b/build/windows/installer/gimp3264.iss @@ -897,6 +897,21 @@ begin SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK); end; end; + + // Disable check-update when run with specific option + if ExpandConstant('{param:disablecheckupdate|false}') = 'true' then + begin + EnvFile := ExpandConstant('{app}\share\gimp\{#DIR_VER}\gimp-release'); + DebugMsg('DisableCheckUpdate','Disabling check-update in ' + EnvFile); + + Env := 'check-update=false' + + if not SaveStringToUTF8File(EnvFile,Env,True) then + begin + DebugMsg('PrepareGimpEnvironment','Problem appending'); + SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK); + end; + end; end;