summaryrefslogtreecommitdiff
path: root/solenv/bin/modules/installer/windows/msp.pm
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/bin/modules/installer/windows/msp.pm')
-rw-r--r--solenv/bin/modules/installer/windows/msp.pm56
1 files changed, 53 insertions, 3 deletions
diff --git a/solenv/bin/modules/installer/windows/msp.pm b/solenv/bin/modules/installer/windows/msp.pm
index 27f3342e4cc9..e65b649885f0 100644
--- a/solenv/bin/modules/installer/windows/msp.pm
+++ b/solenv/bin/modules/installer/windows/msp.pm
@@ -78,6 +78,13 @@ sub install_installation_sets
my $olddatabase = installer::windows::admin::make_admin_install($oldinstallsetdatabasepath, $oldinstallpath);
my $newdatabase = installer::windows::admin::make_admin_install($newinstallsetdatabasepath, $newinstallpath);
+ if ( $^O =~ /cygwin/i ) {
+ $olddatabase = qx{cygpath -w "$olddatabase"};
+ $olddatabase =~ s/\s*$//g;
+ $newdatabase = qx{cygpath -w "$newdatabase"};
+ $newdatabase =~ s/\s*$//g;
+ }
+
return ($olddatabase, $newdatabase);
}
@@ -93,10 +100,21 @@ sub extract_all_tables_from_pcpfile
my $infoline = "";
my $systemcall = "";
my $returnvalue = "";
+ my $extraslash = ""; # Has to be set for non-ActiveState perl
+
+ my $localfullpcpfile = $fullpcpfilepath;
+ my $localworkdir = $workdir;
+
+ if ( $^O =~ /cygwin/i ) {
+ # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
+ $localfullpcpfile =~ s/\//\\\\/g;
+ $localworkdir =~ s/\//\\\\/g;
+ $extraslash = "\\";
+ }
# Export of all tables by using "*"
- $systemcall = $msidb . " -d " . $fullpcpfilepath . " -f " . $workdir . " -e \*";
+ $systemcall = $msidb . " -d " . $localfullpcpfile . " -f " . $localworkdir . " -e " . $extraslash . "*";
$returnvalue = system($systemcall);
$infoline = "Systemcall: $systemcall\n";
@@ -148,7 +166,16 @@ sub include_tables_into_pcpfile
# Import of tables
- $systemcall = $msidb . " -d " . $fullpcpfilepath . " -f " . $workdir . " -i " . $tables;
+ my $localworkdir = $workdir;
+ my $localfullpcpfilepath = $fullpcpfilepath;
+
+ if ( $^O =~ /cygwin/i ) {
+ # msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
+ $localfullpcpfilepath =~ s/\//\\\\/g;
+ $localworkdir =~ s/\//\\\\/g;
+ }
+
+ $systemcall = $msidb . " -d " . $localfullpcpfilepath . " -f " . $localworkdir . " -i " . $tables;
$returnvalue = system($systemcall);
@@ -195,7 +222,25 @@ sub execute_msimsp
if ( -f $logfilename ) { unlink $logfilename; }
- $systemcall = $msimsp . " -s " . $fullpcpfilename . " -p " . $mspfilename . " -l " . $logfilename . " -f " . $msimsptemppath;
+ my $localfullpcpfilename = $fullpcpfilename;
+ my $localmspfilename = $mspfilename;
+ my $locallogfilename = $logfilename;
+ my $localmsimsptemppath = $msimsptemppath;
+
+ if ( $^O =~ /cygwin/i ) {
+ # msimsp.exe really wants backslashes. (And double escaping because system() expands the string.)
+ $localfullpcpfilename =~ s/\//\\\\/g;
+ $locallogfilename =~ s/\//\\\\/g;
+
+ $localmspfilename =~ s/\\/\\\\/g; # path already contains backslash
+ # $localmspfilename =~ s/\//\\\\/g;
+
+ $localmsimsptemppath = qx{cygpath -w "$localmsimsptemppath"};
+ $localmsimsptemppath =~ s/\\/\\\\/g;
+ $localmsimsptemppath =~ s/\s*$//g;
+ }
+
+ $systemcall = $msimsp . " -s " . $localfullpcpfilename . " -p " . $localmspfilename . " -l " . $locallogfilename . " -f " . $localmsimsptemppath;
installer::logger::print_message( "... $systemcall ...\n" );
$returnvalue = system($systemcall);
@@ -284,6 +329,8 @@ sub set_mspfilename
my $fullmspname = $mspdir . $installer::globals::separator . $databasename;
+ if ( $^O =~ /cygwin/i ) { $fullmspname =~ s/\//\\/g; }
+
return $fullmspname;
}
@@ -1191,6 +1238,9 @@ sub create_msp_patch
installer::logger::print_message( "... copying installation set ...\n" );
my $oldinstallationsetpath = $installer::globals::updatedatabasepath;
+
+ if ( $^O =~ /cygwin/i ) { $oldinstallationsetpath =~ s/\\/\//g; }
+
installer::pathanalyzer::get_path_from_fullqualifiedname(\$oldinstallationsetpath);
installer::systemactions::copy_complete_directory($oldinstallationsetpath, $mspdir);