From be5ca987fce291d18345096d998baa94c049c0af Mon Sep 17 00:00:00 2001 From: Yung-Hsiang Hu Date: Thu, 4 Jul 2024 15:06:50 +0800 Subject: [PATCH] [workflow] fix: add Inno Setup language file --- .github/workflows/build-win-installer.yaml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/build-win-installer.yaml b/.github/workflows/build-win-installer.yaml index 21f68d6d..6c8c7de2 100644 --- a/.github/workflows/build-win-installer.yaml +++ b/.github/workflows/build-win-installer.yaml @@ -4,9 +4,43 @@ jobs: build: name: Build the Inno Setup Installer runs-on: windows-latest + defaults: + run: + shell: pwsh steps: - uses: actions/checkout@v4 + - name: Install Language + run: | + $baseUri = 'https://raw.github.com/jrsoftware/issrc/main/Files' + $downloadDir = "$env:ProgramFiles(x86)/Inno Setup 6/Languages" + $files = @( + @{ + Uri = "$baseUri/Languages/Unofficial/ChineseTraditional.isl" + OutFile = "$downloadDir/ChineseTraditional.isl" + }, + @{ + Uri = "$baseUri/Languages/Unofficial/ChineseSimplified.isl" + OutFile = "$downloadDir/ChineseTraditional.isl" + }, + ) + + $jobs = @() + + foreach ($file in $files) { + $jobs += Start-ThreadJob -Name $file.OutFile -ScriptBlock { + $params = $using:file + Invoke-WebRequest @params + } + } + + Write-Host "Downloads started..." + Wait-Job -Job $jobs + + foreach ($job in $jobs) { + Receive-Job -Job $job + } + - name: Compile .ISS to .EXE Installer uses: Minionguyjpro/Inno-Setup-Action@v1.2.2 with: