configure.ac                  |    7 ++++++-
 scp2/source/ooo/vc_redist.scp |   18 ++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

New commits:
commit 137aa1fe40741aa1474cdcd3160317fc51beb564
Author:     Michael Stahl <mst...@redhat.com>
AuthorDate: Fri Jan 19 20:47:03 2018 +0100
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Wed Nov 15 20:44:38 2023 +0100

    scp2: also try VC141_CRT_*.msm
    
    Apparently the MSMs have been renamed in Visual Studio 2017.3 but only
    configure was adapted, not scp2.
    
    Not sure if these MSMs are still relevant given the new
    gid_File_Vcredist_Exe thing.
    
    Change-Id: I4fe27c8298b3a2024acc62d12ce8ea67e2eca80d

diff --git a/configure.ac b/configure.ac
index d46123ac0fcb..ddcc14b2f7bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6741,7 +6741,12 @@ if test $_os = "WINNT"; then
     MSVC_DLL_PATH="$msvcdllpath"
     MSVC_DLLS="$msvcdlls"
     MSM_PATH="$msmdir"
-    SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
+    # MSVC 15.3 changed it to VC141
+    if echo "$MSVC_DLL_PATH" | grep -q "VC141.CRT$"; then
+        SCPDEFS="$SCPDEFS -DWITH_VC141_REDIST"
+    else
+        SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
+    fi
     if test "$UCRT_REDISTDIR" = "no"; then
         dnl explicitly disabled
         UCRT_REDISTDIR=""
diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp
index 9b534a3f27fd..727c13b27615 100644
--- a/scp2/source/ooo/vc_redist.scp
+++ b/scp2/source/ooo/vc_redist.scp
@@ -56,3 +56,21 @@ End
 
 #endif
 
+#if defined(WITH_VC141_REDIST)
+
+#if defined WINDOWS_X64
+MergeModule gid_MergeModule_Microsoft_VC141_CRT_x64
+#else
+MergeModule gid_MergeModule_Microsoft_VC141_CRT_x86
+#endif
+    Feature = gm_Root;
+#if defined WINDOWS_X64
+    Name = "Microsoft_VC141_CRT_x64.msm";
+#else
+    Name = "Microsoft_VC141_CRT_x86.msm";
+#endif
+    RootDir = "TARGETDIR";
+    ComponentCondition = "VC_REDIST=1";
+End
+
+#endif

Reply via email to