build/windows: Do revisioning stuff with Inno scripting
Also, fixes CUSTOM_GIMP_VERSION format.
This commit is contained in:
@ -77,7 +77,7 @@ if ($revision -notmatch '[1-9]' -or $CI_PIPELINE_SOURCE -eq 'schedule')
|
||||
}
|
||||
else
|
||||
{
|
||||
$CUSTOM_GIMP_VERSION = "$CUSTOM_GIMP_VERSION.$revision"
|
||||
$CUSTOM_GIMP_VERSION = "$CUSTOM_GIMP_VERSION-$revision"
|
||||
}
|
||||
Write-Output "(INFO): GIMP version: $CUSTOM_GIMP_VERSION"
|
||||
|
||||
@ -201,11 +201,6 @@ foreach ($bundle in $supported_archs)
|
||||
$gimp_api_version = Get-Content "$CONFIG_PATH" | Select-String 'GIMP_PKGCONFIG_VERSION' |
|
||||
Foreach-Object {$_ -replace '#define GIMP_PKGCONFIG_VERSION "',''} | Foreach-Object {$_ -replace '"',''}
|
||||
|
||||
## GIMP revision on about dialog (this does the same as '-Drevision' build option)
|
||||
## FIXME: This should be done with Inno scripting
|
||||
(Get-Content "$bundle\share\gimp\*\gimp-release") | Foreach-Object {$_ -replace "revision=0","revision=$revision"} |
|
||||
Set-Content "$bundle\share\gimp\*\gimp-release"
|
||||
|
||||
## Split .debug symbols
|
||||
if ("$bundle" -eq "$GIMP32")
|
||||
{
|
||||
|
@ -1528,7 +1528,7 @@ end; //PrepareInterp
|
||||
|
||||
//Create .env files
|
||||
procedure PrepareGimpEnvironment();
|
||||
var EnvFile,Env: String;
|
||||
var EnvFile,Env,sTemp: String;
|
||||
begin
|
||||
StatusLabel(CustomMessage('SettingUpEnvironment'),'');
|
||||
|
||||
@ -1554,6 +1554,20 @@ begin
|
||||
SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK);
|
||||
end;
|
||||
|
||||
// Set revision
|
||||
EnvFile := ExpandConstant('{app}\share\gimp\{#GIMP_API_VERSION}\gimp-release');
|
||||
DebugMsg('SetRevision','Seting revision number {#REVISION} in ' + EnvFile);
|
||||
|
||||
//LoadStringFromUTF8File(EnvFile,Env);
|
||||
//sTemp := Replace('=0','={#REVISION}',Env);
|
||||
sTemp := 'revision={#REVISION}' + #10;
|
||||
|
||||
if not SaveStringToUTF8File(EnvFile,sTemp,False) then
|
||||
begin
|
||||
DebugMsg('PrepareGimpEnvironment','Problem seting revision');
|
||||
SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK);
|
||||
end;
|
||||
|
||||
// Disable check-update when run with specific option
|
||||
if ExpandConstant('{param:disablecheckupdate|false}') = 'true' then
|
||||
begin
|
||||
|
Reference in New Issue
Block a user