diff options
author | Andras Timar <atimar@suse.com> | 2011-10-21 10:13:48 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2011-11-16 15:50:38 +0100 |
commit | b667ca53f4cfff9ac5c8f124b1cd1756bc0af948 (patch) | |
tree | d9a96210b9ee6a2de8b421732e5e66d5ff05118e | |
parent | 72c439a7bd01f7e0571df81f584d71d3a8f48b18 (diff) |
copy msvcrt merge modules into the tree
-rwxr-xr-x | oowintool | 20 | ||||
-rw-r--r-- | post_download.in | 11 |
2 files changed, 31 insertions, 0 deletions
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 <dest> - copy msvc[pr]??.dlls into <dest>/msvcp??/\n"; + print " --msvc-copy-msms <dest> - copy mscrt merge modules <dest>/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 @@ -46,6 +46,17 @@ if test "$COM" = "MSC"; then 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 =================================================================== if test "$_os" = "WINNT"; then |