summaryrefslogtreecommitdiff
path: root/solenv/bin/modules/installer/simplepackage.pm
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/bin/modules/installer/simplepackage.pm')
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm46
1 files changed, 28 insertions, 18 deletions
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index f151846445c1..9666ef3e1af5 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -354,13 +354,16 @@ sub replace_variables_in_scriptfile
#############################################
# Creating the "simple" package.
# "zip" for Windows
-# "dmg" on Mac OS X
# "tar.gz" for all other platforms
+# additionally "dmg" on Mac OS X
#############################################
sub create_package
{
- my ( $installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref ) = @_;
+ my ( $installdir, $archivedir, $packagename, $allvariables, $includepatharrayref, $languagestringref, $format ) = @_;
+
+ installer::logger::print_message( "... creating $installer::globals::packageformat file ...\n" );
+ installer::logger::include_header_into_logfile("Creating $installer::globals::packageformat file:");
# moving dir into temporary directory
my $pid = $$; # process id
@@ -372,9 +375,9 @@ sub create_package
installer::systemactions::rename_directory($installdir, $tempdir);
# creating new directory with original name
- installer::systemactions::create_directory($installdir);
+ installer::systemactions::create_directory($archivedir);
- my $archive = $installdir . $installer::globals::separator . $packagename . $installer::globals::archiveformat;
+ my $archive = $archivedir . $installer::globals::separator . $packagename . $format;
if ( $archive =~ /zip$/ )
{
@@ -391,7 +394,6 @@ sub create_package
}
elsif ( $archive =~ /dmg$/ )
{
- installer::worker::put_scpactions_into_installset("$tempdir/$packagename");
my $folder = (( -l "$tempdir/$packagename/Applications" ) or ( -l "$tempdir/$packagename/opt" )) ? $packagename : "\.";
if ( $allvariables->{'PACK_INSTALLED'} ) {
@@ -606,10 +608,22 @@ sub create_simple_package
}
}
+ # Work around Windows problems with long pathnames (see issue 50885) by
+ # putting the to-be-archived installation tree into the temp directory
+ # instead of the module output tree (unless LOCALINSTALLDIR dictates
+ # otherwise, anyway); can be removed once issue 50885 is fixed:
+ my $tempinstalldir = $installdir;
+ if ( $installer::globals::iswindowsbuild &&
+ $installer::globals::packageformat eq "archive" &&
+ !$installer::globals::localinstalldirset )
+ {
+ $tempinstalldir = File::Temp::tempdir;
+ }
+
# Creating subfolder in installdir, which shall become the root of package or zip file
my $subfolderdir = "";
- if ( $packagename ne "" ) { $subfolderdir = $installdir . $installer::globals::separator . $packagename; }
- else { $subfolderdir = $installdir; }
+ if ( $packagename ne "" ) { $subfolderdir = $tempinstalldir . $installer::globals::separator . $packagename; }
+ else { $subfolderdir = $tempinstalldir; }
if ( ! -d $subfolderdir ) { installer::systemactions::create_directory($subfolderdir); }
@@ -756,23 +770,19 @@ sub create_simple_package
installer::logger::include_header_into_logfile("Registering extensions:");
register_extensions($subfolderdir, $languagestringref);
- # Adding scpactions for mac installations sets, that use not dmg format. Without scpactions the
- # office does not start.
-
- if (( $installer::globals::packageformat eq "installed" ) && ( $installer::globals::compiler =~ /^unxmacx/ ))
+ if ( $installer::globals::compiler =~ /^unxmacx/ )
{
installer::worker::put_scpactions_into_installset("$installdir/$packagename");
}
# Creating archive file
- if (( $installer::globals::packageformat eq "archive" ) || ( $installer::globals::packageformat eq "dmg" ))
+ if ( $installer::globals::packageformat eq "archive" )
+ {
+ create_package($tempinstalldir, $installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref, $installer::globals::archiveformat);
+ }
+ elsif ( $installer::globals::packageformat eq "dmg" )
{
- # creating a package
- # -> zip for Windows
- # -> tar.gz for all other platforms
- installer::logger::print_message( "... creating $installer::globals::packageformat file ...\n" );
- installer::logger::include_header_into_logfile("Creating $installer::globals::packageformat file:");
- create_package($installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref);
+ create_package($installdir, $installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref, ".dmg");
}
# Analyzing the log file