summaryrefslogtreecommitdiff
path: root/scp2
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-11-11 16:59:31 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-11-11 21:31:35 +0100
commitab4e40941e9ebae83f98ba918440b03eac5bdcaa (patch)
tree2d981c4ee04093494a97797aca79037f050e3340 /scp2
parentdd1610146528cba8642caad3bf72e27b9ca6c153 (diff)
Fix VS2022 MSMs detection
After commits 42da199753515584e615cdcdd8601d2ffc27245b (more VS2022 integration, Oct 14 10:58:25 2021 +0200) and 9ea17a6331ca9491e7012dca837d3815cd4309ac (Adapt to latest VS 2022 MSM versions, Apr 08 09:15:19 2022 +0200), the new 143 version of MSMs gets detected and passed to SCP, but not used there, so MSIs lack CRT. Additionally, it may happen that a redist is configured that does not match the actual CRT used in the build, because it picked a latest available version, and then an error happens when building MSI, because it expects MSMs in wrong source directory. This simplifies the checks, makes sure to look for the correct MSM version, and adds an error message in SCP in case when the passed version is not handled, to detect the incomplete support early. Change-Id: I47d45472309c584314730e7f5f46a9596fc8d21d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142587 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'scp2')
-rw-r--r--scp2/source/ooo/vc_redist.scp15
1 files changed, 13 insertions, 2 deletions
diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp
index 75ccf2b8d09d..3fe7af2b978b 100644
--- a/scp2/source/ooo/vc_redist.scp
+++ b/scp2/source/ooo/vc_redist.scp
@@ -18,16 +18,27 @@
#include "macros.inc"
-#if defined(WITH_VC142_REDIST)
+#if defined(WITH_VC_REDIST)
+#if WITH_VC_REDIST == 143
+ #define WINDOWS_X64_MERGEMODULE gid_MergeModule_Microsoft_VC143_CRT_x64
+ #define WINDOWS_X64_MERGEMODULE_FILE "Microsoft_VC143_CRT_x64.msm"
+ #define WINDOWS_X86_MERGEMODULE gid_MergeModule_Microsoft_VC143_CRT_x86
+ #define WINDOWS_X86_MERGEMODULE_FILE "Microsoft_VC143_CRT_x86.msm"
+#elif WITH_VC_REDIST == 142
#define WINDOWS_X64_MERGEMODULE gid_MergeModule_Microsoft_VC142_CRT_x64
#define WINDOWS_X64_MERGEMODULE_FILE "Microsoft_VC142_CRT_x64.msm"
#define WINDOWS_X86_MERGEMODULE gid_MergeModule_Microsoft_VC142_CRT_x86
#define WINDOWS_X86_MERGEMODULE_FILE "Microsoft_VC142_CRT_x86.msm"
-#elif defined(WITH_VC141_REDIST)
+#elif WITH_VC_REDIST == 141
#define WINDOWS_X64_MERGEMODULE gid_MergeModule_Microsoft_VC141_CRT_x64
#define WINDOWS_X64_MERGEMODULE_FILE "Microsoft_VC141_CRT_x64.msm"
#define WINDOWS_X86_MERGEMODULE gid_MergeModule_Microsoft_VC141_CRT_x86
#define WINDOWS_X86_MERGEMODULE_FILE "Microsoft_VC141_CRT_x86.msm"
+#else
+ // The next string will result in "malformed par file" error, terminating build as expected.
+ // Possibly a new version of CRT was enabled in configure.ac, but not handled here yet?
+ error: unknown VC redist version WITH_VC_REDIST. Check configure.ac
+#endif
#endif
#if defined(WINDOWS_X86_MERGEMODULE)