Skip to content

Commit d7c8deb

Browse files
committed
[ci] Fix Windows CI build: Include MSVCP140_2.dll
1 parent fdac254 commit d7c8deb

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/build-ci.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -595,18 +595,20 @@ jobs:
595595
windeployqt ${{env.CMAKE_CONFIG}}\socnetv.exe --release --compiler-runtime
596596
597597
echo "🔧 Manually copying MSVC runtime DLLs..."
598-
copy "C:\Windows\System32\MSVCP140.dll" ${{env.CMAKE_CONFIG}}\
599-
copy "C:\Windows\System32\VCRUNTIME140.dll" ${{env.CMAKE_CONFIG}}\
600-
copy "C:\Windows\System32\VCRUNTIME140_1.dll" ${{env.CMAKE_CONFIG}}\
601-
copy "C:\Windows\System32\CONCRT140.dll" ${{env.CMAKE_CONFIG}}\
602-
echo "🔧 Copying MSVCP140_1.dll..."
603-
if (Test-Path "C:\Windows\System32\MSVCP140_1.dll") {
604-
echo "✅ MSVCP140_1.dll is present in System32."
605-
copy "C:\Windows\System32\MSVCP140_1.dll" ${{env.CMAKE_CONFIG}}\
606-
} else {
598+
if (!(Test-Path "C:\Windows\System32\MSVCP140_1.dll")) {
607599
echo "❌ MSVCP140_1.dll NOT FOUND in System32! This may cause runtime errors."
608600
exit 1 # Fail the build when the file is missing
609601
}
602+
if (!(Test-Path "C:\Windows\System32\MSVCP140_2.dll")) {
603+
echo "❌ MSVCP140_2.dll NOT FOUND in System32! This may cause runtime errors."
604+
exit 1 # Fail the build when the file is missing
605+
}
606+
copy "C:\Windows\System32\MSVCP140.dll" ${{env.CMAKE_CONFIG}}\
607+
copy "C:\Windows\System32\MSVCP140_1.dll" ${{env.CMAKE_CONFIG}}\
608+
copy "C:\Windows\System32\MSVCP140_2.dll" ${{env.CMAKE_CONFIG}}\
609+
copy "C:\Windows\System32\VCRUNTIME140.dll" ${{env.CMAKE_CONFIG}}\
610+
copy "C:\Windows\System32\VCRUNTIME140_1.dll" ${{env.CMAKE_CONFIG}}\
611+
copy "C:\Windows\System32\CONCRT140.dll" ${{env.CMAKE_CONFIG}}\
610612
611613
echo "🔧 Copying license file to build directory..."
612614
copy ..\COPYING ${{env.CMAKE_CONFIG}}\LICENSE.txt

0 commit comments

Comments
 (0)