mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
build/windows: Auto repair Inno langs if .ps1 script is interrupted
027013c7
was fine but not good enough. Without this new commit,
if you stop the script after touching the Inno lang files and run
the script again it would not restore the patched lang files so
patch over patch, producing something like "GIMP 3.0.0 3.0.0".
So, this new commit identifies if the script wasn't completed and
repair Inno installation before applying the patches again.
This commit is contained in:
parent
a9056419ce
commit
f0fb443553
1 changed files with 8 additions and 2 deletions
|
@ -26,10 +26,16 @@ Invoke-WebRequest https://jrsoftware.org/download.php/is.exe -OutFile ..\is.exe
|
|||
$inno_version_downloaded = (Get-Item ..\is.exe).VersionInfo.ProductVersion -replace ' ',''
|
||||
|
||||
## Install or Update Inno
|
||||
$broken_inno = Get-ChildItem $Env:Tmp -Filter *.isl.bak -ErrorAction SilentlyContinue
|
||||
$inno_version = Get-ItemProperty Registry::'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup*' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty DisplayVersion
|
||||
if ("$inno_version" -ne "$inno_version_downloaded")
|
||||
if ("$broken_inno" -or "$inno_version" -ne "$inno_version_downloaded")
|
||||
{
|
||||
if ("$inno_version" -notlike "*.*")
|
||||
if ("$broken_inno")
|
||||
{
|
||||
Write-Output '(INFO): repairing Inno'
|
||||
$broken_inno | Remove-Item -Recurse
|
||||
}
|
||||
elseif ("$inno_version" -notlike "*.*")
|
||||
{
|
||||
Write-Output '(INFO): installing Inno'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue