Internal
Public Access
New packaging/windows/orbithub.iss packages the build directory's top-level contents directly (orbithub.exe, *.dll, platforms/, sqldrivers/) rather than going through cmake --install: vcpkg's own applocal DLL deployment already drops every required runtime dependency flat into build/ on every build (confirmed repeatedly this session), and the existing private-runtime-lib install() rule uses an RPATH-style Unix convention (lib/orbithub/) that doesn't work on Windows, where DLLs must sit next to the exe. Produces a single OrbitHub-Setup-<version>.exe with a Start Menu entry, optional desktop shortcut, and uninstaller. build-installer.ps1 reads the project version from build/CMakeCache.txt (same approach build-deb.sh already uses) and drives ISCC.exe. Code signing is out of scope for now (no certificate available), so the installer will trigger a SmartScreen warning until one is purchased. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
37 lines
1.2 KiB
PowerShell
37 lines
1.2 KiB
PowerShell
param(
|
|
[string]$BuildDir = "$PSScriptRoot\..\..\build",
|
|
[string]$DistDir = "$PSScriptRoot\..\..\dist\windows"
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$cacheFile = Join-Path $BuildDir "CMakeCache.txt"
|
|
if (-not (Test-Path $cacheFile)) {
|
|
throw "Build directory not configured: $BuildDir (run cmake -S . -B build first)"
|
|
}
|
|
|
|
$versionLine = Select-String -Path $cacheFile -Pattern '^CMAKE_PROJECT_VERSION:STATIC=(.*)$'
|
|
if (-not $versionLine) {
|
|
throw "Unable to determine project version from $cacheFile"
|
|
}
|
|
$version = $versionLine.Matches[0].Groups[1].Value
|
|
|
|
$isccCandidates = @(
|
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe",
|
|
"C:\Program Files\Inno Setup 6\ISCC.exe",
|
|
"$env:LOCALAPPDATA\Programs\Inno Setup 6\ISCC.exe"
|
|
)
|
|
$iscc = $isccCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1
|
|
if (-not $iscc) {
|
|
throw "Inno Setup compiler (ISCC.exe) not found. Install it: winget install -e --id JRSoftware.InnoSetup"
|
|
}
|
|
|
|
New-Item -ItemType Directory -Force -Path $DistDir | Out-Null
|
|
|
|
& $iscc "/DMyAppVersion=$version" "$PSScriptRoot\orbithub.iss"
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "ISCC.exe failed with exit code $LASTEXITCODE"
|
|
}
|
|
|
|
Write-Output "Created $DistDir\OrbitHub-Setup-$version.exe"
|