fix(installer): install VC++ runtime when missing#303
Merged
Conversation
PyTorch's c10.dll needs the MSVC runtime; on a clean Windows machine torch import fails with WinError 126. Bundle vc_redist.x64.exe in the Inno installer and run it silently only when the runtime is absent (registry check via HKLM64), matching what the old windows.ps1 used to do. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
On a clean Windows 10 VM, the launcher installed fine but crashed at first launch:
PyTorch's
c10.dlldepends on the Microsoft Visual C++ runtime (vcruntime140.dll,msvcp140.dll), which isn't present on a fresh Windows install. The oldwindows.ps1installer used to downloadvc_redist; the new Inno installer didn't.Fix
vc_redist.x64.exein the Inno installer and run it silently only when the runtime is absent — detected via the VC++ 2015–2022 x64 registry key (HKLM64). Machines that already have it (the majority) see no extra prompt; clean machines get one UAC prompt for the (inherently machine-wide) runtime.vc_redist.x64.exeand passes it to ISCC via/DVCRedist.Notes
uv toolpath is unchanged (power users provide their own runtime).🤖 Generated with Claude Code