build: clone the InnoSetup repository once instead of downloading individual files.

It turns out that commit bd6745ab40 is not a good solution either,
because now it is the "Making sure you're not a bot!" page from Anubis
which is blocking us.
I am hoping that a git clone should encounter neither the HTTP 429 error
(though we clone through HTTP, but maybe/hopefully the rate limitation
is set up only for actual web page requests) nor the bot protection.
This commit is contained in:
Jehan 2025-05-16 20:08:40 +02:00
parent 4b9e96f703
commit a1621427d6

View file

@ -150,14 +150,15 @@ function download_langs ([array]$langsArray)
if ($langfile -ne '' -and -not (Test-Path "$langfilePath" -Type Leaf)) if ($langfile -ne '' -and -not (Test-Path "$langfilePath" -Type Leaf))
{ {
Write-Output "(INFO): temporarily installing $($langfilePath -replace '\\\\','\')" Write-Output "(INFO): temporarily installing $($langfilePath -replace '\\\\','\')"
$langfileUnix = $langfile.Replace('\\', '/') Copy-Item "issrc\Files\$langfile" "$langfilePath" -Force
Invoke-WebRequest https://gitlab.gnome.org/Jehan/jrsoftware-issrc/-/raw/main/Files/$langfileUnix -OutFile "$langfilePath"
} }
} }
} }
git clone --depth 1 https://github.com/jrsoftware/issrc.git
download_langs $langsArray_Official download_langs $langsArray_Official
New-Item "$INNO_PATH\Languages\Unofficial" -ItemType Directory -Force | Out-Null New-Item "$INNO_PATH\Languages\Unofficial" -ItemType Directory -Force | Out-Null
download_langs $langsArray_unofficial download_langs $langsArray_unofficial
Remove-Item "issrc" -Recurse -Force
### Patch 'AppVer*' against Inno pervasive behavior: https://groups.google.com/g/innosetup/c/w0sebw5YAeg ### Patch 'AppVer*' against Inno pervasive behavior: https://groups.google.com/g/innosetup/c/w0sebw5YAeg
function fix_msg ([array]$langsArray, [string]$AppVer) function fix_msg ([array]$langsArray, [string]$AppVer)
{ {