summaryrefslogtreecommitdiff
path: root/oowintool
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2012-08-31 13:24:00 -0400
committerDavid Tardon <dtardon@redhat.com>2012-10-07 10:42:17 +0200
commit59bf5321fa4c49b0d140700e2c56de7e1b637926 (patch)
tree44a58b2b28860fe36eac97b9f4bf23cff542f771 /oowintool
parente994a91060c145ad08ef75dcf9862043202ac6ce (diff)
fix msm suport for VS2012
Change-Id: Ibc816de83eb48163671948ecc84e7653f2b4ec13
Diffstat (limited to 'oowintool')
-rwxr-xr-xoowintool32
1 files changed, 23 insertions, 9 deletions
diff --git a/oowintool b/oowintool
index 5f7d60321dbe..e8f0b3b17e7a 100755
--- a/oowintool
+++ b/oowintool
@@ -310,11 +310,12 @@ sub msvc_copy_dlls($)
}
}
-sub msvc_find_msms_vc100()
+sub msvc_find_msms()
{
- my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/9.0/Setup/VS/MSMDir"), 'w', $output_format);
+ my $ver = find_msvc();
+ my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver->{'ver'}/Setup/VS/MSMDir"), 'w', $output_format);
defined $msm_path || die "MSMDir not found";
- return -e "$msm_path/Microsoft_VC100_CRT_x86.msm" ? 0 : 1;
+ return -e "$msm_path/Microsoft_VC".$ver->{'dll_suffix'}."_CRT_x86.msm" ? 0 : 1;
}
sub msvc_copy_msms($$)
@@ -323,18 +324,31 @@ sub msvc_copy_msms($$)
my ($dest, $postfix) = @_;
my $ver = find_msvc();
- (defined $ver && ($ver->{'ver'} eq '9.0')) || return;
+ defined $ver || return;
- my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/9.0/Setup/VS/MSMDir"), 'w', $output_format);
+ my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver->{'ver'}/Setup/VS/MSMDir"), 'w', $output_format);
defined $msm_path || die "MSMDir not found";
+ if ($ver->{'dll_suffix'} == 90) {
+ if ( $postfix eq "_x86" ) {
+ $postfix = ""
+ }
foreach $fname ("Microsoft_VC90_CRT_x86$postfix.msm", "policy_9_0_Microsoft_VC90_CRT_x86$postfix.msm") {
print STDERR "Copying $msm_path/$fname to $dest\n";
copy ("$msm_path/$fname", $dest) || die "copy failed: $!";
}
- foreach $fname ("Microsoft_VC100_CRT_x86$postfix.msm") {
+ }
+ elsif ($ver->{'dll_suffix'} == 100) {
+ foreach $fname ("Microsoft_VC100_CRT$postfix.msm") {
+ print STDERR "Copying $msm_path/$fname to $dest\n";
+ copy ("$msm_path/$fname", $dest) || print "copy failed: $!\n";
+ }
+ }
+ else {
+ foreach $fname ("Microsoft_VC110_CRT$postfix.msm") {
print STDERR "Copying $msm_path/$fname to $dest\n";
copy ("$msm_path/$fname", $dest) || print "copy failed: $!\n";
}
+ }
}
if (!@ARGV) {
@@ -364,12 +378,12 @@ 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-find-msms') {
+ exit msvc_find_msms();
} elsif ($opt eq '--msvc-copy-msms') {
my $dest = shift @commands;
defined $dest || die "copy-msms requires a destination directory";
- msvc_copy_msms( $dest, '' );
+ msvc_copy_msms( $dest, '_x86' );
} elsif ($opt eq '--msvc-copy-msms-64') {
my $dest = shift @commands;
defined $dest || die "copy-msms-64 requires a destination directory";