Repository navigation
Conversation
CSEliot
force-pushed
the
fix/bundle-windows-tool-paths
branch
from
November 14, 2026 15:23
21ba065 to
1abfff5
Compare
The Windows bundle hardcoded the Visual Studio 2022 Community dev shell and the Inno Setup 6 compiler, so a documented VS 2022 Build Tools install (or VS 18, a Professional/Enterprise layout, a per-user Inno install, or a Chocolatey shim) was ignored or produced a late, unexplained failure. Locate the dev shell with vswhere, preferring the documented VS 2022 generation before any newer install, and warn instead of skipping silently. Locate ISCC through -ISCCPath, ISCC_PATH, PATH, the Inno Setup uninstall registry entries, and the default install directories, and resolve it before any Cargo work so a missing compiler fails fast. Add -VsInstallPath, -ISCCPath and -SkipDevShell overrides, validate explicit ISCC paths as existing .exe files, keep positional binding limited to -Architecture, and document the bundle output, -Install behavior, per-user install layout, silent install command, and tool-path overrides in CONTRIBUTING. Fixes 66HEX#255.
CSEliot
force-pushed
the
fix/bundle-windows-tool-paths
branch
from
November 14, 2026 17:38
1abfff5 to
ae33fb8
Compare
66HEX
requested changes
Nov 21, 2026
66HEX
left a comment
Owner
There was a problem hiding this comment.
Thanks for this! The vswhere and ISCC.exe resolution logic, PositionalBinding = $false, and docs updates look very solid overall.
Before we merge (and after #256 lands, since both touch script/bundle-windows.ps1), could you make two small hardening tweaks in Find-VsDevShell?
- Use
Test-Path -LiteralPath $candidate -PathType Leaf(matchingTest-ISCCPath) so paths containing wildcard characters or matching a directory name are handled safely. - Guard
${env:ProgramFiles(x86)}before callingJoin-Pathin case the env var is unset.
Once #256 is merged and this is rebased with those tweaks, we'll run CI and get it in.
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #255.
script/bundle-windows.ps1hardcoded two external tool locations: the Visual Studio 2022 Community dev shell andC:\Program Files (x86)\Inno Setup 6\ISCC.exe. On a machine with the documented VS 2022 Build Tools install (under Program Files (x86)), VS 18, or a Professional/Enterprise layout, the dev shell was skipped silently. A per-user Inno install, a PATH shim, or a different drive produced a lateInno Setup is requirederror after the full build.Changes
Find-VsDevShelluses vswhere (-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64), prefers the documented 17.x generation, then considers every other installation, derivesCommon7\Tools\Launch-VsDevShell.ps1, warns with remediation when nothing is found, and honours-VsInstallPath(authoritative) and-SkipDevShell.Find-ISCCresolves-ISCCPath,ISCC_PATH, PATH, the HKLM/HKCU Inno Setup 6 uninstall keys, then the default install directories, before any Cargo work. Explicit paths must be an existing.exe, not a directory or arbitrary file.-PrepareOnlyskips the check. Failures list what was checked and the install command.PositionalBindingis disabled, with-Architecturekept as position 0, so a stray path argument can no longer bind to an override parameter.-Installbehavior (Start-Processhas no-Wait), the per-user install layout, the unchecked desktop shortcut, the silent install command, the resolver behavior, and the overrides.inno/frame.iss; no workflow changes.Testing
-Helplists the new options and exits 0.bundle-windows.ps1 x86_64 -Helpstill binds-Architecture; a second positional argument is rejected.-PackageOnlyresolves ISCC through the Chocolatey shim and rebuilds the installer:Successful compile (118.906 sec).-PackageOnly -ISCCPath "C:\Program Files (x86)\Inno Setup 6",-ISCCPath C:\Windows\win.ini, a badISCC_PATH, and a path with illegal characters (C:\bad|path\ISCC.exe) all fail fast withISCC.exe not found at ....-PrepareOnly -VsInstallPath C:\nopefails with the rebuiltLaunch-VsDevShell.ps1 not foundmessage.-PrepareOnlyselectsC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Launch-VsDevShell.ps1, prepares the inputs, and compiles nothing on the follow-up run.script/bundle-windows.ps1exits 0, resolves both tools, and writestarget\Frame-x86_64.exe(Successful compile (118.266 sec)). The release build was already warm (noCompilinglines), so this run exercises resolution and packaging rather than a cold build.git diff --checkpasses.Ordering
This should land after #256. The hardcoded path skipped the dev shell on BuildTools layouts; this change makes the import active, which sets
VCINSTALLDIRandVSCMD_ARG_TGT_ARCHbefore the script's nestedcargo xtask setup-ffmpeg. #256 removes that nested call, which is what keeps the runningxtask.exefrom being relinked; the env scrub alone does not remove those variables. The two branches also edit the sameParam/Help-Infoblocks, so expect two trivial conflicts on rebase; the combinedUsage:line must list both-SkipSetupFfmpegand the new options. The label-gatedrun_bundlingjob is the only workflow that runs this script end to end, and it has not run on this PR.