Improve Windows installer runtime packaging#2303
Conversation
There was a problem hiding this comment.
Thanks @jensenpat — this is a nicely scoped, well-documented installer improvement. The app-local runtime approach via Inno's Excludes + /DVC_RUNTIME_DIR is the right call, and routing through VCToolsRedistDir (which ilammy/msvc-dev-cmd exposes in CI) before falling back to a Visual Studio scan is a sensible discovery order. I confirmed the referenced assets (LICENSE, docs/AetherSDR.ico) exist in the tree, and the conditional [Files] section will only kick in when the define is supplied, leaving the legacy fallback intact.
A few small things worth considering:
Portable ZIP still ships without the MSVC runtime. The Compress-Archive -Path deploy\* step at windows-installer.yml:80 happens after staging but only zips deploy\, not installer-runtime\. Your PR description calls this out as intentional scope-narrowing, so not a blocker — but follow-up users grabbing the portable ZIP on a fresh box will hit the same vcruntime140.dll not found failure this PR fixes for the installer path. A one-line follow-up that copies the staged DLLs into deploy\ before Compress-Archive (or zips both directories) would make the two distribution paths behave consistently.
Inno Setup wizard image dimensions. Inno Setup is picky about WizardImageFile / WizardSmallImageFile sizes — the modern-style defaults are 164×314 (or 192×314 with high-DPI variants) and 55×58 respectively. If the BMPs aren't sized to one of the supported variants, ISCC will either reject them or stretch them ugly. Your validation notes say it looked good locally, so likely fine, but worth double-checking on the high-DPI runtime path.
Minor (non-blocking): Sort-Object @{ Expression = ...; Descending = $true }, FullName -Descending works, but the cmdlet-level -Descending is redundant with the hashtable's own Descending = $true for the first key, and applies to FullName too — the tiebreak ends up being "highest FullName wins," which is probably fine in practice but slightly unusual. If you wanted alphabetical tiebreak, drop the trailing -Descending.
Nothing here is blocking — the core change is solid. Nice work on tracking down the redist directory robustly and on the branding polish.
Summary
vc_redist.x64.exeout of the generated setup package; CI stages only the runtime DLLs that Inno Setup needs to install beside the app.Motivation
The Windows installer could produce a working install on developer machines while still leaving fresh user machines exposed to missing MSVC C/C++ runtime DLL errors. The installer also jumped directly to options/tasks in the tested local setup flow and used stock Inno Setup artwork on some pages, which made the first-run install experience feel less polished than the app itself.
This change focuses on the installer path first, rather than the portable ZIP, so the out-of-the-box Windows setup experience has the required runtime files and branded wizard screens.
Implementation
packaging/windows/stage-msvc-runtime.ps1to find the x64Microsoft.VC*.CRTredist directory fromVCToolsRedistDirwhen available, with a Visual Studio redist directory fallback..github/workflows/windows-installer.ymlso CI stages those MSVC runtime DLLs intoinstaller-runtimebefore compiling the Inno setup package./DVC_RUNTIME_DIR=...into Inno Setup sopackaging/windows/installer.isscan install those DLLs app-local.concrt140.dll,msvcp140*.dll,vccorlib140.dll, andvcruntime140*.dllfrom the generic deploy copy whenVC_RUNTIME_DIRis supplied, avoiding duplicate runtime sources.VC_RUNTIME_DIRis not defined.LicenseFile,DisableWelcomePage=no,SetupIconFile,WizardImageFile, andWizardSmallImageFilesettings to improve the installer flow and branding.wizard-image.bmpfromdocs/logo.jpgfor the large left-side wizard panel andwizard-small-image.bmpfrom the AetherSDR round icon for the small wizard image.Validation
vc_redist.x64.exe.C:\Program Files\AetherSDR, reran setup, and verified the fresh install includes app-local MSVC runtime DLLs such asmsvcp140.dll,msvcp140_1.dll,msvcp140_2.dll,vcruntime140.dll, andvcruntime140_1.dll.vc_redist.x64.exe,dxcompiler.dll,dxil.dll, ortls\qopensslbackend.dllartifacts.lddacross the installed.exe/.dllfiles with the app and plugin directories onPATH; no missing dependencies were reported.lddresolves Qt, hidapi, fftw, deepfilter, and MSVC runtime DLLs fromC:\Program Files\AetherSDR, while expected system DLLs resolve fromSystem32.👨🏼💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat