Build Windows Installer #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows Installer | |
on: workflow_dispatch | |
jobs: | |
build: | |
name: Build the Inno Setup Installer | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Remove extra header in git config | |
run: | | |
git config --unset "http.https://github.com/.extraheader" | |
- id: commit | |
uses: prompt/actions-commit-hash@v3 | |
- name: Install extra language file of Inno Setup 6 | |
run: | | |
$baseUri = 'https://raw.github.com/kuwaai/issrc/main/Files/Languages' | |
$downloadDir = "$env:ProgramFiles (x86)\Inno Setup 6\Languages" | |
$files = @( | |
@{ | |
Uri = "$baseUri/../Default.isl" | |
OutFile = "$downloadDir\..\Default.isl" | |
}, | |
@{ | |
Uri = "$baseUri/Czech.isl" | |
OutFile = "$downloadDir\Czech.isl" | |
}, | |
@{ | |
Uri = "$baseUri/French.isl" | |
OutFile = "$downloadDir\French.isl" | |
}, | |
@{ | |
Uri = "$baseUri/German.isl" | |
OutFile = "$downloadDir\German.isl" | |
}, | |
@{ | |
Uri = "$baseUri/Japanese.isl" | |
OutFile = "$downloadDir\Japanese.isl" | |
}, | |
@{ | |
Uri = "$baseUri/Korean.isl" | |
OutFile = "$downloadDir\Korean.isl" | |
}, | |
@{ | |
Uri = "$baseUri/Unofficial/ChineseTraditional.isl" | |
OutFile = "$downloadDir\ChineseTraditional.isl" | |
}, | |
@{ | |
Uri = "$baseUri/Unofficial/ChineseSimplified.isl" | |
OutFile = "$downloadDir\ChineseSimplified.isl" | |
} | |
) | |
$jobs = @() | |
New-Item -ItemType Directory -Path $downloadDir -Force | |
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/[email protected] | |
with: | |
path: scripts/windows-setup-files/kuwa_genai_os.iss | |
options: /O+ | |
- name: Export the installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Kuwa-GenAI-OS-${{ github.ref_name }}${{ steps.commit.outputs.short }} | |
path: D:\a\genai-os\genai-os\scripts\windows-setup-files\Kuwa-GenAI-OS.exe |