summaryrefslogtreecommitdiff
path: root/solenv/bin/modules/installer
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-09-07 13:35:07 +0000
committerOliver Bolte <obo@openoffice.org>2009-09-07 13:35:07 +0000
commitae0228cdb340de85f42c25024986ce0e557503a3 (patch)
tree55439cdf267c7cd8eef9a0ce6fa0c1775b3a133f /solenv/bin/modules/installer
parent9d7d35bce00ec0b2676d0428872300cc257e3288 (diff)
CWS-TOOLING: integrate CWS kick4nt
Diffstat (limited to 'solenv/bin/modules/installer')
-rw-r--r--solenv/bin/modules/installer/converter.pm10
-rw-r--r--solenv/bin/modules/installer/download.pm10
-rw-r--r--solenv/bin/modules/installer/followme.pm7
-rw-r--r--solenv/bin/modules/installer/globals.pm28
-rw-r--r--solenv/bin/modules/installer/servicesfile.pm18
-rw-r--r--solenv/bin/modules/installer/systemactions.pm55
-rw-r--r--solenv/bin/modules/installer/windows/msiglobal.pm10
-rw-r--r--solenv/bin/modules/installer/windows/sign.pm12
8 files changed, 38 insertions, 112 deletions
diff --git a/solenv/bin/modules/installer/converter.pm b/solenv/bin/modules/installer/converter.pm
index 814b8f6abd27..72901448598a 100644
--- a/solenv/bin/modules/installer/converter.pm
+++ b/solenv/bin/modules/installer/converter.pm
@@ -92,12 +92,10 @@ sub convert_stringlist_into_array_without_linebreak_and_quotes
{
$first = $1;
$last = $2;
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $first =~ s/\//\\/g; }
$first =~ s/\"//g;
push(@newarray, $first);
}
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $last =~ s/\//\\/g; }
$last =~ s/\"//g;
push(@newarray, $last);
@@ -121,13 +119,11 @@ sub convert_stringlist_into_array
{
$first = $1;
$last = $2;
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $first =~ s/\//\\/g; }
# Problem with two directly following listseparators. For example a path with two ";;" directly behind each other
$first =~ s/^$listseparator//;
push(@newarray, "$first\n");
}
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $last =~ s/\//\\/g; }
push(@newarray, "$last\n");
return \@newarray;
@@ -150,11 +146,9 @@ sub convert_stringlist_into_array_without_newline
{
$first = $1;
$last = $2;
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $first =~ s/\//\\/g; }
push(@newarray, "$first");
}
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $last =~ s/\//\\/g; }
push(@newarray, "$last");
return \@newarray;
@@ -177,11 +171,9 @@ sub convert_stringlist_into_hash
{
$first = $1;
$last = $2;
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $first =~ s/\//\\/g; }
$newhash{$first} = 1;
}
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $last =~ s/\//\\/g; }
$newhash{$last} = 1;
return \%newhash;
@@ -204,11 +196,9 @@ sub convert_whitespace_stringlist_into_array
{
$first = $1;
$last = $2;
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $first =~ s/\//\\/g; }
push(@newarray, "$first\n");
}
- if ( defined($ENV{'USE_SHELL'}) && $ENV{'USE_SHELL'} eq "4nt" ) { $last =~ s/\//\\/g; }
push(@newarray, "$last\n");
return \@newarray;
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index 07062d306e11..05b965c4a8d0 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -1548,11 +1548,11 @@ sub get_path_to_nsis_sdk
$nsispath = $ENV{'NSISSDK_SOURCE'}; # overriding the NSIS SDK with NSISSDK_SOURCE
}
- if( ($^O =~ /cygwin/i) and $nsispath =~ /\\/ ) {
- # We need a POSIX path for W32-4nt-cygwin-perl
- $nsispath =~ s/\\/\\\\/g;
- chomp( $nsispath = qx{cygpath -u "$nsispath"} );
- }
+# if( ($^O =~ /cygwin/i) and $nsispath =~ /\\/ ) {
+# # We need a POSIX path for W32-4nt-cygwin-perl
+# $nsispath =~ s/\\/\\\\/g;
+# chomp( $nsispath = qx{cygpath -u "$nsispath"} );
+# }
if ( $nsispath eq "" )
{
diff --git a/solenv/bin/modules/installer/followme.pm b/solenv/bin/modules/installer/followme.pm
index 128dbcd9ed7e..0a1ef456adcb 100644
--- a/solenv/bin/modules/installer/followme.pm
+++ b/solenv/bin/modules/installer/followme.pm
@@ -145,22 +145,18 @@ sub read_followme_info
if ( $line =~ /^\s*finalinstalldir:\s*(.*?)\s*$/ ) { $finalinstalldir = $1; }
if( $^O =~ /cygwin/i ) { $finalinstalldir =~ s/\\/\//; }
- if (( $^O =~ /MSWin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" )) { $finalinstalldir =~ s/\//\\/; }
if ( $line =~ /^\s*downloadname:\s*(.*?)\s*$/ ) { $downloadname = $1; }
if ( $line =~ /^\s*currentinstallnumber:\s*(.*?)\s*$/ ) { $currentinstallnumber = $1; }
if ( $line =~ /^\s*loggingdir:\s*(.*?)\s*$/ ) { $loggingdir = $1; }
if( $^O =~ /cygwin/i ) { $loggingdir =~ s/\\/\//; }
- if (( $^O =~ /MSWin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" )) { $loggingdir =~ s/\//\\/; }
if ( $line =~ /^\s*installlogdir:\s*(.*?)\s*$/ ) { $installlogdir = $1; }
if( $^O =~ /cygwin/i ) { $installlogdir =~ s/\\/\//; }
- if (( $^O =~ /MSWin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" )) { $installlogdir =~ s/\//\\/; }
if ( $line =~ /^\s*languagestring:\s*(.*?)\s*$/ ) { $languagestring = $1; }
if ( $line =~ /^\s*languagesarray:\s*(.*?)\s*$/ ) { push(@languagesarray, $1); }
if ( $line =~ /^\s*includepatharray:\s*(.*?)\s*$/ )
{
my $path = $1;
if( $^O =~ /cygwin/i ) { $path =~ s/\\/\//; }
- if (( $^O =~ /MSWin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" )) { $path =~ s/\//\\/; }
push(@includepatharray, $path . "\n");
}
if ( $line =~ /^\s*allvariableshash:\s*(.*?)\s*:\s*(.*?)\s*$/ ) { $allvariableshash{$1} = $2; }
@@ -189,13 +185,10 @@ sub read_followme_info
if ( $name eq "islinux" ) { $installer::globals::islinux = $value; }
if ( $name eq "unpackpath" ) { $installer::globals::unpackpath = $value; }
if( $^O =~ /cygwin/i ) { $installer::globals::unpackpath =~ s/\\/\//; }
- if (( $^O =~ /MSWin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" )) { $installer::globals::unpackpath =~ s/\//\\/; }
if ( $name eq "idttemplatepath" ) { $installer::globals::idttemplatepath = $value; }
if( $^O =~ /cygwin/i ) { $installer::globals::idttemplatepath =~ s/\\/\//; }
- if (( $^O =~ /MSWin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" )) { $installer::globals::idttemplatepath =~ s/\//\\/; }
if ( $name eq "idtlanguagepath" ) { $installer::globals::idtlanguagepath = $value; }
if( $^O =~ /cygwin/i ) { $installer::globals::idtlanguagepath =~ s/\\/\//; }
- if (( $^O =~ /MSWin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" )) { $installer::globals::idtlanguagepath =~ s/\//\\/; }
if ( $name eq "logfilename" ) { $installer::globals::logfilename = $value; }
if ( $name eq "product" ) { $installer::globals::product = $value; }
if ( $name eq "patch" ) { $installer::globals::patch = $value; }
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 8b5f13c7ae5b..cde8204972f9 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -483,33 +483,7 @@ BEGIN
$plat = $^O;
- if (( $plat =~ /MSWin/i ) || (( $plat =~ /cygwin/i ) && ( $ENV{'USE_SHELL'} eq "4nt" )))
- {
- $zippath= "zip.exe"; # Has to be in the path: r:\btw\zip.exe
- $checksumfile = "so_checksum.exe";
- $unopkgfile = "unopkg.exe";
- if ( $plat =~ /cygwin/i )
- {
- $separator = "/";
- $pathseparator = "\:";
- $quote = "\'";
- }
- else
- {
- $separator = "\\";
- $pathseparator = "\;";
- $quote = "\"";
- }
- $libextension = "\.dll";
- $isunix = 0;
- $iswin = 1;
- $archiveformat = ".zip";
- %savedmapping = ();
- %savedrevmapping = ();
- %savedrev83mapping = ();
- %saved83dirmapping = ();
- }
- elsif (( $plat =~ /cygwin/i ) && ( $ENV{'USE_SHELL'} ne "4nt" ))
+ if ( $plat =~ /cygwin/i )
{
$zippath = "zip"; # Has to be in the path: /usr/bin/zip
$checksumfile = "so_checksum";
diff --git a/solenv/bin/modules/installer/servicesfile.pm b/solenv/bin/modules/installer/servicesfile.pm
index 631db68da9dd..f0afea5583a6 100644
--- a/solenv/bin/modules/installer/servicesfile.pm
+++ b/solenv/bin/modules/installer/servicesfile.pm
@@ -274,7 +274,7 @@ sub fix_cygwin_path
{
my ( $path ) = @_;
- if ( $installer::globals::iswin eq 1 && $ENV{'USE_SHELL'} ne "4nt" && $installer::globals::wrapcmd eq "" )
+ if ( $installer::globals::iswin eq 1 && $installer::globals::wrapcmd eq "" )
{
$path = qx{cygpath -m "$path"};
chomp($path);
@@ -293,7 +293,7 @@ sub get_source_path_cygwin_safe
my ( $name, $array, $int ) = @_;
my $ret = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$name, $array, $int);
- if ( $installer::globals::iswin eq 1 && $ENV{'USE_SHELL'} ne "4nt" )
+ if ( $installer::globals::iswin eq 1 )
{
if( substr( $$ret, 1,1 ) eq ":" )
{
@@ -523,7 +523,7 @@ sub prepare_classpath_for_java_registration
if ( $ENV{'CLASSPATH'} ) { $oldclasspathstring = $ENV{'CLASSPATH'}; }
else { $oldclasspathstring = "\."; }
my $classpathstring = $$jarfileref . $local_pathseparator . $oldclasspathstring;
- if (( $^O =~ /cygwin/i ) && ( $ENV{'USE_SHELL'} ne "4nt" )) {
+ if ( $^O =~ /cygwin/i ) {
$classpathstring =~ s/\//\\/g; # guw.pl likes '\' in $PATH.
}
$ENV{'CLASSPATH'} = $classpathstring;
@@ -933,12 +933,12 @@ sub create_services_rdb
# my $servicesdir = installer::systemactions::create_directories($servicesname, $languagestringref);
my $servicesdir = installer::systemactions::create_directories($uniquedirname, $languagestringref);
- if ( $^O =~ /cygwin/i && $ENV{'USE_SHELL'} eq "4nt" )
- { # $servicesdir is used as a parameter for regcomp and has to be DOS style
- $servicesdir = qx{cygpath -d "$servicesdir"};
- chomp($servicesdir);
- $servicesdir =~ s/\\/\//g;
- }
+# if ( $^O =~ /cygwin/i )
+# { # $servicesdir is used as a parameter for regcomp and has to be DOS style
+# $servicesdir = qx{cygpath -d "$servicesdir"};
+# chomp($servicesdir);
+# $servicesdir =~ s/\\/\//g;
+# }
push(@installer::globals::removedirs, $servicesdir);
diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm
index 4ed369d625e5..ba04d1085532 100644
--- a/solenv/bin/modules/installer/systemactions.pm
+++ b/solenv/bin/modules/installer/systemactions.pm
@@ -59,11 +59,7 @@ sub create_directory
$infoline = "\nCreated directory: $directory\n";
push(@installer::globals::logfileinfo, $infoline);
- if ( defined $ENV{'USE_SHELL'} && $ENV{'USE_SHELL'} ne "4nt" )
- {
- my $localcall = "chmod 775 $directory \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ my $localcall = "chmod 775 $directory \>\/dev\/null 2\>\&1";
}
else
{
@@ -89,11 +85,8 @@ sub create_directory
$infoline = "\nAttention: Successfully created parent directory (should already be created before): $parentdir\n";
push(@installer::globals::logfileinfo, $infoline);
- if ( defined $ENV{'USE_SHELL'} && $ENV{'USE_SHELL'} ne "4nt" )
- {
- my $localcall = "chmod 775 $parentdir \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ my $localcall = "chmod 775 $parentdir \>\/dev\/null 2\>\&1";
+ system($localcall);
}
else
{
@@ -122,11 +115,8 @@ sub create_directory
$infoline = "\nAttention: Created directory \"$directory\" in the second try.\n";
push(@installer::globals::logfileinfo, $infoline);
- if ( defined $ENV{'USE_SHELL'} && $ENV{'USE_SHELL'} ne "4nt" )
- {
- my $localcall = "chmod 775 $directory \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ my $localcall = "chmod 775 $directory \>\/dev\/null 2\>\&1";
+ system($localcall);
}
else
{
@@ -177,11 +167,8 @@ sub create_directory_with_privileges
$infoline = "\nCreated directory: $directory\n";
push(@installer::globals::logfileinfo, $infoline);
- if ( defined $ENV{'USE_SHELL'} && $ENV{'USE_SHELL'} ne "4nt" )
- {
- my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
+ system($localcall);
}
else
{
@@ -207,11 +194,8 @@ sub create_directory_with_privileges
$infoline = "\nAttention: Successfully created parent directory (should already be created before): $parentdir\n";
push(@installer::globals::logfileinfo, $infoline);
- if ( defined $ENV{'USE_SHELL'} && $ENV{'USE_SHELL'} ne "4nt" )
- {
- my $localcall = "chmod $privileges $parentdir \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ my $localcall = "chmod $privileges $parentdir \>\/dev\/null 2\>\&1";
+ system($localcall);
}
else
{
@@ -240,11 +224,8 @@ sub create_directory_with_privileges
$infoline = "\nAttention: Created directory \"$directory\" in the second try.\n";
push(@installer::globals::logfileinfo, $infoline);
- if ( defined $ENV{'USE_SHELL'} && $ENV{'USE_SHELL'} ne "4nt" )
- {
- my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
+ system($localcall);
}
else
{
@@ -272,11 +253,8 @@ sub create_directory_with_privileges
$infoline = "\nAlready existing directory, did not create: $directory\n";
push(@installer::globals::logfileinfo, $infoline);
- if ( defined $ENV{'USE_SHELL'} && $ENV{'USE_SHELL'} ne "4nt" )
- {
- my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
+ system($localcall);
}
}
@@ -1423,11 +1401,8 @@ sub try_to_create_directory
$infoline = "\nCreated directory: $directory\n";
push(@installer::globals::logfileinfo, $infoline);
- if ( defined $ENV{'USE_SHELL'} && $ENV{'USE_SHELL'} ne "4nt" )
- {
- my $localcall = "chmod 775 $directory \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ my $localcall = "chmod 775 $directory \>\/dev\/null 2\>\&1";
+ system($localcall);
}
else
{
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index bac79e83d2e1..6c49a8db3cf2 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -1697,12 +1697,10 @@ sub include_cabs_into_msi
$msifilename = installer::converter::make_path_conform($msifilename);
- if ( $ENV{'USE_SHELL'} ne "4nt" ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- $idtdirbase =~ s/\//\\\\/g;
- $msifilename =~ s/\//\\\\/g;
- $extraslash = "\\";
- }
+ # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
+ $idtdirbase =~ s/\//\\\\/g;
+ $msifilename =~ s/\//\\\\/g;
+ $extraslash = "\\";
my $allcabfiles = installer::systemactions::find_file_with_file_extension("cab", $installdir);
diff --git a/solenv/bin/modules/installer/windows/sign.pm b/solenv/bin/modules/installer/windows/sign.pm
index 83404388d611..ecefbd9fd1f8 100644
--- a/solenv/bin/modules/installer/windows/sign.pm
+++ b/solenv/bin/modules/installer/windows/sign.pm
@@ -583,10 +583,8 @@ sub extract_cabs_from_database
my $fullsuccess = 1;
my $msidb = "msidb.exe"; # Has to be in the path
- if ( $ENV{'USE_SHELL'} ne "4nt" ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- $msidatabase =~ s/\//\\\\/g;
- }
+ # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
+ $msidatabase =~ s/\//\\\\/g;
foreach my $onefile ( keys %{$allcabfiles} )
{
@@ -617,10 +615,8 @@ sub include_cabs_into_database
my $fullsuccess = 1;
my $msidb = "msidb.exe"; # Has to be in the path
- if ( $ENV{'USE_SHELL'} ne "4nt" ) {
- # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- $msidatabase =~ s/\//\\\\/g;
- }
+ # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
+ $msidatabase =~ s/\//\\\\/g;
foreach my $onefile ( keys %{$allcabfiles} )
{