Skip to content

[Bug]: bundle-windows.ps1 hardcodes external tool paths and silently skips valid Visual Studio installs #255

Open

Description

@CSEliot

Frame version

0.34.0, built from source at 66HEX/frame 8fe5aa1

Operating system

Windows

Operating system version

Windows 11, 10.0.26200.9711

Source media details

git clone, built from source; VS 2022 Build Tools and VS 18 Community installed; vswhere 3.1.7; Inno Setup 6.7.1 via Chocolatey

Steps to reproduce

  1. On a machine with Visual Studio 2022 Build Tools (the layout CONTRIBUTING.md:144 tells contributors to install) rather than VS 2022 Community, run script\bundle-windows.ps1 -Architecture x86_64 -PrepareOnly or the full bundle.
  2. Initialize-VsDevShell (script/bundle-windows.ps1:66-73) does nothing: line 67 hardcodes C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1, and the Test-Path guard on line 68 has no else branch or warning.
  3. Install Inno Setup 6 somewhere other than C:\Program Files (x86)\Inno Setup 6 (for example a per-user install) and run the bundle: line 94 hardcodes C:\Program Files (x86)\Inno Setup 6\ISCC.exe and line 96 throws Inno Setup is required at ....

Expected behavior

The script finds the toolchain it needs, or says clearly what it looked for and how to install it.

Actual behavior

  • Visual Studio: the dev shell is skipped silently. On this machine vswhere lists C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools (the documented prerequisite) and C:\Program Files\Microsoft Visual Studio\18\Community; the hardcoded Program Files\...\2022\Community matches neither, so a valid install is ignored. Professional and Enterprise layouts are missed the same way, and the repo's Windows CI (release.yml:421, :446) runs this same code path on windows-2022.
  • Inno Setup: the check runs at line 142, after the full cargo build (lines 118-131), so a non-default install location costs the entire build before it fails, and there is no override of any kind: no parameter, no environment variable, no PATH lookup. script/bundle-linux does better with command -v plus an APPIMAGETOOL=<path> override.

The build currently succeeds without a dev shell because cc 1.2.65 (through find-msvc-tools 0.1.15) locates cl.exe and the SDK via the registry and vswhere. But if the import did run it would set INCLUDE, LIB, VCINSTALLDIR, VCToolsVersion, WindowsSdkDir, WindowsSDKVersion, VSTEL_MSBuildProjectFullPath and VSCMD_ARG_VCVARS_SPECTRE, all of which ring's build output declares with rerun-if-env-changed; that is a second way to force the relink described in the other issue (hypothesis, not reproducible here because the path does not exist).

For Inno Setup, the documented installs (choco, winget, manual machine-wide) all land at the hardcoded path, so the documented happy path works. What is missing is robustness and diagnostics. A per-user install is a real scenario: upstream Inno Setup 6 allows non-admin installs (PrivilegesRequiredOverridesAllowed=dialog, DefaultDirName={autopf}), landing in %LOCALAPPDATA%\Programs\Inno Setup 6. Inno Setup 7 (7.1.1, now the recommended download) installs to C:\Program Files\Inno Setup 7; the project pins 6.7.1, so IS7 support is out of scope, but the error should name the supported version.

Suggested fix

  • Add one small tool resolver used by both checks. For ISCC: -ISCCPath parameter and ISCC_PATH fallback, then Get-Command ISCC.exe, then the current literal path; on failure, list what was checked and print choco install innosetup.
  • For Visual Studio: locate it with vswhere and derive Common7\Tools\Launch-VsDevShell.ps1 from installationPath. Do not use -latest blindly: here it prefers VS 18 Community over the VS 2022 Build Tools that CONTRIBUTING documents, so either pin a version range (for example -version "[17.0,18.0)") or add a -VsInstallPath parameter. When no matching install is found, Write-Warning instead of skipping silently, or add a -SkipDevShell switch.
  • Optional: move both tool checks to the top of the script, before the cargo builds.

Docs note (for the PR that fixes this)

CONTRIBUTING.md Windows section (139-155) does not say what the bundle produces or how installing works. Add:

  • cargo xtask bundle windows (documented at CONTRIBUTING.md:196) runs script/bundle-windows.ps1 and writes target\Frame-x86_64.exe. It installs only when -Install/-i is passed, and Start-Process has no -Wait, so the script launches the installer without waiting for or verifying it.
  • The install is per-user: PrivilegesRequired=lowest and DefaultDirName={localappdata}\Programs\Frame. Verified on this machine: Frame 0.34.0 at %LOCALAPPDATA%\Programs\Frame, HKCU uninstall key {7D37707F-5F27-47B6-82EE-207B922EC013}_is1, Start Menu shortcut, no desktop shortcut (the desktop icon task is unchecked).
  • Silent install: Frame-x86_64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART. [Run] has skipifsilent, so it will not launch the app.
  • Optional: mirror the per-user and silent-install details in website/src/lib/site/content/docs/installation.svx, which currently covers downloads and winget but not these.

Activity

  1. added 2 commits that reference this issue on Nov 14, 2026
    1abfff5
    ae33fb8
  2. added
    area:distribution
    bug
    platform:windows
    type:distribution
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:distributionbugplatform:windowstype:distribution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions