Skip to content

fix(ci): bundle MSVC x64 CRT so nightly runs without VC++ Redistributable - #118

Merged
NonPolynomialTim merged 1 commit into
mainfrom
claude/cpp-redistributable-dlls-35aa7e
Aug 1, 2026
Merged

fix(ci): bundle MSVC x64 CRT so nightly runs without VC++ Redistributable#118
NonPolynomialTim merged 1 commit into
mainfrom
claude/cpp-redistributable-dlls-35aa7e

Conversation

@NonPolynomialTim

Copy link
Copy Markdown
Collaborator

Problem

Player report: a nightly build "requires C++ Redistributable since DLL are missing... tried to install on a fresh machine".

The shipped x64 exe links the MSVC runtime dynamically (OpenXcom.2010.vcxproj Release|x64 = MultiThreadedDLL, i.e. /MD), so at runtime it needs vcruntime140.dll, vcruntime140_1.dll and msvcp140.dll. CI only bundled the third-party libs (deps\lib\x64\*.dll — SDL, zlib, libsodium, …), never the MSVC runtime. On a fresh Windows machine without the VC++ Redistributable installed, the game fails to start with missing DLLs.

Only the x64 MSVC build is affected — the WinXP build is MinGW *.static (self-contained) and Linux/macOS bundle their own runtime.

Fix (option A: app-local CRT deploy)

  • New publish step locates the MSVC x64 CRT via vswhere and copies the three DLLs into bin\x64\Release before packaging (the Package step already globs bin\x64\Release\*.dll into the zip). App-local deployment of the CRT is Microsoft-sanctioned.
  • The Universal CRT (ucrtbase.dll) ships with Windows 10+, so it is deliberately not bundled.
  • Added an x64-zip regression guard that fails the build if any of the three CRT DLLs is missing from the shipped archive.

Fails loudly if vswhere / the redist dir / any DLL is not found, so a broken runtime layout can't silently ship.

🤖 Generated with Claude Code

…able

The shipped x64 exe links the MSVC runtime dynamically (Release|x64 = /MD),
so it needs vcruntime140.dll, vcruntime140_1.dll and msvcp140.dll at runtime.
Only third-party libs (SDL, zlib, ...) were bundled, so on a fresh machine
without the VC++ Redistributable installed the game failed with missing DLLs.

Copy the CRT app-local next to the exe in the publish job (MS-sanctioned
redistribution) and add an x64-zip regression guard. UCRT (ucrtbase.dll)
ships with Windows 10+ so it is not bundled. WinXP (static) and Linux/macOS
(own runtime) are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@NonPolynomialTim
NonPolynomialTim enabled auto-merge (squash) August 1, 2026 13:31
@xcomcoopdev

Copy link
Copy Markdown
Collaborator

For a moment, I thought I had broken something while working on the macOS build 😅

@NonPolynomialTim

Copy link
Copy Markdown
Collaborator Author

Hahaha nope, you're good, this was pre-existing, but was only an issue on brand new machines that had never installed the C++ redistributable before which is why I never caught it in any of my tests

@NonPolynomialTim
NonPolynomialTim merged commit 7a38c5b into main Aug 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants