Files
anonymisation/scripts/install_inno_setup_build_dep.ps1
Domi31tls 2d23f6c31a build(windows): scripts build one-click + installer + doc
- build_windows_oneclick.bat / build_windows_installer_oneclick.bat : wrappers
- scripts/build_windows_oneclick.ps1 / build_windows_installer_only.ps1 / install_inno_setup_build_dep.ps1
- build_signing.example.ps1 : exemple protocole signing (sans secret)
- docs/build-windows-oneclick.md : documentation du build

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 16:31:06 +02:00

58 lines
1.7 KiB
PowerShell

param(
[string]$DownloadUrl = "https://jrsoftware.org/download.php/is.exe"
)
$ErrorActionPreference = "Stop"
function Write-Step {
param([string]$Message)
Write-Host ""
Write-Host "=== $Message ===" -ForegroundColor Cyan
}
function Find-InnoCompiler {
$candidates = @()
if (${env:ProgramFiles(x86)}) {
$candidates += (Join-Path ${env:ProgramFiles(x86)} "Inno Setup 6\ISCC.exe")
}
if ($env:ProgramFiles) {
$candidates += (Join-Path $env:ProgramFiles "Inno Setup 6\ISCC.exe")
}
if ($env:LOCALAPPDATA) {
$candidates += (Join-Path $env:LOCALAPPDATA "Programs\Inno Setup 6\ISCC.exe")
$candidates += (Join-Path $env:LOCALAPPDATA "Inno Setup 6\ISCC.exe")
}
foreach ($candidate in $candidates) {
if ($candidate -and (Test-Path $candidate)) {
return $candidate
}
}
return $null
}
$existing = Find-InnoCompiler
if ($existing) {
Write-Host "Inno Setup deja disponible : $existing"
exit 0
}
Write-Step "Telechargement Inno Setup"
$installerPath = Join-Path $env:TEMP "innosetup-build-dep.exe"
Invoke-WebRequest -Uri $DownloadUrl -OutFile $installerPath
Write-Host "Installeur telecharge : $installerPath"
Write-Step "Installation Inno Setup utilisateur"
$args = @("/SP-", "/VERYSILENT", "/SUPPRESSMSGBOXES", "/NORESTART", "/CURRENTUSER")
$process = Start-Process -FilePath $installerPath -ArgumentList $args -Wait -PassThru
Write-Host "Code retour : $($process.ExitCode)"
if ($process.ExitCode -ne 0) {
throw "Installation Inno Setup echouee avec le code $($process.ExitCode)."
}
$compiler = Find-InnoCompiler
if (-not $compiler) {
throw "ISCC.exe introuvable apres installation Inno Setup."
}
Write-Host "Inno Setup pret : $compiler"