From b667ca53f4cfff9ac5c8f124b1cd1756bc0af948 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Fri, 21 Oct 2011 10:13:48 +0200 Subject: copy msvcrt merge modules into the tree --- oowintool | 20 ++++++++++++++++++++ post_download.in | 11 +++++++++++ 2 files changed, 31 insertions(+) diff --git a/oowintool b/oowintool index bc75736bef02..bf5c5d977fbc 100755 --- a/oowintool +++ b/oowintool @@ -46,6 +46,7 @@ sub print_syntax() print " commands:\n"; print " --msvc-ver - print version of MSVC eg. 6.0\n"; print " --msvc-copy-dlls - copy msvc[pr]??.dlls into /msvcp??/\n"; + print " --msvc-copy-msms - copy mscrt merge modules /msm90/\n"; print " --msvc-productdir - print productdir\n"; print " --msvs-productdir - print productdir\n"; print " --dotnetsdk-dir - print .NET SDK path\n"; @@ -284,6 +285,21 @@ sub msvc_copy_dlls($) } } +sub msvc_copy_msms($) +{ + my $dest = shift; + my $common_files_path = $ENV{"CommonProgramFiles(x86)"}; + if (!defined $common_files_path) { + $common_files_path = $ENV{CommonProgramFiles}; + } + defined $common_files_path || return; + my $msm_path = (cygpath $common_files_path . "\\Merge Modules", 'w', $output_format); + foreach $fname ('Microsoft_VC90_CRT_x86.msm', 'Microsoft_VC90_CRT_x86_x64.msm', 'policy_9_0_Microsoft_VC90_CRT_x86.msm', 'policy_9_0_Microsoft_VC90_CRT_x86_x64.msm') { + print STDERR "Copying $msm_path/$fname to $dest\n"; + copy ("$msm_path/$fname", $dest) || die "copy failed: $!"; + } +} + if (!@ARGV) { print_syntax(); exit 1; @@ -311,6 +327,10 @@ while (@commands) { my $dest = shift @commands; defined $dest || die "copy-dlls requires a destination directory"; msvc_copy_dlls( $dest ); + } elsif ($opt eq '--msvc-copy-msms') { + my $dest = shift @commands; + defined $dest || die "copy-msms requires a destination directory"; + msvc_copy_msms( $dest ); } elsif ($opt eq '--msvs-productdir') { print_msvs_productdir(); } elsif ($opt eq '--msvc-productdir') { diff --git a/post_download.in b/post_download.in index 34aeba82a479..c93cd270da71 100644 --- a/post_download.in +++ b/post_download.in @@ -45,6 +45,17 @@ if test "$COM" = "MSC"; then fi fi +dnl =================================================================== +dnl Windows builds - use oowintool to copy VC redist merge modules +dnl =================================================================== +if test "$COM" = "MSC"; then + if ./oowintool --msvc-copy-msms ./external/msm90 ; then + : + else + AC_MSG_ERROR([oowintool failed to copy merge modules]) + fi +fi + dnl =================================================================== dnl Windows builds need gdiplus.dll in external/gdiplus/ dnl =================================================================== -- cgit