summaryrefslogtreecommitdiff
path: root/solenv/bin/modules/installer
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/bin/modules/installer')
-rw-r--r--solenv/bin/modules/installer/archivefiles.pm24
-rw-r--r--solenv/bin/modules/installer/download.pm8
-rw-r--r--solenv/bin/modules/installer/epmfile.pm19
-rw-r--r--solenv/bin/modules/installer/globals.pm1
-rw-r--r--solenv/bin/modules/installer/scriptitems.pm20
-rw-r--r--solenv/bin/modules/installer/setupscript.pm6
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm9
-rw-r--r--solenv/bin/modules/installer/windows/idtglobal.pm8
-rw-r--r--solenv/bin/modules/installer/windows/property.pm18
-rw-r--r--solenv/bin/modules/installer/worker.pm9
-rw-r--r--solenv/bin/modules/installer/ziplist.pm8
11 files changed, 106 insertions, 24 deletions
diff --git a/solenv/bin/modules/installer/archivefiles.pm b/solenv/bin/modules/installer/archivefiles.pm
index 80c468b61db2..4a9586c9fdd4 100644
--- a/solenv/bin/modules/installer/archivefiles.pm
+++ b/solenv/bin/modules/installer/archivefiles.pm
@@ -50,18 +50,26 @@ sub put_language_into_name
my $filename = "";
my $extension = "";
- if ( $oldname =~ /^\s*(.*)(\..*?)\s*$/ ) # files with extension
+ if ( $oldname =~ /en-US/ ) # files, that contain the language in the file name
{
- $filename = $1;
- $extension = $2;
+ $newname = $oldname;
+ $newname =~ s/en-US/$onelanguage/;
}
- else
+ else # files, that do not contain the language in the file name
{
- $filename = $oldname;
- $extension = "";
- }
+ if ( $oldname =~ /^\s*(.*)(\..*?)\s*$/ ) # files with extension
+ {
+ $filename = $1;
+ $extension = $2;
+ }
+ else
+ {
+ $filename = $oldname;
+ $extension = "";
+ }
- $newname = $1 . "_" . $onelanguage . $2;
+ $newname = $1 . "_" . $onelanguage . $2;
+ }
return $newname;
}
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index f98770a15790..34f228c791f7 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -653,10 +653,6 @@ sub get_install_type
my $type = "";
- my $cwsproduct = 0;
- # the environment variable CWS_WORK_STAMP is set only in CWS
- if ( $ENV{'CWS_WORK_STAMP'} ) { $cwsproduct = 1; }
-
if ( $installer::globals::languagepack )
{
$type = "langpack";
@@ -671,7 +667,7 @@ sub get_install_type
$type = $type . "-deb";
}
- if (( $installer::globals::packageformat eq "archive" ) && ( $cwsproduct ))
+ if ( $installer::globals::packageformat eq "archive" )
{
$type = $type . "-arc";
}
@@ -690,7 +686,7 @@ sub get_install_type
$type = $type . "-deb";
}
- if (( $installer::globals::packageformat eq "archive" ) && ( $cwsproduct ))
+ if ( $installer::globals::packageformat eq "archive" )
{
$type = $type . "-arc";
}
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index ffe79136b57e..136eca913dd9 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -426,6 +426,17 @@ sub create_epm_header
}
}
+ # Process for Linux packages, in which only a very basic license file is
+ # included into the package.
+
+ if ( $installer::globals::islinuxbuild )
+ {
+ if ( $variableshashref->{'COPYRIGHT_INTO_LINUXPACKAGE'} )
+ {
+ $licensefilename = "linuxcopyrightfile";
+ $license_in_package_defined = 1;
+ }
+ }
# searching for and readme file
for ( my $i = 0; $i <= $#{$filesinproduct}; $i++ )
@@ -447,7 +458,7 @@ sub create_epm_header
{
my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$licensefilename, "" , 0);
- if ( $$fileref eq "" ) { installer::exiter::exit_program("ERROR: Could not find license file $licensefilename!", "create_epm_header"); }
+ if ( $$fileref eq "" ) { installer::exiter::exit_program("ERROR: Could not find license file $licensefilename (A)!", "create_epm_header"); }
# Special handling to add the content of the file "license_en-US" to the solaris copyrightfile. But not for all products
@@ -500,12 +511,12 @@ sub create_epm_header
if (!($foundlicensefile))
{
- installer::exiter::exit_program("ERROR: Could not find license file $licensefilename", "create_epm_header");
+ installer::exiter::exit_program("ERROR: Could not find license file $licensefilename (B)", "create_epm_header");
}
if (!($foundreadmefile))
{
- installer::exiter::exit_program("ERROR: Could not find readme file $readmefilename", "create_epm_header");
+ installer::exiter::exit_program("ERROR: Could not find readme file $readmefilename (C)", "create_epm_header");
}
# including %replaces
@@ -1436,6 +1447,8 @@ sub set_autoprovreq_in_specfile
$autoreqprovline = "AutoReqProv\: no\n";
}
+ $autoreqprovline .= "%define _binary_filedigest_algorithm 1\n%define _binary_payload w9.gzdio\n";
+
for ( my $i = 0; $i <= $#{$changefile}; $i++ )
{
# Adding "autoreqprov" behind the line beginning with: Group:
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 72ab0215dbcf..564df06e79e2 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -78,6 +78,7 @@ BEGIN
"dgo",
"kok",
"mni",
+ "ca-XV",
"sat",
"ug",
"om",
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 778ca23e740a..ecda4f9a4e0b 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -1507,6 +1507,20 @@ sub add_License_Files_into_Installdir
$newfile->{'specificlanguage'} = "";
$newfile->{'haslanguagemodule'} = "0";
+ if ( defined $newfile->{'InstallName'} )
+ {
+ if ( $newfile->{'InstallName'} =~ /^\s*(.*?)_$defaultlanguage\.?(\w*?)\s*$/ )
+ {
+ my $localfilename = $1;
+ my $localextension = $2;
+
+ if ( $localextension eq "" ) { $newfile->{'InstallName'} = $localfilename; }
+ else { $newfile->{'InstallName'} = $localfilename . "\." . $localextension; }
+ }
+ }
+
+ $newfile->{'removelangfromfile'} = "1"; # Important for files with an InstallName, because language also has to be removed there.
+
if ( $foundofficedir )
{
$newfile->{'Dir'} = $officedirectorygid;
@@ -1529,6 +1543,12 @@ sub add_License_Files_into_Installdir
$infoline = "New files: Adding file $newfilename for the installation root to the file list. Language: $defaultlanguage\n";
push( @installer::globals::logfileinfo, $infoline);
+ if ( defined $newfile->{'InstallName'} )
+ {
+ $infoline = "New files: Using installation name: $newfile->{'InstallName'}\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+
# Collecting license and readme file for the installation set
push(@installer::globals::installsetfiles, $newfile);
diff --git a/solenv/bin/modules/installer/setupscript.pm b/solenv/bin/modules/installer/setupscript.pm
index 9da5340f915f..a3bf5abf50a9 100644
--- a/solenv/bin/modules/installer/setupscript.pm
+++ b/solenv/bin/modules/installer/setupscript.pm
@@ -155,6 +155,12 @@ sub add_lowercase_productname_setupscriptvariable
$newline = "\%LCONEWORDPRODUCTNAME " . lc($value) . "\n";
push(@{$variablesref} ,$newline);
$value = $original;
+ $value =~ s/\s*$//g;
+ $value =~ s/^\s*//g;
+ $value =~ s/ /\%20/g;
+ $newline = "\%MASKEDPRODUCTNAME " . $value . "\n";
+ push(@{$variablesref} ,$newline);
+ $value = $original;
$value =~ s/\s/\_/g;
# if ( $value =~ /^\s*(.*?)\_(\w)(.*?)\_(\w)(.*)\s*$/ ) { $value = $1 . $2 . $4; }
$newline = "\%UNIXPRODUCTNAME " . lc($value) . "\n";
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index 9666ef3e1af5..08f6eacf9e24 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -407,7 +407,12 @@ sub create_package
}
my $sla = 'sla.r';
- my $ref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0);
+ my $ref = "";
+
+ if ( ! $allvariables->{'HIDELICENSEDIALOG'} )
+ {
+ installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0);
+ }
my $localtempdir = $tempdir;
@@ -518,7 +523,7 @@ sub create_package
}
$systemcall = "cd $localtempdir && hdiutil makehybrid -hfs -hfs-openfolder $folder $folder -hfs-volume-name \"$volume_name\" -ov -o $installdir/tmp && hdiutil convert -ov -format UDZO $installdir/tmp.dmg -o $archive && ";
- if ($$ref ne "") {
+ if (( $ref ne "" ) && ( $$ref ne "" )) {
$systemcall .= "hdiutil unflatten $archive && Rez -a $$ref -o $archive && hdiutil flatten $archive &&";
}
$systemcall .= "rm -f $installdir/tmp.dmg";
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm
index 6f03228ca10a..b82f5175250b 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -769,9 +769,13 @@ sub prepare_language_idt_directory
installer::systemactions::create_directory($destinationdir . $installer::globals::separator . "Binary");
installer::systemactions::copy_directory($installer::globals::idttemplatepath . $installer::globals::separator . "Binary", $destinationdir . $installer::globals::separator . "Binary");
- if (( $installer::globals::patch ) && ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} ))
+ if ((( $installer::globals::patch ) && ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} )) || ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} ))
{
- my $newsourcedir = $installer::globals::unpackpath . $installer::globals::separator . $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'}; # path setting in list file dependent from unpackpath !?
+ my $bitmapdir = "";
+ if ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} ) { $bitmapdir = $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'}; }
+ if ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} ) { $bitmapdir = $allvariables->{'WINDOWSBITMAPDIRECTORY'}; }
+
+ my $newsourcedir = $installer::globals::unpackpath . $installer::globals::separator . $bitmapdir; # path setting in list file dependent from unpackpath !?
$infoline = "\nOverwriting files in directory \"" . $destinationdir . $installer::globals::separator . "Binary" . "\" with files from directory \"" . $newsourcedir . "\".\n";
push( @installer::globals::logfileinfo, $infoline);
if ( ! -d $newsourcedir )
diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm
index 7b890d06d58f..2ef083178122 100644
--- a/solenv/bin/modules/installer/windows/property.pm
+++ b/solenv/bin/modules/installer/windows/property.pm
@@ -393,7 +393,23 @@ sub set_important_properties
if ( $allvariables->{'HIDELICENSEDIALOG'} )
{
my $onepropertyline = "HIDEEULA" . "\t" . "1" . "\n";
- push(@{$propertyfile}, $onepropertyline);
+
+ my $already_defined = 0;
+
+ for ( my $i = 0; $i <= $#{$propertyfile}; $i++ )
+ {
+ if ( ${$propertyfile}[$i] =~ /^\s*HIDEEULA\t/ )
+ {
+ ${$propertyfile}[$i] = $onepropertyline;
+ $already_defined = 1;
+ last;
+ }
+ }
+
+ if ( ! $already_defined )
+ {
+ push(@{$propertyfile}, $onepropertyline);
+ }
}
# Setting .NET requirements
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index ff1d172c9b8f..6cc3c1e3f5db 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -491,6 +491,12 @@ sub analyze_and_save_logfile
if ( $installer::globals::creating_windows_installer_patch ) { $installer::globals::creating_windows_installer_patch = 0; }
+ # Exiting the packaging process, if an error occured.
+ # This is important, to get an error code "-1", if an error was found in the log file,
+ # that did not break the packaging process
+
+ if ( ! $is_success) { installer::exiter::exit_program("ERROR: Found an error in the logfile. Packaging failed.", "analyze_and_save_logfile"); }
+
return ($is_success, $finalinstalldir);
}
@@ -3132,7 +3138,8 @@ sub put_license_into_setup
# find and read english license file
my $licenselanguage = "en-US"; # always english !
- my $licensefilename = "LICENSE_" . $licenselanguage;
+ # my $licensefilename = "LICENSE_" . $licenselanguage;
+ my $licensefilename = "license_" . $licenselanguage . ".txt";
my $licenseincludepatharrayref = get_language_specific_include_pathes($includepatharrayref, $licenselanguage);
my $licenseref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$licensefilename, $licenseincludepatharrayref, 0);
diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm
index 00de1709473b..09b7718e2992 100644
--- a/solenv/bin/modules/installer/ziplist.pm
+++ b/solenv/bin/modules/installer/ziplist.pm
@@ -659,7 +659,7 @@ sub set_manufacturer
if (( $allvariables->{'DEFINEDMANUFACTURER'} ) && ( $allvariables->{'DEFINEDMANUFACTURER'} ne "" )) { $sunname = $allvariables->{'DEFINEDMANUFACTURER'}; }
else { installer::exiter::exit_program("ERROR: Property DEFINEDMANUFACTURER has to be set for this product!", "set_manufacturer"); }
$installer::globals::manufacturer = $sunname;
- $installer::globals::longmanufacturer = $sunname . ", Inc.";
+ $installer::globals::longmanufacturer = $sunname;
}
$allvariables->{'MANUFACTURER'} = $installer::globals::manufacturer;
@@ -742,6 +742,11 @@ sub replace_variables_in_ziplist_variables
my $localminor = $installer::globals::lastminor;
if ( $installer::globals::minor ) { $localminor = $installer::globals::minor; }
+ my $buildidstringcws = $installer::globals::build . $localminor . "(Build:" . $installer::globals::buildid . ")";
+
+ # the environment variable CWS_WORK_STAMP is set only in CWS
+ if ( $ENV{'CWS_WORK_STAMP'} ) { $buildidstringcws = $buildidstringcws . "\[CWS\:" . $ENV{'CWS_WORK_STAMP'} . "\]"; }
+
for ( my $i = 0; $i <= $#{$blockref}; $i++ )
{
if ($installer::globals::lastminor) { ${$blockref}[$i] =~ s/\{milestone\}/$milestonevariable/; }
@@ -752,6 +757,7 @@ sub replace_variables_in_ziplist_variables
else { ${$blockref}[$i] =~ s/\{buildid\}//; }
if ( $installer::globals::build ) { ${$blockref}[$i] =~ s/\{buildsource\}/$installer::globals::build/; }
else { ${$blockref}[$i] =~ s/\{build\}//; }
+ ${$blockref}[$i] =~ s/\{buildidcws\}/$buildidstringcws/;
}
}