[Libreoffice-commits] .: configure.in oowintool scp2/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Tue Jul 24 08:06:51 PDT 2012


 configure.in                  |    9 +++++++--
 oowintool                     |   11 +++++++++++
 scp2/source/ooo/vc_redist.scp |    8 ++++----
 3 files changed, 22 insertions(+), 6 deletions(-)

New commits:
commit 6cfe3c93dc55264e57f1057a2911d54232353d13
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jul 24 17:06:21 2012 +0200

    Make bundling Microsoft_VC100_CRT_x86.msm truly optional
    
    Change-Id: I4fa998f33059a6ebc9afe0a9ce65443a115b6db2

diff --git a/configure.in b/configure.in
index ddbb22f..6e1ffe5 100644
--- a/configure.in
+++ b/configure.in
@@ -5135,9 +5135,14 @@ fi
 AC_SUBST([JITC_PROCESSOR_TYPE])
 
 if test $_os = "WINNT"; then
-    SCPDEFS="$SCPDEFS -DWITH_VC_REDIST"
+    AC_MSG_CHECKING([for Microsoft_VC100_CRT_x86.msm])
+    if ./oowintool --msvc-find-msms-vc100; then
+        AC_MSG_RESULT([yes])
+        SCPDEFS="$SCPDEFS -DWITH_VC100_REDIST"
+    else
+        AC_MSG_RESULT([no])
+    fi
 fi
-AC_SUBST(WITH_VC_REDIST)
 
 dnl ===================================================================
 dnl Checks for Java
diff --git a/oowintool b/oowintool
index 087d478..9afc1cd 100755
--- a/oowintool
+++ b/oowintool
@@ -47,6 +47,8 @@ sub print_syntax()
     print " commands:\n";
     print "   --msvc-ver              - print version of MSVC eg. 6.0\n";
     print "   --msvc-copy-dlls <dest> - copy msvc[pr]??.dlls into <dest>/msvcp??/\n";
+    print "   --msvc-find-msms-vc100  - exit with 0 if Microsoft_VC100_CRT_x86.msm\n";
+    print "                             is available\n";
     print "   --msvc-copy-msms <dest> - copy mscrt merge modules to <dest>/msm90/\n";
     print "   --msvc-copy-msms-64 <ds>- copy the x64 mscrt merge modules to <ds>/msm90/\n";
     print "   --msvc-productdir       - print productdir\n";
@@ -271,6 +273,13 @@ sub msvc_copy_dlls($)
     }
 }
 
+sub msvc_find_msms_vc100()
+{
+    my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/9.0/Setup/VS/MSMDir"), 'w', $output_format);
+    defined $msm_path || die "MSMDir not found";
+    return -e "$msm_path/Microsoft_VC100_CRT_x86.msm" ? 0 : 1;
+}
+
 sub msvc_copy_msms($$)
 {
     # $postfix is empty for x86, and '_x64' for x64
@@ -318,6 +327,8 @@ while (@commands) {
         my $dest = shift @commands;
         defined $dest || die "copy-dlls requires a destination directory";
         msvc_copy_dlls( $dest );
+    } elsif ($opt eq '--msvc-find-msms-vc100') {
+        exit msvc_find_msms_vc100();
     } elsif ($opt eq '--msvc-copy-msms') {
         my $dest = shift @commands;
         defined $dest || die "copy-msms requires a destination directory";
diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp
index 265a595..c0e5302 100644
--- a/scp2/source/ooo/vc_redist.scp
+++ b/scp2/source/ooo/vc_redist.scp
@@ -27,8 +27,6 @@
 
 #include "macros.inc"
 
-#if defined(WITH_VC_REDIST)
-
 MergeModule gid_MergeModule_Microsoft_VC90_CRT_x86
     Feature = gm_Root;
     Name = "Microsoft_VC90_CRT_x86.msm";
@@ -36,6 +34,8 @@ MergeModule gid_MergeModule_Microsoft_VC90_CRT_x86
     ComponentCondition = "VC_REDIST=1";
 End
 
+#if defined(WITH_VC100_REDIST)
+
 MergeModule gid_MergeModule_Microsoft_VC100_CRT_x86
     Feature = gm_Root;
     Name = "Microsoft_VC100_CRT_x86.msm";
@@ -43,6 +43,8 @@ MergeModule gid_MergeModule_Microsoft_VC100_CRT_x86
     ComponentCondition = "VC_REDIST=1";
 End
 
+#endif
+
 MergeModule gid_MergeModule_policy_9_0_Microsoft_VC90_CRT_x86
     Feature = gm_Root;
     Name = "policy_9_0_Microsoft_VC90_CRT_x86.msm";
@@ -67,5 +69,3 @@ MergeModule gid_MergeModule_policy_9_0_Microsoft_VC90_CRT_x86_x64
 End
 
 #endif
-
-#endif


More information about the Libreoffice-commits mailing list