Repository navigation
Description
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
- On a machine with Visual Studio 2022 Build Tools (the layout
CONTRIBUTING.md:144tells contributors to install) rather than VS 2022 Community, runscript\bundle-windows.ps1 -Architecture x86_64 -PrepareOnlyor the full bundle. Initialize-VsDevShell(script/bundle-windows.ps1:66-73) does nothing: line 67 hardcodesC:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1, and theTest-Pathguard on line 68 has no else branch or warning.- 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 hardcodesC:\Program Files (x86)\Inno Setup 6\ISCC.exeand line 96 throwsInno 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) andC:\Program Files\Microsoft Visual Studio\18\Community; the hardcodedProgram Files\...\2022\Communitymatches 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 onwindows-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-linuxdoes better withcommand -vplus anAPPIMAGETOOL=<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:
-ISCCPathparameter andISCC_PATHfallback, thenGet-Command ISCC.exe, then the current literal path; on failure, list what was checked and printchoco install innosetup. - For Visual Studio: locate it with vswhere and derive
Common7\Tools\Launch-VsDevShell.ps1frominstallationPath. Do not use-latestblindly: 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-VsInstallPathparameter. When no matching install is found,Write-Warninginstead of skipping silently, or add a-SkipDevShellswitch. - 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 atCONTRIBUTING.md:196) runsscript/bundle-windows.ps1and writestarget\Frame-x86_64.exe. It installs only when-Install/-iis passed, andStart-Processhas no-Wait, so the script launches the installer without waiting for or verifying it.- The install is per-user:
PrivilegesRequired=lowestandDefaultDirName={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]hasskipifsilent, 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
fix(bundle-windows): resolve tool paths instead of hardcoding them
fix(bundle-windows): resolve tool paths instead of hardcoding them