diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-23 10:09:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-23 10:10:10 +0000 |
commit | a910204348b032bae1882bf7f74085a0b8c529ca (patch) | |
tree | b55026a582b85c4dfab680d2eacb9be2cb55e0db /oowintool | |
parent | 5e283a80cd8e3e3a158b604f59c3dafa59a6b6f1 (diff) |
add a fallback for %COMMONPROGRAMFILES% if its not set
Diffstat (limited to 'oowintool')
-rwxr-xr-x | oowintool | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/oowintool b/oowintool index 6cb98a32b5a6..d8d340c7adbd 100755 --- a/oowintool +++ b/oowintool @@ -248,7 +248,7 @@ sub copy_dll($$$) -f "$src/$fname" || die "can't find $src"; -d $dest || die "no directory $dest"; - print STDERR "Copying $src/$fname to $dest\n"; + print STDERR "Copying $src/$fname to $dest\n"; copy ("$src/$fname", $dest) || die "copy failed: $!"; chmod (0755, "$dest/$fname") || die "failed to set dll executable: $!"; } @@ -293,11 +293,16 @@ sub msvc_copy_msms($$) my $common_files_path = $ENV{"CommonProgramFiles(x86)"}; if (!defined $common_files_path) { $common_files_path = $ENV{CommonProgramFiles}; + if (!defined $common_files_path) { + $common_files_path = "C:\\Program Files\\Common Files"; + } } - defined $common_files_path || return; + + defined $common_files_path || die "Windows CommonProgramFiles not found"; + my $msm_path = (cygpath $common_files_path . "\\Merge Modules", 'w', $output_format); 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"; + print STDERR "Copying $msm_path/$fname to $dest\n"; copy ("$msm_path/$fname", $dest) || die "copy failed: $!"; } } |