Kaydet (Commit) 238eba33 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

make the vc2010 redist optional

Change-Id: Ib81f168fa65d7a4affb15ce07f1a49ad1b2df479
üst 85901806
#!/usr/bin/perl -w # -*- tab-width: 4; cperl-indent-level: 4; indent-tabs-mode: nil -*-
#!/usr/bin/perl -w
# -*- tab-width: 4; cperl-indent-level: 4; indent-tabs-mode: nil -*-
use File::Copy;
......@@ -40,7 +41,7 @@ sub reg_find_key($)
sub print_syntax()
{
print "oowintool [option] ...\n";
print " encoding options\n";
print " encoding options\n";
print " -w - windows form\n";
print " -u - unix form (default)\n";
print " commands:\n";
......@@ -69,7 +70,7 @@ sub cygpath($$$)
$path =~ s|\\*\s*$||;
}
# 'Unterminated quoted string errors' from 'ash' when
# 'Unterminated quoted string errors' from 'ash' when
# forking cygpath so - reimplement cygpath in perl [ gack ]
if ($format eq 'u' && $input_format eq 'w') {
$path =~ s|\\|/|g;
......@@ -206,7 +207,7 @@ sub print_csc_compiler_dir()
sub print_dotnetsdk_dir()
{
my $dir =
my $dir =
reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/.NETFramework/sdkInstallRootv1.1") ||
reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/.NETFramework/sdkInstallRootv2.0");
if ($dir) {
......@@ -222,7 +223,7 @@ sub print_jdk_dir()
reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.5/JavaHome") ||
reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.4/JavaHome") ||
reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java\ Development\ Kit/1.3/JavaHome");
print cygpath($dir, 'w', $output_format);
print cygpath($dir, 'w', $output_format);
}
sub copy_dll($$$)
......@@ -241,11 +242,11 @@ sub msvc_find_version($)
{
my $checkpath = shift;
my $ver = find_msvc();
my $srcdir = (cygpath ($ver->{'product_dir'}, 'w', 'u') . '/' .
my $srcdir = (cygpath ($ver->{'product_dir'}, 'w', 'u') . '/' .
$ver->{$checkpath});
-d $srcdir && return $ver;
$ver = find_msvs();
$srcdir = (cygpath ($ver->{'product_dir'}, 'w', 'u') . '/' .
$srcdir = (cygpath ($ver->{'product_dir'}, 'w', 'u') . '/' .
$ver->{$checkpath});
-d $srcdir && return $ver;
return undef;
......@@ -256,7 +257,7 @@ sub msvc_copy_dlls($)
my $dest = shift;
my $ver = msvc_find_version('dll_path');
defined $ver || return;
my $srcdir = (cygpath ($ver->{'product_dir'}, 'w', 'u') . '/' .
my $srcdir = (cygpath ($ver->{'product_dir'}, 'w', 'u') . '/' .
$ver->{'dll_path'});
copy_dll ($srcdir, "msvcp" . $ver->{'dll_suffix'} . ".dll",
......@@ -280,10 +281,14 @@ sub msvc_copy_msms($$)
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";
foreach $fname ("Microsoft_VC90_CRT_x86$postfix.msm", "policy_9_0_Microsoft_VC90_CRT_x86$postfix.msm", "Microsoft_VC100_CRT_x86$postfix.msm") {
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") {
print STDERR "Copying $msm_path/$fname to $dest\n";
copy ("$msm_path/$fname", $dest) || print "copy failed: $!";
}
}
if (!@ARGV) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment