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.

(cherry picked from commit 10145bb938)
This commit is contained in:
Jehan 2022-06-06 01:25:08 +02:00
parent 32ffd69faa
commit 654571a50e

View File

@ -884,6 +884,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;