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.pm42
-rw-r--r--solenv/bin/modules/installer/configuration.pm9
-rw-r--r--solenv/bin/modules/installer/control.pm60
-rw-r--r--solenv/bin/modules/installer/converter.pm263
-rw-r--r--solenv/bin/modules/installer/copyproject.pm25
-rw-r--r--solenv/bin/modules/installer/download.pm267
-rw-r--r--solenv/bin/modules/installer/downloadsigner.pm8
-rw-r--r--solenv/bin/modules/installer/environment.pm3
-rw-r--r--solenv/bin/modules/installer/epmfile.pm291
-rw-r--r--solenv/bin/modules/installer/followme.pm10
-rw-r--r--solenv/bin/modules/installer/globals.pm16
-rw-r--r--solenv/bin/modules/installer/helppack.pm537
-rw-r--r--solenv/bin/modules/installer/javainstaller.pm1885
-rw-r--r--solenv/bin/modules/installer/languagepack.pm59
-rw-r--r--solenv/bin/modules/installer/languages.pm39
-rw-r--r--solenv/bin/modules/installer/mail.pm136
-rw-r--r--solenv/bin/modules/installer/packagelist.pm16
-rw-r--r--solenv/bin/modules/installer/packagepool.pm8
-rw-r--r--solenv/bin/modules/installer/parameter.pm35
-rw-r--r--solenv/bin/modules/installer/pathanalyzer.pm2
-rw-r--r--solenv/bin/modules/installer/remover.pm4
-rw-r--r--solenv/bin/modules/installer/scppatchsoname.pm5
-rw-r--r--solenv/bin/modules/installer/scpzipfiles.pm8
-rw-r--r--solenv/bin/modules/installer/scriptitems.pm167
-rw-r--r--solenv/bin/modules/installer/setupscript.pm128
-rwxr-xr-xsolenv/bin/modules/installer/simplepackage.pm36
-rw-r--r--solenv/bin/modules/installer/substfilenamefiles.pm1
-rw-r--r--solenv/bin/modules/installer/systemactions.pm164
-rw-r--r--solenv/bin/modules/installer/windows/admin.pm17
-rw-r--r--solenv/bin/modules/installer/windows/assembly.pm8
-rw-r--r--solenv/bin/modules/installer/windows/component.pm10
-rw-r--r--solenv/bin/modules/installer/windows/createfolder.pm7
-rw-r--r--solenv/bin/modules/installer/windows/directory.pm45
-rw-r--r--solenv/bin/modules/installer/windows/feature.pm8
-rw-r--r--solenv/bin/modules/installer/windows/featurecomponent.pm71
-rw-r--r--solenv/bin/modules/installer/windows/file.pm3
-rw-r--r--solenv/bin/modules/installer/windows/font.pm1
-rw-r--r--solenv/bin/modules/installer/windows/idtglobal.pm47
-rw-r--r--solenv/bin/modules/installer/windows/language.pm3
-rw-r--r--solenv/bin/modules/installer/windows/media.pm3
-rwxr-xr-xsolenv/bin/modules/installer/windows/mergemodule.pm70
-rw-r--r--solenv/bin/modules/installer/windows/msiglobal.pm94
-rw-r--r--solenv/bin/modules/installer/windows/msp.pm12
-rw-r--r--solenv/bin/modules/installer/windows/property.pm38
-rw-r--r--solenv/bin/modules/installer/windows/registry.pm1
-rw-r--r--solenv/bin/modules/installer/windows/shortcut.pm5
-rw-r--r--solenv/bin/modules/installer/windows/sign.pm11
-rw-r--r--solenv/bin/modules/installer/windows/update.pm4
-rw-r--r--solenv/bin/modules/installer/windows/upgrade.pm17
-rw-r--r--solenv/bin/modules/installer/worker.pm199
-rw-r--r--solenv/bin/modules/installer/xpdinstaller.pm32
-rw-r--r--solenv/bin/modules/installer/ziplist.pm19
52 files changed, 1276 insertions, 3673 deletions
diff --git a/solenv/bin/modules/installer/archivefiles.pm b/solenv/bin/modules/installer/archivefiles.pm
index e85903c699aa..af23ed21e3a6 100644
--- a/solenv/bin/modules/installer/archivefiles.pm
+++ b/solenv/bin/modules/installer/archivefiles.pm
@@ -36,6 +36,7 @@ use installer::globals;
use installer::logger;
use installer::pathanalyzer;
use installer::systemactions;
+use Cwd;
#################################################################
# Changing the name for files with flag RENAME_TO_LANGUAGE
@@ -87,7 +88,7 @@ sub get_patch_file_list
$patchfilestring =~ s/^\s*\///;
$patchfilestring =~ s/^\s*\\//;
- my $patchfilesarray = installer::converter::convert_stringlist_into_array_without_linebreak_and_quotes(\$patchfilestring, ",");
+ my $patchfilesarray = installer::converter::convert_stringlist_into_array_without_newline(\$patchfilestring, ",");
return $patchfilesarray;
}
@@ -241,9 +242,6 @@ sub resolving_archive_flag
my $unzipdir;
- # if ($iscommonfile) { $unzipdir = $commonunzipdirbase . $installer::globals::separator . $onelanguage . $installer::globals::separator; }
- # else { $unzipdir = $platformunzipdirbase . $installer::globals::separator . $onelanguage . $installer::globals::separator; }
-
$unzipdir = $platformunzipdirbase . $installer::globals::separator . $onelanguage . $installer::globals::separator;
installer::systemactions::create_directory($unzipdir); # creating language specific subdirectories
@@ -264,10 +262,13 @@ sub resolving_archive_flag
my $counter = 0;
my $contains_dll = 0;
+ my @dllList = ();
+ my @dirs = ();
foreach my $member ( $zip->memberNames() )
{
$counter++;
- if ( $member =~ /.dll\s*$/ ) { $contains_dll = 1; }
+ if ( $member =~ /.dll\s*$/i ) { $contains_dll = 1; push(@dllList, $member); }
+ if ( $member =~ m/\/$/ ) { push(@dirs, $member); }
}
if (! ( $counter > 0 )) # the zipfile is empty
@@ -284,31 +285,34 @@ sub resolving_archive_flag
if (( $^O =~ /cygwin/i ) && ( $contains_dll ))
{
- # Make dll's executable
- $systemcall = "cd $unzipdir; find . -name \\*.dll -exec chmod 775 \{\} \\\;";
- $returnvalue = system($systemcall);
- $infoline = "Systemcall: $systemcall\n";
+ my $dir = getcwd();
+ chdir($unzipdir);
+ my $changed = chmod(0775, @dllList);
+ $infoline = "Changed mode of $changed files (of ".scalar(@dllList).")\n";
push( @installer::globals::logfileinfo, $infoline);
+ chdir($dir);
- if ($returnvalue)
+ if ($changed != scalar(@dllList))
{
- $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+ $infoline = "ERROR: Could not chmod all files!\n";
push( @installer::globals::logfileinfo, $infoline);
}
}
- if ( ! $installer::globals::iswindowsbuild )
+ if ( ! $installer::globals::iswindowsbuild && scalar(@dirs) > 0 )
{
+ my $dir = getcwd();
+ chdir($unzipdir);
# Setting unix rights to "775" for all created directories inside the package
+ my $changed = chmod(0775, @dirs);
+ $infoline = "Changed mode of : $changed; should be: ".scalar(@dirs)."\n";
+ chdir($dir);
- $systemcall = "cd $unzipdir; find . -type d -exec chmod 775 \{\} \\\;";
- $returnvalue = system($systemcall);
- $infoline = "Systemcall: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
- if ($returnvalue)
+ if ($changed != scalar(@dirs))
{
- $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+ $infoline = "ERROR: Could not chmod all files!\n";
push( @installer::globals::logfileinfo, $infoline);
}
}
@@ -411,13 +415,9 @@ sub resolving_archive_flag
$newfile{'Styles'} =~ s/\,\s*\,/\,/;
$newfile{'Styles'} =~ s/\(\s*\,/\(/;
$newfile{'Styles'} =~ s/\,\s*\)/\)/;
- # $infoline = "Removing PATCH flag from: $zipname\n";
- # push( @installer::globals::logfileinfo, $infoline);
}
else
{
- # $infoline = "Keeping PATCH flag at: $zipname\n";
- # push( @installer::globals::logfileinfo, $infoline);
push( @keptpatchflags, $zipname); # collecting all PATCH flags
}
}
diff --git a/solenv/bin/modules/installer/configuration.pm b/solenv/bin/modules/installer/configuration.pm
index 4aa82d25b5b2..0fb587f68bb6 100644
--- a/solenv/bin/modules/installer/configuration.pm
+++ b/solenv/bin/modules/installer/configuration.pm
@@ -482,7 +482,6 @@ sub insert_into_config_file
elsif ( $styles =~ /CFG_NUMERIC/ ) { $valuetype = "int"; }
elsif ( $styles =~ /CFG_BOOLEAN/ ) { $valuetype = "boolean"; }
elsif ( $styles =~ /CFG_STRINGLIST/ ) { $valuetype = "string-list"; }
-# elsif ( $styles =~ /CFG_STRINGLIST/ ) { $valuetype = "string-list oor:separator=\"\|\""; }
else
{
installer::exiter::exit_program("ERROR: Unknown configuration value type: $styles", "insert_into_config_file");
@@ -525,8 +524,8 @@ sub insert_into_config_file
if (( $styles =~ /\bCREATE\b/ ) && (!($isbracketnode)))
{
- # my $typepart = 'oor:type="xs:VALUETYPE"'; # VALUETYPE can be "string", "boolean", ...
-
+ # $typepart is 'oor:type="xs:VALUETYPE"';
+ # VALUETYPE can be "string", "boolean", ...
my $localtypepart = $typepart;
$localtypepart =~ s/VALUETYPE/$valuetype/;
@@ -552,8 +551,6 @@ sub insert_into_config_file
# ToDo: Substituting the setup replace variables
- # replace_setting_variables();
-
$value =~ s/^\s*\<//;
$value =~ s/\>\s*$//;
@@ -577,14 +574,12 @@ sub insert_into_config_file
if (!($oneconfig->{'isisocode'} )) # this is the simpe case
{
- # my $valueline = '<value SEPARATORPART>VALUECONTENT</value>' . "\n";
$newvalueline = $valueline;
$newvalueline =~ s/VALUECONTENT/$value/g;
$newvalueline =~ s/SEPARATORPART/$separatorpart/;
}
else
{
- # my $langvalueline = '<value xml:lang="SAVEDLANGUAGE">VALUECONTENT</value>' . "\n";
$newvalueline = $langvalueline;
$newvalueline =~ s/VALUECONTENT/$value/;
my $savedlanguage = $oneconfig->{'Key'};
diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm
index 20bc2efdcf4f..3f6b43f563fb 100644
--- a/solenv/bin/modules/installer/control.pm
+++ b/solenv/bin/modules/installer/control.pm
@@ -77,7 +77,6 @@ sub check_system_path
{
# The following files have to be found in the environment variable PATH
# All platforms: zip
- # Windows only: msvcp70.dll, msvcr70.dll for regcomp.exe
# Windows only: "msiinfo.exe", "msidb.exe", "uuidgen.exe", "makecab.exe", "msitran.exe", "expand.exe" for msi database and packaging
my $onefile;
@@ -87,9 +86,14 @@ sub check_system_path
if( $^O =~ /cygwin/i )
{ # When using cygwin's perl the PATH variable is POSIX style and ...
- $pathvariable = qx{cygpath -mp "$pathvariable"} ;
+ my $temparrayref = installer::converter::convert_stringlist_into_array_without_newline(\$pathvariable, $local_pathseparator);
+ foreach $i (0..$#$temparrayref) {
+ $$temparrayref[$i] = qx{cygpath -m "$$temparrayref[$i]"};
+ chomp($$temparrayref[$i]);
+ }
# has to be converted to DOS style for further use.
$local_pathseparator = ';';
+ $pathvariable = join($local_pathseparator, @$temparrayref);
}
my $patharrayref = installer::converter::convert_stringlist_into_array(\$pathvariable, $local_pathseparator);
@@ -100,19 +104,6 @@ sub check_system_path
if (($installer::globals::iswin) && ($installer::globals::iswindowsbuild))
{
@needed_files_in_path = ("zip.exe", "msiinfo.exe", "msidb.exe", "uuidgen.exe", "makecab.exe", "msitran.exe", "expand.exe");
-
- if ( $installer::globals::compiler eq "wntmsci8" )
- {
- push(@needed_files_in_path, "msvcp70.dll");
- push(@needed_files_in_path, "msvcr70.dll");
- }
-
- if ( $installer::globals::compiler eq "wntmsci10" )
- {
- push(@needed_files_in_path, "msvcp71.dll");
- push(@needed_files_in_path, "msvcr71.dll");
- }
-
}
elsif ($installer::globals::iswin)
{
@@ -341,11 +332,11 @@ sub check_logfile
# Errors are all errors, but not the Windows installer table "Error.idt"
my $compareline = $line;
- $compareline =~ s/Error\.idt//g; # removing all occurences of "Error.idt"
- $compareline =~ s/Error\.mlf//g; # removing all occurences of "Error.mlf"
- $compareline =~ s/Error\.ulf//g; # removing all occurences of "Error.ulf"
- $compareline =~ s/Error\.idl//g; # removing all occurences of "Error.idl"
- $compareline =~ s/Error\.html//g; # removing all occurences of "Error.html"
+ $compareline =~ s/Error\.idt//g; # removing all occurrences of "Error.idt"
+ $compareline =~ s/Error\.mlf//g; # removing all occurrences of "Error.mlf"
+ $compareline =~ s/Error\.ulf//g; # removing all occurrences of "Error.ulf"
+ $compareline =~ s/Error\.idl//g; # removing all occurrences of "Error.idl"
+ $compareline =~ s/Error\.html//g; # removing all occurrences of "Error.html"
if ( $compareline =~ /\bError\b/i )
{
@@ -364,7 +355,7 @@ sub check_logfile
{
my $line = "\n*********************************************************************\n";
push(@output, $line);
- $line = "ERROR: The following errors occured in packaging process:\n\n";
+ $line = "ERROR: The following errors occurred in packaging process:\n\n";
push(@output, $line);
for ( my $i = 0; $i <= $#errors; $i++ )
@@ -375,7 +366,6 @@ sub check_logfile
$line = "*********************************************************************\n";
push(@output, $line);
-# exit(-1);
}
else
{
@@ -440,7 +430,6 @@ sub determine_ship_directory
{
my $number_of_languages = installer::systemactions::get_number_of_langs($languagestring);
chomp(my $shorter = `echo $languagestring | md5sum | sed -e "s/ .*//g"`);
- # $languagestring = $shorter;
my $id = substr($shorter, 0, 8); # taking only the first 8 digits
$languagestring = "lang_" . $number_of_languages . "_id_" . $id;
}
@@ -455,6 +444,7 @@ sub determine_ship_directory
}
if ( $installer::globals::languagepack ) { $productstring = $productstring . "_languagepack"; }
+ if ( $installer::globals::helppack ) { $productstring = $productstring . "_helppack"; }
if ( $installer::globals::patch ) { $productstring = $productstring . "_patch"; }
my $destdir = $shipdrive . $installer::globals::separator . $installer::globals::compiler .
@@ -654,11 +644,6 @@ sub read_encodinglist
$installer::globals::msiencoding = \%msiencoding;
$installer::globals::msilanguage = \%msilanguage;
-
- # my $key;
- # foreach $key (keys %{$installer::globals::msiencoding}) { print "A Key: $key : Value: $installer::globals::msiencoding->{$key}\n"; }
- # foreach $key (keys %{$installer::globals::msilanguage}) { print "B Key: $key : Value: $installer::globals::msilanguage->{$key}\n"; }
-
}
#############################################################
@@ -720,24 +705,6 @@ sub set_addchildprojects
push( @installer::globals::globallogfileinfo, $infoline);
}
-####################################################################
-# Setting global variable "$installer::globals::addjavainstaller"
-####################################################################
-
-sub set_addjavainstaller
-{
- my ($allvariables) = @_;
-
- if ( $allvariables->{'JAVAINSTALLER'} ) { $installer::globals::addjavainstaller = 1; }
-
- if ( $installer::globals::patch ) { $installer::globals::addjavainstaller = 0; }
- if ( $installer::globals::languagepack ) { $installer::globals::addjavainstaller = 0; }
- if ( $allvariableshashref->{'XPDINSTALLER'} ) { $installer::globals::addjavainstaller = 0; }
-
- my $infoline = "Value of \$installer::globals::addjavainstaller: $installer::globals::addjavainstaller\n";
- push( @installer::globals::globallogfileinfo, $infoline);
-}
-
#######################################################################
# Setting global variable "$installer::globals::addsystemintegration"
#######################################################################
@@ -750,6 +717,7 @@ sub set_addsystemintegration
if ( $installer::globals::patch ) { $installer::globals::addsystemintegration = 0; }
if ( $installer::globals::languagepack ) { $installer::globals::addsystemintegration = 0; }
+ if ( $installer::globals::helppack ) { $installer::globals::addsystemintegration = 0; }
if (( $installer::globals::packageformat eq "native" ) || ( $installer::globals::packageformat eq "portable" )) { $installer::globals::addsystemintegration = 0; }
my $infoline = "Value of \$installer::globals::addsystemintegration: $installer::globals::addsystemintegration\n";
diff --git a/solenv/bin/modules/installer/converter.pm b/solenv/bin/modules/installer/converter.pm
index beeec52b71ac..53eb1081aa06 100644
--- a/solenv/bin/modules/installer/converter.pm
+++ b/solenv/bin/modules/installer/converter.pm
@@ -39,16 +39,10 @@ sub convert_array_to_hash
my %newhash = ();
- for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
+ for (@{$arrayref})
{
- my $line = ${$arrayref}[$i];
-
- if ( $line =~ /^\s*([\w-]+?)\s+(.*?)\s*$/ )
- {
- my $key = $1;
- my $value = $2;
- $newhash{$key} = $value;
- }
+ next unless /^\s*([\w-]+?)\s+(.*?)\s*$/;
+ $newhash{$1} = $2;
}
return \%newhash;
@@ -58,44 +52,7 @@ sub convert_hash_into_array
{
my ($hashref) = @_;
- my @array = ();
- my $key;
-
- foreach $key (keys %{$hashref})
- {
- my $value = $hashref->{$key};
- my $input = "$key = $value\n";
- push(@array ,$input);
- }
-
- return \@array
-}
-
-#############################################################################
-# Converting a string list with separator $listseparator
-# into an array
-#############################################################################
-
-sub convert_stringlist_into_array_without_linebreak_and_quotes
-{
- my ( $includestringref, $listseparator ) = @_;
-
- my @newarray = ();
- my $first;
- my $last = ${$includestringref};
-
- while ( $last =~ /^\s*(.+?)\Q$listseparator\E(.+)\s*$/) # "$" for minimal matching
- {
- $first = $1;
- $last = $2;
- $first =~ s/\"//g;
- push(@newarray, $first);
- }
-
- $last =~ s/\"//g;
- push(@newarray, $last);
-
- return \@newarray;
+ return [map { "$_ = $hashref->{$_}\n" } keys %{$hashref}];
}
#############################################################################
@@ -107,22 +64,7 @@ sub convert_stringlist_into_array
{
my ( $includestringref, $listseparator ) = @_;
- my @newarray = ();
- my $first;
- my $last = ${$includestringref};
-
- while ( $last =~ /^\s*(.+?)\Q$listseparator\E(.+)\s*$/) # "$" for minimal matching
- {
- $first = $1;
- $last = $2;
- # Problem with two directly following listseparators. For example a path with two ";;" directly behind each other
- $first =~ s/^$listseparator//;
- push(@newarray, "$first\n");
- }
-
- push(@newarray, "$last\n");
-
- return \@newarray;
+ return [map "$_\n", split /\Q$listseparator\E\s*/, ${$includestringref}];
}
#############################################################################
@@ -134,20 +76,7 @@ sub convert_stringlist_into_array_without_newline
{
my ( $includestringref, $listseparator ) = @_;
- my @newarray = ();
- my $first;
- my $last = ${$includestringref};
-
- while ( $last =~ /^\s*(.+?)\Q$listseparator\E(.+)\s*$/) # "$" for minimal matching
- {
- $first = $1;
- $last = $2;
- push(@newarray, "$first");
- }
-
- push(@newarray, "$last");
-
- return \@newarray;
+ return [split /\Q$listseparator\E\s*/, ${$includestringref}];
}
#############################################################################
@@ -159,20 +88,7 @@ sub convert_stringlist_into_hash
{
my ( $includestringref, $listseparator ) = @_;
- my %newhash = ();
- my $first;
- my $last = ${$includestringref};
-
- while ( $last =~ /^\s*(.+?)\Q$listseparator\E(.+)\s*$/) # "$" for minimal matching
- {
- $first = $1;
- $last = $2;
- $newhash{$first} = 1;
- }
-
- $newhash{$last} = 1;
-
- return \%newhash;
+ return {map {$_, 1} split /\Q$listseparator\E\s*/, ${$includestringref}};
}
#############################################################################
@@ -184,20 +100,11 @@ sub convert_whitespace_stringlist_into_array
{
my ( $includestringref ) = @_;
- my @newarray = ();
- my $first;
- my $last = ${$includestringref};
+ my $tmp = ${$includestringref};
+ $tmp = s/^\s+//;
+ $tmp = s/\s+$//;
- while ( $last =~ /^\s*(\S+?)\s+(\S+)\s*$/) # "$" for minimal matching
- {
- $first = $1;
- $last = $2;
- push(@newarray, "$first\n");
- }
-
- push(@newarray, "$last\n");
-
- return \@newarray;
+ return [map "$_\n", split /\s+/, $tmp];
}
#############################################################################
@@ -208,16 +115,13 @@ sub convert_array_to_comma_separated_string
{
my ( $arrayref ) = @_;
- my $newstring = "";
-
- for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
- {
- my $arrayentry = ${$arrayref}[$i];
- $arrayentry =~ s/\s*$//;
- $newstring = $newstring . $arrayentry . ",";
+ my $newstring;
+ for (@{$arrayref}) {
+ my $tmp = $_;
+ $tmp =~ s/\s+$//;
+ $newstring .= "$tmp,";
}
-
- $newstring =~ s/\,\s*$//;
+ $newstring =~ s/\,$//;
return $newstring;
}
@@ -230,16 +134,13 @@ sub convert_array_to_space_separated_string
{
my ( $arrayref ) = @_;
- my $newstring = "";
-
- for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
- {
- my $arrayentry = ${$arrayref}[$i];
- $arrayentry =~ s/\s*$//;
- $newstring = $newstring . $arrayentry . " ";
+ my $newstring;
+ for (@{$arrayref}) {
+ my $tmp = $_;
+ $tmp =~ s/\s+$//;
+ $newstring .= "$tmp ";
}
-
- $newstring =~ s/\s*$//;
+ $newstring =~ s/ $//;
return $newstring;
}
@@ -253,9 +154,8 @@ sub convert_slash_to_backslash
{
my ($filesarrayref) = @_;
- for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
+ for my $onefile (@{$filesarrayref})
{
- my $onefile = ${$filesarrayref}[$i];
if ( $onefile->{'Name'} ) { $onefile->{'Name'} =~ s/\//\\/g; }
}
}
@@ -269,11 +169,7 @@ sub copy_item_object
{
my ($olditemhashref, $newitemhashref) = @_;
- foreach $key (keys %{$olditemhashref})
- {
- my $value = $olditemhashref->{$key};
- $newitemhashref->{$key} = $value;
- }
+ $newitemhashref = {%{$olditemhashref}};
}
#################################################################
@@ -286,18 +182,9 @@ sub copy_item_object
sub make_path_conform
{
my ( $path ) = @_;
+ my $s = $installer::globals::separator;
- my $oldpath = $path;
-
- while ( $path =~ /(^.*)(\Q$installer::globals::separator\E.*?[^\.])(\Q$installer::globals::separator\E\.\.)(\Q$installer::globals::separator\E.*$)/ )
- {
- my $part1 = $1;
- my $part2 = $4;
-
- # $2 must not end with a "." ! Problem with "..\.."
-
- $path = $part1 . $part2;
- }
+ while ($path =~ s/[^\.\Q$s\E]+?\Q$s\E\.\.(?:\Q$s\E|$)//g) {}
return $path;
}
@@ -309,61 +196,7 @@ sub make_path_conform
sub copy_collector
{
- my ( $oldcollector ) = @_;
-
- my @newcollector = ();
-
- for ( my $i = 0; $i <= $#{$oldcollector}; $i++ )
- {
- my %newhash = ();
- my $key;
-
- foreach $key (keys %{${$oldcollector}[$i]})
- {
- $newhash{$key} = ${$oldcollector}[$i]->{$key};
- }
-
- push(@newcollector, \%newhash);
- }
-
- return \@newcollector;
-}
-
-#################################################################
-# Copying an array
-#################################################################
-
-sub copy_array_from_references
-{
- my ( $arrayref ) = @_;
-
- my @newarray = ();
-
- for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
- {
- push(@newarray, ${$arrayref}[$i]);
- }
-
- return \@newarray;
-}
-
-###########################################################
-# Copying a hash
-###########################################################
-
-sub copy_hash_from_references
-{
- my ($hashref) = @_;
-
- my %newhash = ();
- my $key;
-
- foreach $key (keys %{$hashref})
- {
- $newhash{$key} = $hashref->{$key};
- }
-
- return \%newhash;
+ return [map { {%{$_}} } @{$_[0]}];
}
#################################################################
@@ -376,41 +209,11 @@ sub combine_arrays_from_references_first_win
my $hashref1 = convert_array_to_hash($arrayref1);
my $hashref2 = convert_array_to_hash($arrayref2);
- my %commonhash = ();
- my @newarray = ();
-
- # starting with second hash
- foreach my $key ( keys %{$hashref2} ) { $commonhash{$key} = $hashref2->{$key}; }
- # overwriting with first hash
- foreach my $key ( keys %{$hashref1} ) { $commonhash{$key} = $hashref1->{$key}; }
-
- # Creating the new array
- foreach my $key ( keys %commonhash ) { push(@newarray, "$key $commonhash{$key}\n"); }
-
- return \@newarray;
-}
-#################################################################
-# Combining two arrays
-#################################################################
-
-sub combine_arrays_from_references
-{
- my ( $arrayref1, $arrayref2 ) = @_;
-
- my @newarray = ();
-
- for ( my $i = 0; $i <= $#{$arrayref1}; $i++ )
- {
- push(@newarray, ${$arrayref1}[$i]);
- }
-
- for ( my $i = 0; $i <= $#{$arrayref2}; $i++ )
- {
- push(@newarray, ${$arrayref2}[$i]);
- }
+ # add key-value pairs from hash1 to hash2 (overwrites existing keys)
+ @{$hashref2}{keys %{$hashref1}} = values %{$hashref1};
- return \@newarray;
+ return [map { "$_ $hashref2->{$_}\n" } keys %{$hashref2}];
}
#################################################################
@@ -453,9 +256,9 @@ sub resolve_masked_separator
{
my ($arrayref, $separator, $replacementstring) = @_;
- for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
+ for (@{$arrayref})
{
- ${$arrayref}[$i] =~ s/$replacementstring/$separator/g
+ s/$replacementstring/$separator/g;
}
}
diff --git a/solenv/bin/modules/installer/copyproject.pm b/solenv/bin/modules/installer/copyproject.pm
index 5db9cf7f8b04..8157db4983f8 100644
--- a/solenv/bin/modules/installer/copyproject.pm
+++ b/solenv/bin/modules/installer/copyproject.pm
@@ -32,7 +32,6 @@ use installer::converter;
use installer::files;
use installer::globals;
use installer::logger;
-use installer::mail;
use installer::systemactions;
use installer::worker;
@@ -69,17 +68,14 @@ sub copy_project
installer::systemactions::copy_one_file($source, $destination);
- if ( $destination =~ /install\s*$/ )
+ if ( $onefile->{'UnixRights'} )
{
- my $localcall = "chmod 775 $destination \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod oct($onefile->{'UnixRights'}), $destination;
}
-
- if ( $onefile->{'UnixRights'} )
+ elsif ( $destination =~ /install\s*$/ )
{
- my $localcall = "chmod $onefile->{'UnixRights'} $destination \>\/dev\/null 2\>\&1";
- system($localcall);
- }
+ chmod 0775, $destination;
+ }
}
# copy ScpActions
@@ -93,16 +89,13 @@ sub copy_project
installer::systemactions::copy_one_file($source, $destination);
- if ( $destination =~ /install\s*$/ )
+ if ( $onefile->{'UnixRights'} )
{
- my $localcall = "chmod 775 $destination \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod oct($onefile->{'UnixRights'}), $destination;
}
-
- if ( $onefile->{'UnixRights'} )
+ elsif ( $destination =~ /install\s*$/ )
{
- my $localcall = "chmod $onefile->{'UnixRights'} $destination \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod 0775, $destination;
}
}
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index 34f228c791f7..604f7574cc95 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -118,8 +118,7 @@ sub save_script_file
if ( ! $installer::globals::iswindowsbuild )
{
- my $localcall = "chmod 775 $newscriptfilename \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod 0775, $newscriptfilename;
}
return $newscriptfilename;
@@ -339,8 +338,7 @@ sub tar_package
push( @installer::globals::logfileinfo, $infoline);
}
- my $localcall = "chmod 775 $tarfilename \>\/dev\/null 2\>\&1";
- $returnvalue = system($localcall);
+ chmod 0775, $tarfilename;
return ( -s $tarfilename );
}
@@ -422,6 +420,7 @@ sub get_installation_type
my $type = "";
if ( $installer::globals::languagepack ) { $type = "langpack"; }
+ elsif ( $installer::globals::helppack ) { $type = "helppack"; }
else { $type = "install"; }
return $type;
@@ -443,14 +442,6 @@ sub get_downloadname_language
$languages =~ s/_en-US//;
}
- # en-US is default language and can be removed therefore
- # for one-language installation sets
-
- # if ( $languages =~ /^\s*en-US\s*$/ )
- # {
- # $languages = "";
- # }
-
if ( length ($languages) > $installer::globals::max_lang_length )
{
$languages = 'multi';
@@ -467,25 +458,21 @@ sub get_downloadname_productname
{
my ($allvariables) = @_;
- my $start = "OOo";
+ my $start = "LibO";
- if ( $allvariables->{'PRODUCTNAME'} eq "OpenOffice.org" ) { $start = "OOo"; }
+ if ( $allvariables->{'PRODUCTNAME'} eq "LibreOffice" ) { $start = "LibO"; }
- if ( $allvariables->{'PRODUCTNAME'} eq "OOo-dev" ) { $start = "OOo-Dev"; }
+ if ( $allvariables->{'PRODUCTNAME'} eq "LibO-dev" ) { $start = "LibO-Dev"; }
- if (( $allvariables->{'PRODUCTNAME'} eq "OpenOffice.org" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )) { $start = "OOo-SDK"; }
+ if (( $allvariables->{'PRODUCTNAME'} eq "LibreOffice" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )) { $start = "LibO-SDK"; }
- if (( $allvariables->{'PRODUCTNAME'} eq "OOo-dev" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )) { $start = "OOo-Dev-SDK"; }
+ if (( $allvariables->{'PRODUCTNAME'} eq "LibO-dev" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )) { $start = "LibO-Dev-SDK"; }
- if ( $allvariables->{'PRODUCTNAME'} eq "URE" ) { $start = "OOo-URE"; }
+ if ( $allvariables->{'PRODUCTNAME'} eq "URE" ) { $start = "LibO-URE"; }
- if ( $allvariables->{'PRODUCTNAME'} eq "BrOffice.org" ) { $start = "BrOo"; }
+ if ( $allvariables->{'PRODUCTNAME'} eq "OxygenOffice" ) { $start = "OOOP"; }
- if ( $allvariables->{'PRODUCTNAME'} eq "BrOo-dev" ) { $start = "BrOo-Dev"; }
- if (( $allvariables->{'PRODUCTNAME'} eq "BrOffice.org" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )) { $start = "BrOo-SDK"; }
-
- if (( $allvariables->{'PRODUCTNAME'} eq "BrOo-dev" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )) { $start = "BrOo-Dev-SDK"; }
return $start;
}
@@ -592,7 +579,6 @@ sub get_download_platformname
}
else
{
- # $platformname = $installer::globals::packageformat;
$platformname = $installer::globals::compiler;
}
@@ -657,12 +643,31 @@ sub get_install_type
{
$type = "langpack";
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
$type = $type . "-rpm";
}
- if ( $installer::globals::islinuxdebbuild )
+ if ( $installer::globals::isdebbuild )
+ {
+ $type = $type . "-deb";
+ }
+
+ if ( $installer::globals::packageformat eq "archive" )
+ {
+ $type = $type . "-arc";
+ }
+ }
+ elsif ( $installer::globals::helppack )
+ {
+ $type = "helppack";
+
+ if ( $installer::globals::isrpmbuild )
+ {
+ $type = $type . "-rpm";
+ }
+
+ if ( $installer::globals::isdebbuild )
{
$type = $type . "-deb";
}
@@ -676,12 +681,12 @@ sub get_install_type
{
$type = "install";
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
$type = $type . "-rpm";
}
- if ( $installer::globals::islinuxdebbuild )
+ if ( $installer::globals::isdebbuild )
{
$type = $type . "-deb";
}
@@ -709,7 +714,7 @@ sub get_downloadname_addon
{
my $addon = "";
- if ( $installer::globals::islinuxdebbuild ) { $addon = $addon . "_deb"; }
+ if ( $installer::globals::isdebbuild ) { $addon = $addon . "_deb"; }
if ( $installer::globals::product =~ /_wJRE\s*$/ ) { $addon = "_wJRE"; }
@@ -753,7 +758,6 @@ sub get_current_version
my $infoline = "";
my $versionstring = "";
my $filename = "version.info";
- # $filename = $installer::globals::ooouploaddir . $installer::globals::separator . $filename;
if ( -f $filename )
{
@@ -778,9 +782,7 @@ sub get_current_version
###############################################################################################
# Setting the download file name
# Syntax:
-# (PRODUCTNAME)_(VERSION)_(TIMESTAMP)_(OS)_(ARCH)_(INSTALLTYPE)_(LANGUAGE).(FILEEXTENSION)
-# Rules:
-# Timestamp only for Beta and Release Candidate
+# (PRODUCTNAME)_(VERSION)_(OS)_(ARCH)_(INSTALLTYPE)_(LANGUAGE).(FILEEXTENSION)
###############################################################################################
sub set_download_filename
@@ -789,7 +791,6 @@ sub set_download_filename
my $start = get_downloadname_productname($allvariables);
my $versionstring = get_download_version($allvariables);
- my $date = set_date_string($allvariables);
my $platform = get_download_platformname();
my $architecture = get_download_architecture();
my $type = get_install_type($allvariables);
@@ -797,7 +798,7 @@ sub set_download_filename
# Setting the extension happens automatically
- my $filename = $start . "_" . $versionstring . "_" . $date . "_" . $platform . "_" . $architecture . "_" . $type . "_" . $language;
+ my $filename = $start . "_" . $versionstring . "_" . "_" . $platform . "_" . $architecture . "_" . $type . "_" . $language;
$filename =~ s/\_\_/\_/g; # necessary, if $versionstring or $platform or $language are empty
$filename =~ s/\_\s*$//; # necessary, if $language and $addon are empty
@@ -986,16 +987,16 @@ sub put_windows_productname_into_template
}
##################################################################
-# Windows: Including the path to the banner.bmp into nsi template
+# Windows: Substituting the path to a file into the nsi template
##################################################################
-sub put_banner_bmp_into_template
+sub substitute_path_into_template
{
- my ($templatefile, $includepatharrayref, $allvariables) = @_;
+ my ($templatefile, $includepatharrayref, $allvariables, $var, $subst) = @_;
- # my $filename = "downloadbanner.bmp";
- if ( ! $allvariables->{'DOWNLOADBANNER'} ) { installer::exiter::exit_program("ERROR: DOWNLOADBANNER not defined in product definition!", "put_banner_bmp_into_template"); }
- my $filename = $allvariables->{'DOWNLOADBANNER'};
+ if ( ! $allvariables->{$var} ) { $var =~ s/_.*$//; } # _BR suffix ?
+ if ( ! $allvariables->{$var} ) { installer::exiter::exit_program("ERROR: $var not defined in product definition!", "substitute_path_into_template"); }
+ my $filename = $allvariables->{$var};
my $completefilenameref = "";
@@ -1008,125 +1009,24 @@ sub put_banner_bmp_into_template
$completefilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$filename, $includepatharrayref, 0);
}
- if ($$completefilenameref eq "") { installer::exiter::exit_program("ERROR: Could not find download file $filename!", "put_banner_bmp_into_template"); }
+ if ($$completefilenameref eq "") { installer::exiter::exit_program("ERROR: Could not find download file $filename!", "substitute_path_into_template"); }
if ( $^O =~ /cygwin/i ) { $$completefilenameref =~ s/\//\\/g; }
- replace_one_variable($templatefile, "BANNERBMPPLACEHOLDER", $$completefilenameref);
+ replace_one_variable($templatefile, $subst, $$completefilenameref);
}
##################################################################
-# Windows: Including the path to the welcome.bmp into nsi template
+# Windows: substitute a variable into the nsi template
##################################################################
-
-sub put_welcome_bmp_into_template
+sub substitute_variable_into_template($$$$)
{
- my ($templatefile, $includepatharrayref, $allvariables) = @_;
-
- # my $filename = "downloadbitmap.bmp";
- if ( ! $allvariables->{'DOWNLOADBITMAP'} ) { installer::exiter::exit_program("ERROR: DOWNLOADBITMAP not defined in product definition!", "put_welcome_bmp_into_template"); }
- my $filename = $allvariables->{'DOWNLOADBITMAP'};
-
- my $completefilenameref = "";
-
- if ( $installer::globals::include_pathes_read )
- {
- $completefilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 0);
- }
- else
- {
- $completefilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$filename, $includepatharrayref, 0);
- }
+ my ($templatefile, $variableshashref, $varname, $subst) = @_;
- if ($$completefilenameref eq "") { installer::exiter::exit_program("ERROR: Could not find download file $filename!", "put_welcome_bmp_into_template"); }
+ my $var = "";
+ if ( $variableshashref->{$varname} ) { $var = $variableshashref->{$varname}; }
- if ( $^O =~ /cygwin/i ) { $$completefilenameref =~ s/\//\\/g; }
-
- replace_one_variable($templatefile, "WELCOMEBMPPLACEHOLDER", $$completefilenameref);
-}
-
-##################################################################
-# Windows: Including the path to the setup.ico into nsi template
-##################################################################
-
-sub put_setup_ico_into_template
-{
- my ($templatefile, $includepatharrayref, $allvariables) = @_;
-
- # my $filename = "downloadsetup.ico";
- if ( ! $allvariables->{'DOWNLOADSETUPICO'} ) { installer::exiter::exit_program("ERROR: DOWNLOADSETUPICO not defined in product definition!", "put_setup_ico_into_template"); }
- my $filename = $allvariables->{'DOWNLOADSETUPICO'};
-
- my $completefilenameref = "";
-
- if ( $installer::globals::include_pathes_read )
- {
- $completefilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filename, $includepatharrayref, 0);
- }
- else
- {
- $completefilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$filename, $includepatharrayref, 0);
- }
-
- if ($$completefilenameref eq "") { installer::exiter::exit_program("ERROR: Could not find download file $filename!", "put_setup_ico_into_template"); }
-
- if ( $^O =~ /cygwin/i ) { $$completefilenameref =~ s/\//\\/g; }
-
- replace_one_variable($templatefile, "SETUPICOPLACEHOLDER", $$completefilenameref);
-}
-
-##################################################################
-# Windows: Including the publisher into nsi template
-##################################################################
-
-sub put_publisher_into_template
-{
- my ($templatefile) = @_;
-
- my $publisher = "Sun Microsystems, Inc.";
-
- replace_one_variable($templatefile, "PUBLISHERPLACEHOLDER", $publisher);
-}
-
-##################################################################
-# Windows: Including the web site into nsi template
-##################################################################
-
-sub put_website_into_template
-{
- my ($templatefile) = @_;
-
- my $website = "http\:\/\/www\.sun\.com\/staroffice";
-
- replace_one_variable($templatefile, "WEBSITEPLACEHOLDER", $website);
-}
-
-##################################################################
-# Windows: Including the Java file name into nsi template
-##################################################################
-
-sub put_javafilename_into_template
-{
- my ($templatefile, $variableshashref) = @_;
-
- my $javaversion = "";
-
- if ( $variableshashref->{'WINDOWSJAVAFILENAME'} ) { $javaversion = $variableshashref->{'WINDOWSJAVAFILENAME'}; }
-
- replace_one_variable($templatefile, "WINDOWSJAVAFILENAMEPLACEHOLDER", $javaversion);
-}
-
-##################################################################
-# Windows: Including the product version into nsi template
-##################################################################
-
-sub put_windows_productversion_into_template
-{
- my ($templatefile, $variableshashref) = @_;
-
- my $productversion = $variableshashref->{'PRODUCTVERSION'};
-
- replace_one_variable($templatefile, "PRODUCTVERSIONPLACEHOLDER", $productversion);
+ replace_one_variable($templatefile, $subst, $var);
}
##################################################################
@@ -1139,13 +1039,9 @@ sub put_windows_productpath_into_template
my $productpath = $variableshashref->{'PROPERTYTABLEPRODUCTNAME'};
- my $locallangs = $$languagestringref;
- $locallangs =~ s/_/ /g;
if (length($locallangs) > $installer::globals::max_lang_length) { $locallangs = "multi lingual"; }
- if ( ! $installer::globals::languagepack ) { $productpath = $productpath . " (" . $locallangs . ")"; }
-
- # if (( $installer::globals::languagepack ) && ( $installer::globals::unicodensis )) { $productpath = convert_textstring_to_utf16($productpath, $localnsisdir, "stringhelper.txt"); }
+ if ( ! $installer::globals::languagepack || ! $installer::globals::helppack ) { $productpath = $productpath . " (" . sprintf('%x', time()) . ")"; }
replace_one_variable($templatefile, "PRODUCTPATHPLACEHOLDER", $productpath);
}
@@ -1295,14 +1191,12 @@ sub nsis_language_converter
elsif ( $language eq "ja" ) { $nsislanguage = "Japanese"; }
elsif ( $language eq "ko" ) { $nsislanguage = "Korean"; }
elsif ( $language eq "th" ) { $nsislanguage = "Thai"; }
- elsif ( $language eq "vi" ) { $nsislanguage = "Vietnamese"; }
elsif ( $language eq "zh-CN" ) { $nsislanguage = "SimpChinese"; }
elsif ( $language eq "zh-TW" ) { $nsislanguage = "TradChinese"; }
else {
my $infoline = "NSIS language_converter : Could not find nsis language for $language!\n";
push( @installer::globals::logfileinfo, $infoline);
$nsislanguage = "English";
- # installer::exiter::exit_program("ERROR: Could not find nsis language for $language!", "nsis_language_converter");
}
return $nsislanguage;
@@ -1442,7 +1336,7 @@ sub get_language_string_from_language_block
##################################################################
# Windows: Replacing strings in NSIS nsh file
# nsh file syntax:
-# !define MUI_TEXT_DIRECTORY_TITLE "Zielverzeichnis auswhlen"
+# !define MUI_TEXT_DIRECTORY_TITLE "Zielverzeichnis ausw�hlen"
##################################################################
sub replace_identifier_in_nshfile
@@ -1531,8 +1425,6 @@ sub convert_utf16_to_utf8
my $savfilename = $filename . "_before.utf16";
installer::systemactions::copy_one_file($filename, $savfilename);
-# open( IN, "<:utf16", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_utf16_to_utf8");
-# open( IN, "<:para:crlf:uni", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_utf16_to_utf8");
open( IN, "<:encoding(UTF16-LE)", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_utf16_to_utf8");
while ( $line = <IN> ) {
push @localfile, $line;
@@ -1757,12 +1649,6 @@ 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 ( $nsispath eq "" )
{
installer::logger::print_message( "... no Environment variable \"SOLARROOT\", \"NSIS_PATH\" or \"NSISSDK_SOURCE\" found and NSIS not found in path!", "get_path_to_nsis_sdk");
@@ -1788,7 +1674,7 @@ sub call_nsis
if( $^O =~ /cygwin/i ) { $nsifile =~ s/\\/\//g; }
- my $systemcall = "$makensisexe $nsifile |";
+ my $systemcall = "$makensisexe /V4 /DMUI_VERBOSE=4 $nsifile |";
my $infoline = "Systemcall: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
@@ -1838,7 +1724,8 @@ sub replace_variables
{
my ($translationfile, $variableshashref) = @_;
- foreach $key (keys %{$variableshashref})
+ # we want to substitute FOO_BR before FOO to avoid floating _BR suffixes
+ foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
{
my $value = $variableshashref->{$key};
@@ -1877,9 +1764,6 @@ sub remove_english_for_nsis_installer
{
my ($languagestringref, $languagesarrayref) = @_;
- # $$languagestringref =~ s/en-US_//;
- # shift(@{$languagesarrayref});
-
@{$languagesarrayref} = ("en-US"); # only english for NSIS installer!
}
@@ -1891,7 +1775,7 @@ sub create_link_tree
{
my ($sourcedownloadfile, $destfilename, $versionstring) = @_;
- if ( ! $installer::globals::ooouploaddir ) { installer::exiter::exit_program("ERROR: Directory for OOo upload not defined!", "create_link_tree"); }
+ if ( ! $installer::globals::ooouploaddir ) { installer::exiter::exit_program("ERROR: Directory for LO upload not defined!", "create_link_tree"); }
my $versiondir = $installer::globals::ooouploaddir . $installer::globals::separator . $versionstring;
my $infoline = "Directory for the link: $versiondir\n";
push(@installer::globals::logfileinfo, $infoline);
@@ -1910,7 +1794,7 @@ sub create_link_tree
}
#######################################################
-# Setting supported platform for Sun OpenOffice.org
+# Setting supported platform for LibreOffice
# builds
#######################################################
@@ -1918,7 +1802,7 @@ sub is_supported_platform
{
my $is_supported = 0;
- if (( $installer::globals::islinuxrpmbuild ) ||
+ if (( $installer::globals::isrpmbuild ) ||
( $installer::globals::issolarissparcbuild ) ||
( $installer::globals::issolarisx86build ) ||
( $installer::globals::iswindowsbuild ))
@@ -1955,7 +1839,7 @@ sub create_download_sets
my $lastdir = $installationdir;
installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$lastdir);
- if ( $lastdir =~ /\./ ) { $lastdir =~ s/\./_download_inprogress\./ }
+ if ( $installer::globals::iswindowsbuild && $lastdir =~ /\./ ) { $lastdir =~ s/\./_download_inprogress\./ }
else { $lastdir = $lastdir . "_download_inprogress"; }
# removing existing directory "_native_packed_inprogress" and "_native_packed_witherror" and "_native_packed"
@@ -2081,13 +1965,27 @@ sub create_download_sets
# add product name into script template
put_windows_productname_into_template($templatefile, $allvariableshashref);
- put_banner_bmp_into_template($templatefile, $includepatharrayref, $allvariableshashref);
- put_welcome_bmp_into_template($templatefile, $includepatharrayref, $allvariableshashref);
- put_setup_ico_into_template($templatefile, $includepatharrayref, $allvariableshashref);
- put_publisher_into_template($templatefile);
- put_website_into_template($templatefile);
- put_javafilename_into_template($templatefile, $allvariableshashref);
- put_windows_productversion_into_template($templatefile, $allvariableshashref);
+ @path_substs = (
+ 'DOWNLOADBANNER' => 'BANNERBMPPLACEHOLDER',
+ 'DOWNLOADBITMAP' => 'WELCOMEBMPPLACEHOLDER',
+ 'DOWNLOADSETUPICO' => 'SETUPICOPLACEHOLDER'
+ );
+ while (@path_substs) {
+ my $var= shift @path_substs;
+ my $val = shift @path_substs;
+ substitute_path_into_template($templatefile, $includepatharrayref,
+ $allvariableshashref, $var, $val);
+ }
+ %var_substs = (
+ 'OOOVENDOR' => 'PUBLISHERPLACEHOLDER',
+ 'STARTCENTER_INFO_URL' => 'WEBSITEPLACEHOLDER',
+ 'WINDOWSJAVAFILENAME' => 'WINDOWSJAVAFILENAMEPLACEHOLDER',
+ 'PRODUCTVERSION' => 'PRODUCTVERSIONPLACEHOLDER'
+ );
+ for $var (keys %var_substs) {
+ substitute_variable_into_template($templatefile, $allvariableshashref,
+ $var, $var_substs{$var});
+ }
put_windows_productpath_into_template($templatefile, $allvariableshashref, $languagestringref, $localnsisdir);
put_outputfilename_into_template($templatefile, $downloadname);
put_filelist_into_template($templatefile, $installationdir);
@@ -2108,7 +2006,7 @@ sub create_download_sets
}
####################################################
-# Creating OOo upload tree
+# Creating LO upload tree
####################################################
sub create_download_link_tree
@@ -2157,9 +2055,6 @@ sub create_download_link_tree
push( @installer::globals::logfileinfo, $infoline);
create_link_tree($sourcedownloadfile, $destdownloadfilename, $versionstring);
- # my $md5sumoutput = call_md5sum($downloadfile);
- # my $md5sum = get_md5sum($md5sumoutput);
-
}
}
else
diff --git a/solenv/bin/modules/installer/downloadsigner.pm b/solenv/bin/modules/installer/downloadsigner.pm
index aa3bbb25a484..8a63242e0685 100644
--- a/solenv/bin/modules/installer/downloadsigner.pm
+++ b/solenv/bin/modules/installer/downloadsigner.pm
@@ -91,8 +91,6 @@ Ende
sub getparameter
{
- # installer::logger::print_message("Checking parameter");
-
while ( $#ARGV >= 0 )
{
my $param = shift(@ARGV);
@@ -347,7 +345,6 @@ sub check_cws_build
my $iscws = 1;
if ( $filename =~ /follow_me_\d+_/ ) { $iscws = 0; }
- # if ( $filename =~ /log_\d+_/ ) { $iscws = 0; }
return $iscws;
}
@@ -414,6 +411,11 @@ sub filter_all_files_with_correct_settings
my $workstamp = "";
if ( $ENV{'WORK_STAMP'} ) { $workstamp = $ENV{'WORK_STAMP'}; }
+
+ # This is broken, we don't want to support any UPDMINOR
+ # complexities in LibreOffice. (Or do we?) This needs updating if
+ # we want to actually use this file for signing.
+
if ( $ENV{'UPDMINOR'} ) { $minor = $ENV{'UPDMINOR'}; }
if ( $minor eq "" ) { installer::exiter::exit_program("ERROR: Environment variable \"UPDMINOR\" not set!", "filter_all_files_with_correct_settings"); }
diff --git a/solenv/bin/modules/installer/environment.pm b/solenv/bin/modules/installer/environment.pm
index c0d166081032..c80d8375f3c2 100644
--- a/solenv/bin/modules/installer/environment.pm
+++ b/solenv/bin/modules/installer/environment.pm
@@ -47,7 +47,6 @@ sub create_pathvariables
$variables{'solarpath'} = $solarpath;
my $solarcommonpath = $environment->{'SOLARVERSION'} . $installer::globals::separator . "common" . $installer::globals::productextension;
- # my $solarcommonpath = $environment->{'SOLARVERSION'} . $installer::globals::separator . $environment->{'COMMON_OUTDIR'} . $installer::globals::productextension;
$variables{'solarcommonpath'} = $solarcommonpath;
my $osdef = lc($environment->{'GUI'});
@@ -110,10 +109,8 @@ sub set_global_environment_variables
my ( $environment ) = @_;
$installer::globals::build = $environment->{'WORK_STAMP'};
- # $installer::globals::minor = $environment->{'UPDMINOR'};
$installer::globals::compiler = $environment->{'OUTPATH'};
- if ( $ENV{'UPDMINOR'} ) { $installer::globals::minor = $ENV{'UPDMINOR'}; }
if ( $ENV{'LAST_MINOR'} ) { $installer::globals::lastminor = $ENV{'LAST_MINOR'}; }
if ( $ENV{'PROEXT'} ) { $installer::globals::pro = 1; }
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index 119eb95e0b7c..682967ed0647 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -228,14 +228,10 @@ sub put_directories_into_epmfile
if ( $onedir->{'Dir'} ) { $dir = $onedir->{'Dir'}; }
- # if (!($dir =~ /\bPREDEFINED_/ ))
if ((!($dir =~ /\bPREDEFINED_/ )) || ( $dir =~ /\bPREDEFINED_PROGDIR\b/ ))
{
my $hostname = $onedir->{'HostName'};
- # not including simple directory "/opt"
- # if (( $allvariables->{'SETSTATICPATH'} ) && ( $hostname eq $packagerootpath )) { next; }
-
my $line = "d 755 root $group $hostname -\n";
push(@{$epmfileref}, $line)
@@ -322,7 +318,7 @@ sub create_epm_header
my @epmheader = ();
- my ($licensefilename, $readmefilename);
+ my ($licensefilename, $readmefilename, $readmefilenameen);
my $foundlicensefile = 0;
my $foundreadmefile = 0;
@@ -330,11 +326,11 @@ sub create_epm_header
my $line = "";
my $infoline = "";
- # %product OpenOffice.org Software
+ # %product LibreOffice Software
# %version 2.0
# %description A really great software
# %copyright 1999-2003 by OOo
- # %vendor OpenOffice.org
+ # %vendor LibreOffice
# %license /test/replace/01/LICENSE01
# %readme /test/replace/01/README01
# %requires foo
@@ -356,7 +352,6 @@ sub create_epm_header
# Determining the release version
# This release version has to be listed in the line %version : %version versionnumber releasenumber
- # if ( $variableshashref->{'PACKAGEVERSION'} ) { $installer::globals::packageversion = $variableshashref->{'PACKAGEVERSION'}; }
if ( ! $onepackage->{'packageversion'} ) { installer::exiter::exit_program("ERROR: No packageversion defined for package: $onepackage->{'module'}!", "create_epm_header"); }
$installer::globals::packageversion = $onepackage->{'packageversion'};
installer::packagelist::resolve_packagevariables(\$installer::globals::packageversion, $variableshashref, 0);
@@ -366,7 +361,7 @@ sub create_epm_header
push(@epmheader, $line);
$line = "%release" . " " . $installer::globals::packagerevision . "\n";
- if ( $installer::globals::islinuxrpmbuild ) { $line = "%release" . " " . $installer::globals::buildid . "\n"; }
+ if ( $installer::globals::isrpmbuild ) { $line = "%release" . " " . $installer::globals::buildid . "\n"; }
push(@epmheader, $line);
# Description, Copyright and Vendor are multilingual and are defined in
@@ -393,24 +388,27 @@ sub create_epm_header
{
$licensefilename = "license.txt";
$readmefilename = "readme.txt";
+ $readmefilenameen = "readme_en-US.txt";
}
else
{
$licensefilename = "LICENSE";
$readmefilename = "README";
+ $readmefilenameen = "README_en-US";
}
- if (( $installer::globals::languagepack ) # in language packs the files LICENSE and README are removed, because they are not language specific
+ if (( $installer::globals::languagepack ) # in language packs and help packs the files LICENSE and README are removed, because they are not language specific
+ || ( $installer::globals::helppack )
|| ( $variableshashref->{'NO_README_IN_ROOTDIR'} ))
{
if ( $installer::globals::iswindowsbuild )
{
- $licensefilename = "license_$searchlanguage.txt";
+ $licensefilename = "license.txt"; # _$searchlanguage.txt";
$readmefilename = "readme_$searchlanguage.txt";
}
else
{
- $licensefilename = "LICENSE_$searchlanguage";
+ $licensefilename = "LICENSE"; # _$searchlanguage";
$readmefilename = "README_$searchlanguage";
}
}
@@ -437,18 +435,41 @@ sub create_epm_header
$license_in_package_defined = 1;
}
}
- # searching for and readme file
- for ( my $i = 0; $i <= $#{$filesinproduct}; $i++ )
+ # searching for and readme file;
+ # URE uses special README; others use README_en-US
+ # it does not matter which one is passed for epm if both are packaged
+ foreach my $possiblereadmefilename ($readmefilenameen, $readmefilename)
+ {
+ last if ($foundreadmefile);
+ for ( my $i = 0; $i <= $#{$filesinproduct}; $i++ )
+ {
+ my $onefile = ${$filesinproduct}[$i];
+ my $filename = $onefile->{'Name'};
+ if ( $filename eq $possiblereadmefilename )
+ {
+ $foundreadmefile = 1;
+ $line = "%readme" . " " . $onefile->{'sourcepath'} . "\n";
+ push(@epmheader, $line);
+ last;
+ }
+ }
+ }
+
+ # the readme file need not be packaged more times in the help content
+ # it needs to be installed in parallel with the main package anyway
+ # try to find the README file between all available files (not only between the packaged)
+ if (!($foundreadmefile) && $installer::globals::helppack)
{
- my $onefile = ${$filesinproduct}[$i];
- my $filename = $onefile->{'Name'};
- if ( $filename eq $readmefilename )
+ my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$readmefilenameen, "" , 0);
+ if($$fileref ne "" )
{
+ $infoline = "Fallback to readme file: \"$$fileref\"!\n";
+ push(@installer::globals::logfileinfo, $infoline);
+
$foundreadmefile = 1;
- $line = "%readme" . " " . $onefile->{'sourcepath'} . "\n";
+ $line = "%readme" . " " . $$fileref . "\n";
push(@epmheader, $line);
- last;
}
}
@@ -507,6 +528,23 @@ sub create_epm_header
last;
}
}
+
+ # the license file need not be packaged more times in the langpacks
+ # they need to be installed in parallel with the main package anyway
+ # try to find the LICENSE file between all available files (not only between the packaged)
+ if (!($foundlicensefile) && ($installer::globals::languagepack || $installer::globals::helppack))
+ {
+ my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$licensefilename, "" , 0);
+ if($$fileref ne "" )
+ {
+ $infoline = "Fallback to license file: \"$$fileref\"!\n";
+ push(@installer::globals::logfileinfo, $infoline);
+
+ $foundlicensefile = 1;
+ $line = "%license" . " " . $$fileref . "\n";
+ push(@epmheader, $line);
+ }
+ }
}
if (!($foundlicensefile))
@@ -560,11 +598,11 @@ sub create_epm_header
}
}
- if ( $installer::globals::debian && $variableshashref->{'UNIXPRODUCTNAME'} eq 'openoffice.org' )
+ if ( $installer::globals::debian && $variableshashref->{'UNIXPRODUCTNAME'} eq 'libreoffice' )
{
- $line = "%provides" . " openoffice.org-unbundled\n";
+ $line = "%provides" . " libreoffice-unbundled\n";
push(@epmheader, $line);
- $line = "%incompat" . " openoffice.org-bundled\n";
+ $line = "%incompat" . " libreoffice-bundled\n";
push(@epmheader, $line);
}
}
@@ -585,7 +623,7 @@ sub create_epm_header
$provides = "freebsdprovides"; # the name in the packagelist
$requires = "freebsdrequires"; # the name in the packagelist
}
- elsif (( $installer::globals::islinuxrpmbuild ) &&
+ elsif (( $installer::globals::isrpmbuild ) &&
( $installer::globals::patch ) &&
( exists($onepackage->{'linuxpatchrequires'}) ))
{
@@ -598,15 +636,9 @@ sub create_epm_header
$requires = "requires"; # the name in the packagelist
}
- # if ( $installer::globals::patch )
- # {
- # $onepackage->{$provides} = "";
my $isdict = 0;
if ( $onepackage->{'packagename'} =~ /-dict-/ ) { $isdict = 1; }
- # $onepackage->{$requires} = "";
- # }
-
if ( $onepackage->{$provides} )
{
my $providesstring = $onepackage->{$provides};
@@ -649,19 +681,6 @@ sub create_epm_header
$onerequires =~ s/\s*$//;
installer::packagelist::resolve_packagevariables2(\$onerequires, $variableshashref, 0, $isdict);
- # Special handling for Solaris. In depend files, the names of the packages are required, not
- # only the abbreviation. Therefore there is a special syntax for names in packagelist:
- # solarisrequires = "SUNWcar (Name="Package name of SUNWcar"),SUNWkvm (Name="Package name of SUNWcar"), ...
- # if ( $installer::globals::issolarispkgbuild )
- # {
- # if ( $onerequires =~ /^\s*(.*?)\s+\(\s*Name\s*=\s*\"(.*?)\"\s*\)\s*$/ )
- # {
- # $onerequires = $1;
- # $packagename = $2;
- # $installer::globals::dependfilenames{$onerequires} = $packagename;
- # }
- # }
-
$line = "%requires" . " " . $onerequires . "\n";
push(@epmheader, $line);
}
@@ -683,19 +702,6 @@ sub create_epm_header
$onerequires =~ s/\s*$//;
installer::packagelist::resolve_packagevariables(\$onerequires, $variableshashref, 0);
- # Special handling for Solaris. In depend files, the names of the packages are required, not
- # only the abbreviation. Therefore there is a special syntax for names in packagelist:
- # solarisrequires = "SUNWcar (Name="Package name of SUNWcar"),SUNWkvm (Name="Package name of SUNWcar"), ...
- # if ( $installer::globals::issolarispkgbuild )
- # {
- # if ( $onerequires =~ /^\s*(.*?)\s+\(\s*Name\s*=\s*\"(.*?)\"\s*\)\s*$/ )
- # {
- # $onerequires = $1;
- # $packagename = $2;
- # $installer::globals::dependfilenames{$onerequires} = $packagename;
- # }
- # }
-
$line = "%requires" . " " . $onerequires . "\n";
push(@epmheader, $line);
}
@@ -762,8 +768,6 @@ sub replace_many_variables_in_shellscripts
foreach $key (keys %{$variableshashref})
{
my $value = $variableshashref->{$key};
- # $value = lc($value); # lowercase !
- # if ( $installer::globals::issolarisbuild) { $value =~ s/\.org/org/g; } # openofficeorg instead of openoffice.org
replace_variable_in_shellscripts($scriptref, $value, $key);
}
}
@@ -776,8 +780,6 @@ sub adding_shellscripts_to_epm_file
{
my ($epmfileref, $shellscriptsfilename, $localrootpath, $allvariableshashref, $filesinpackage) = @_;
- # $installer::globals::shellscriptsfilename
-
push( @{$epmfileref}, "\n\n" );
my $shellscriptsfileref = installer::files::read_file($shellscriptsfilename);
@@ -880,7 +882,7 @@ sub set_patch_state
push( @installer::globals::logfileinfo, $infoline);
}
- if ( ( $installer::globals::is_special_epm ) && (($installer::globals::islinuxrpmbuild) || ($installer::globals::issolarispkgbuild)) )
+ if ( ( $installer::globals::is_special_epm ) && (($installer::globals::isrpmbuild) || ($installer::globals::issolarispkgbuild)) )
{
# Special postprocess handling only for Linux RPM and Solaris packages
$installer::globals::postprocess_specialepm = 1;
@@ -994,7 +996,7 @@ sub add_one_line_into_file
push(@{$file}, $insertline); # simply adding at the end of pkginfo file
}
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
# Adding behind the line beginning with: Group:
@@ -1080,8 +1082,6 @@ sub set_revision_in_pkginfo
my $finalminor = $minor;
my $finalmicro = 0;
- # if (( $packagename =~ /-ure\s*$/ ) && ( $finalmajor == 1 )) { $finalminor = 4; }
-
$version = "$finalmajor.$finalminor.$finalmicro";
}
@@ -1326,7 +1326,6 @@ sub set_topdir_in_specfile
{
my ($changefile, $filename, $newepmdir) = @_;
- # $newepmdir =~ s/^\s*\.//; # removing leading "."
$newepmdir = cwd() . $installer::globals::separator . $newepmdir; # only absolute path allowed
# removing "%define _topdir", if existing
@@ -1695,7 +1694,7 @@ sub set_tab_into_datafile
$newclassesstring = installer::converter::convert_array_to_space_separated_string(\@newclasses);
}
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
for ( my $i = 0; $i <= $#{$filesref}; $i++ )
{
@@ -1927,11 +1926,6 @@ sub include_patchinfos_into_pkginfo
}
$newline = "SUNW_PATCH_PROPERTIES=\n";
add_one_line_into_file($changefile, $newline, $filename);
- # $newline = "SUNW_PKGTYPE=usr\n";
- # add_one_line_into_file($changefile, $newline, $filename);
-
- # $newline = "SUNW_PKGVERS=1.0\n";
- # add_one_line_into_file($changefile, $newline, $filename);
}
############################################################
@@ -2019,7 +2013,7 @@ sub collect_patch_files
{
my $line = ${$file}[$i];
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
# %attr(0444,root,root) "/opt/openofficeorg20/program/about.bmp"
@@ -2109,9 +2103,8 @@ sub prepare_packages
$newline = "BASEDIR\=" . $localrelocatablepath . "\n";
}
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
- # if ( $localrelocatablepath =~ /^\s*$/ ) { $localrelocatablepath = "/"; }; # at least the "/"
$filename = $packagename . ".spec";
$newline = "Prefix\:\ " . $localrelocatablepath . "\n";
}
@@ -2126,12 +2119,9 @@ sub prepare_packages
installer::files::save_file($completefilename, $changefile);
}
- # my $newepmdir = $completefilename;
- # installer::pathanalyzer::get_path_from_fullqualifiedname(\$newepmdir);
-
# adding new "topdir" and removing old "topdir" in specfile
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
set_topdir_in_specfile($changefile, $filename, $newepmdir);
set_autoprovreq_in_specfile($changefile, $onepackage->{'findrequires'}, "$installer::globals::unpackpath" . "/bin");
@@ -2139,7 +2129,6 @@ sub prepare_packages
if ( is_extension_package($changefile) ) { set_prereq_in_specfile($changefile); }
set_license_in_specfile($changefile, $variableshashref);
set_tab_into_datafile($changefile, $filesref);
- # check_requirements_in_specfile($changefile);
installer::files::save_file($completefilename, $changefile);
if ( $installer::globals::patch ) { collect_patch_files($changefile, $packagename, $localrelocatablepath); }
}
@@ -2253,7 +2242,6 @@ sub determine_rpm_version
my $rpmout = "";
my $systemcall = "";
- # my $systemcall = "rpm --version |";
# "rpm --version" has problems since LD_LIBRARY_PATH was removed. Therefore the content of $RPM has to be called.
# "rpm --version" and "rpmbuild --version" have the same output. Therefore $RPM can be used. Its value
# is saved in $installer::globals::rpm
@@ -2362,7 +2350,6 @@ sub create_packages_without_epm
installer::pathanalyzer::get_path_from_fullqualifiedname(\$destinationdir);
$destinationdir =~ s/\/\s*$//; # removing ending slashes
- # my $systemcall = "pkgmk -o -f $prototypefile -d $destinationdir \> /dev/null 2\>\&1";
my $systemcall = "pkgmk -l 1073741824 -o -f $prototypefile -d $destinationdir 2\>\&1 |";
installer::logger::print_message( "... $systemcall ...\n" );
@@ -2429,7 +2416,7 @@ sub create_packages_without_epm
# Setting unix rights to "775" for all created directories inside the package,
# that is saved in temp directory
- $systemcall = "cd $packagestempdir; find $packagename -type d -exec chmod 775 \{\} \\\;";
+ $systemcall = "cd $packagestempdir; find $packagename -type d | xargs -i chmod 775 \{\} \;";
installer::logger::print_message( "... $systemcall ...\n" );
$returnvalue = system($systemcall);
@@ -2492,7 +2479,7 @@ sub create_packages_without_epm
# Setting unix rights to "775" for all created directories inside the package
- $systemcall = "cd $destinationdir; find $packagename -type d -exec chmod 775 \{\} \\\;";
+ $systemcall = "cd $destinationdir; find $packagename -type d | xargs -i chmod 775 \{\} \;";
installer::logger::print_message( "... $systemcall ...\n" );
$returnvalue = system($systemcall);
@@ -2511,6 +2498,7 @@ sub create_packages_without_epm
push( @installer::globals::logfileinfo, $infoline);
}
+
######################
# making pkg files
######################
@@ -2526,13 +2514,13 @@ sub create_packages_without_epm
# if ($returnvalue)
# {
- # $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
- # push( @installer::globals::logfileinfo, $infoline);
+ # $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+ # push( @installer::globals::logfileinfo, $infoline);
# }
# else
# {
- # $infoline = "Success: Executed \"$systemcall\" successfully!\n";
- # push( @installer::globals::logfileinfo, $infoline);
+ # $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+ # push( @installer::globals::logfileinfo, $infoline);
# }
#########################
@@ -2550,35 +2538,34 @@ sub create_packages_without_epm
# if ($returnvalue)
# {
- # $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
- # push( @installer::globals::logfileinfo, $infoline);
+ # $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+ # push( @installer::globals::logfileinfo, $infoline);
# }
# else
# {
- # $infoline = "Success: Executed \"$systemcall\" successfully!\n";
- # push( @installer::globals::logfileinfo, $infoline);
+ # $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+ # push( @installer::globals::logfileinfo, $infoline);
# }
+
}
# Linux: rpm -bb so8m35.spec ( -> dependency check abklemmen? )
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
my $specfilename = $epmdir . $packagename . ".spec";
if (! -f $specfilename) { installer::exiter::exit_program("ERROR: Did not find file: $specfilename", "create_packages_without_epm"); }
- # my $rpmcommand = "rpm";
my $rpmcommand = $installer::globals::rpm;
my $rpmversion = determine_rpm_version();
- # if ( $rpmversion >= 4 ) { $rpmcommand = "rpmbuild"; }
-
# saving globally for later usage
$installer::globals::rpmcommand = $rpmcommand;
$installer::globals::rpmquerycommand = "rpm";
my $target = "";
if ( $installer::globals::compiler =~ /unxlngi/) { $target = "i586"; }
+ elsif ( $installer::globals::compiler =~ /unxaigppc/) { $target = "ppc"; }
elsif ( $installer::globals::compiler =~ /unxlng/) {$target = (POSIX::uname())[4]; }
# rpm 4.6 ignores buildroot tag in spec file
@@ -2621,7 +2608,6 @@ sub create_packages_without_epm
for ( my $j = 0; $j <= $#rpmoutput; $j++ )
{
- # if ( $i < $maxrpmcalls ) { $rpmoutput[$j] =~ s/\bERROR\b/PROBLEM/ig; }
$rpmoutput[$j] =~ s/\bERROR\b/PROBLEM/ig;
push( @installer::globals::logfileinfo, "$rpmoutput[$j]");
}
@@ -2724,39 +2710,13 @@ sub remove_temporary_epm_files
$infoline = "Systemcall: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
}
-
- # removing the package
-
-# my $removedir = $epmdir . $packagename;
-#
-# my $systemcall = "rm -rf $removedir";
-#
-# print "... $systemcall ...\n";
-#
-# my $returnvalue = system($systemcall);
-#
-# my $infoline = "Systemcall: $systemcall\n";
-# push( @installer::globals::logfileinfo, $infoline);
-#
-# if ($returnvalue)
-# {
-# $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-# push( @installer::globals::logfileinfo, $infoline);
-# }
-# else
-# {
-# $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-# push( @installer::globals::logfileinfo, $infoline);
-# }
}
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
my $removefile = $epmdir . $packagename . ".spec";
my $destfile = $loggingdir . $packagename . ".spec.log";
- # if (! -f $removefile) { next; }
-
my $systemcall = "mv -f $removefile $destfile";
system($systemcall); # ignoring the return value
$infoline = "Systemcall: $systemcall\n";
@@ -2832,13 +2792,17 @@ sub create_new_directory_structure
my $newdir = $installer::globals::epmoutpath;
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
my $rpmdir;
my $machine = "";
if ( $installer::globals::compiler =~ /unxlngi/) {
$rpmdir = "$installer::globals::epmoutpath/RPMS/i586";
}
+ elsif ( $installer::globals::compiler =~ /unxaigppc/) {
+ $machine = "ppc";
+ $rpmdir = "$installer::globals::epmoutpath/RPMS/$machine";
+ }
elsif ( $installer::globals::compiler =~ /unxlng/) {
$machine = (POSIX::uname())[4];
$rpmdir = "$installer::globals::epmoutpath/RPMS/$machine";
@@ -2869,6 +2833,7 @@ sub create_new_directory_structure
{
installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/$machine");
}
+ installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/powerpc");
installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/x86_64");
installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/i586");
installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/i386");
@@ -2877,23 +2842,7 @@ sub create_new_directory_structure
}
# Setting unix rights to "775" for $newdir ("RPMS" or "packages")
-
- my $localcall = "chmod 775 $newdir \>\/dev\/null 2\>\&1";
- my $callreturnvalue = system($localcall);
-
- my $callinfoline = "Systemcall: $localcall\n";
- push( @installer::globals::logfileinfo, $callinfoline);
-
- if ($callreturnvalue)
- {
- $callinfoline = "ERROR: Could not execute \"$localcall\"!\n";
- push( @installer::globals::logfileinfo, $callinfoline);
- }
- else
- {
- $callinfoline = "Success: Executed \"$localcall\" successfully!\n";
- push( @installer::globals::logfileinfo, $callinfoline);
- }
+ chmod 0775, $newdir;
}
######################################################
@@ -3195,40 +3144,6 @@ sub analyze_rootpath
$rootpath =~ s/\/\s*$//; # removing ending slash
##############################################################
- # Version 1: "/opt" is variable and "openofficeorg20" fixed
- ##############################################################
-
- # my $staticpath = $rootpath;
- # installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$staticpath);
- # $$staticpathref = $staticpath; # will be "openofficeorg20"
-
- # my $relocatablepath = $rootpath;
- # installer::pathanalyzer::get_path_from_fullqualifiedname(\$relocatablepath);
- # $$relocatablepathref = $relocatablepath; # will be "/opt/"
-
- ##############################################################
- # Version 2: "/opt/openofficeorg20" is variable and "" fixed
- ##############################################################
-
- # if ( $$relocatablepathref eq "" ) # relocatablepath is not defined in package list
- # {
- # $$staticpathref = ""; # will be ""
- # $$relocatablepathref = $rootpath . "\/"; # relocatable path must end with "/", will be "/opt/openofficeorg20/"
- # # setting the static path to the hostname of the directory with style OFFICEDIRECTORY
- # if ( $allvariables->{'SETSTATICPATH'} ) { $$staticpathref = $installer::globals::officedirhostname; }
- #
- # }
- # else # relocatablepath is defined in package list
- # {
- # $$relocatablepathref =~ s/\/\s*$//; # removing ending slash
- # $$relocatablepathref = $$relocatablepathref . "\/"; # relocatable path must end with "/"
- # my $staticpath = $rootpath;
- # $staticpath =~ s/\Q$$relocatablepathref\E//;
- # $staticpath =~ s/\/\s*$//;
- # $$staticpathref = $staticpath;
- # }
-
- ##############################################################
# Version 3: "/" is variable and "/opt/openofficeorg20" fixed
##############################################################
@@ -3238,17 +3153,16 @@ sub analyze_rootpath
# For RPM version 3.x it is required, that Prefix is not "/" in spec file. In this case --relocate will not work,
# because RPM 3.x says, that the package is not relocatable. Therefore we have to use Prefix=/opt and for
# all usages of --relocate this path has to be on both sides of the "=": --relocate /opt=<myselectdir>/opt .
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
$$relocatablepathref = $rootpath . "\/"; # relocatable path must end with "/", will be "/opt/"
$$staticpathref = $installer::globals::officedirhostname; # to be used as replacement in shell scripts
}
- if ( $installer::globals::islinuxdebbuild )
+ if ( $installer::globals::isdebbuild )
{
$$relocatablepathref = "";
# $$staticpathref is already "/opt/openoffice.org3", no additional $rootpath required.
- # $$staticpathref = $rootpath . $installer::globals::separator . $$staticpathref; # no relocatibility for Debian
}
}
@@ -3270,8 +3184,7 @@ sub put_installsetfiles_into_installset
my $onefile = $installer::globals::installsetfiles[$i];
my $sourcefile = $onefile->{'sourcepath'};
my $destfile = "";
- if ( $installer::globals::addjavainstaller ) { $destfile = $onefile->{'Name'}; }
- else { $destfile = $destdir . $installer::globals::separator . $onefile->{'Name'}; }
+ $destfile = $destdir . $installer::globals::separator . $onefile->{'Name'};
installer::systemactions::copy_one_file($sourcefile, $destfile);
my $infoline = "Adding to installation set \"$destfile\" from source \"$sourcefile\".\n";
@@ -3399,20 +3312,6 @@ sub finalize_linux_patch
if ( ! ( $#{$rpmfiles} > -1 )) { installer::exiter::exit_program("ERROR: Could not find rpm in directory $newepmdir!", "finalize_linux_patch"); }
for ( my $i = 0; $i <= $#{$rpmfiles}; $i++ ) { installer::pathanalyzer::make_absolute_filename_to_relative_filename(\${$rpmfiles}[$i]); }
-# my $installline = "";
-#
-# for ( my $i = 0; $i <= $#{$rpmfiles}; $i++ )
-# {
-# $installline = $installline . " rpm --prefix \$PRODUCTINSTALLLOCATION -U $newepmdir/${$rpmfiles}[$i]\n";
-# }
-#
-# $installline =~ s/\s*$//;
-#
-# for ( my $j = 0; $j <= $#{$scriptfile}; $j++ )
-# {
-# ${$scriptfile}[$j] =~ s/INSTALLLINES/$installline/;
-# }
-
# Searching packagename containing -core01
my $found_package = 0;
my $searchpackagename = "";
@@ -3439,7 +3338,6 @@ sub finalize_linux_patch
my $productname = $allvariables->{'PRODUCTNAME'};
$productname = lc($productname);
$productname =~ s/ /_/g; # abc office -> abc_office
-# $productname =~ s/\.//g; # openoffice.org -> openofficeorg
$infoline = "Adding productname $productname into Linux patch script\n";
push( @installer::globals::logfileinfo, $infoline);
@@ -3448,15 +3346,14 @@ sub finalize_linux_patch
# Saving the file
- my $newscriptfilename = "setup"; # $newepmdir . $installer::globals::separator . "setup";
+ my $newscriptfilename = "setup";
installer::files::save_file($newscriptfilename, $scriptfile);
$infoline = "Saved Linux patch setup $newscriptfilename \n";
push( @installer::globals::logfileinfo, $infoline);
# Setting unix rights 755
- my $localcall = "chmod 775 $newscriptfilename \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod 0755, $newscriptfilename;
}
1;
diff --git a/solenv/bin/modules/installer/followme.pm b/solenv/bin/modules/installer/followme.pm
index 1abc035d5615..535ac31588ff 100644
--- a/solenv/bin/modules/installer/followme.pm
+++ b/solenv/bin/modules/installer/followme.pm
@@ -70,11 +70,11 @@ sub save_followme_info
push(@filecontent, "globals:issolarisx86build: $installer::globals::issolarisx86build\n");
push(@filecontent, "globals:isfreebsdpkgbuild: $installer::globals::isfreebsdpkgbuild\n");
push(@filecontent, "globals:islinuxbuild: $installer::globals::islinuxbuild\n");
- push(@filecontent, "globals:islinuxrpmbuild: $installer::globals::islinuxrpmbuild\n");
+ push(@filecontent, "globals:isrpmbuild: $installer::globals::isrpmbuild\n");
push(@filecontent, "globals:islinuxintelrpmbuild: $installer::globals::islinuxintelrpmbuild\n");
push(@filecontent, "globals:islinuxppcrpmbuild: $installer::globals::islinuxppcrpmbuild\n");
push(@filecontent, "globals:islinuxx86_64rpmbuild: $installer::globals::islinuxx86_64rpmbuild\n");
- push(@filecontent, "globals:islinuxdebbuild: $installer::globals::islinuxdebbuild\n");
+ push(@filecontent, "globals:isdebbuild: $installer::globals::isdebbuild\n");
push(@filecontent, "globals:islinuxinteldebbuild: $installer::globals::islinuxinteldebbuild\n");
push(@filecontent, "globals:islinuxppcdebbuild: $installer::globals::islinuxppcdebbuild\n");
push(@filecontent, "globals:islinuxx86_64debbuild: $installer::globals::islinuxx86_64debbuild\n");
@@ -87,6 +87,7 @@ sub save_followme_info
push(@filecontent, "globals:product: $installer::globals::product\n");
push(@filecontent, "globals:patch: $installer::globals::patch\n");
push(@filecontent, "globals:languagepack: $installer::globals::languagepack\n");
+ push(@filecontent, "globals:helppack: $installer::globals::helppack\n");
push(@filecontent, "globals:installertypedir: $installer::globals::installertypedir\n");
push(@filecontent, "globals:max_lang_length: $installer::globals::max_lang_length\n");
push(@filecontent, "globals:compiler: $installer::globals::compiler\n");
@@ -169,11 +170,11 @@ sub read_followme_info
if ( $name eq "issolarisx86build" ) { $installer::globals::issolarisx86build = $value; }
if ( $name eq "isfreebsdpkgbuild" ) { $installer::globals::isfreebsdpkgbuild = $value; }
if ( $name eq "islinuxbuild" ) { $installer::globals::islinuxbuild = $value; }
- if ( $name eq "islinuxrpmbuild" ) { $installer::globals::islinuxrpmbuild = $value; }
+ if ( $name eq "isrpmbuild" ) { $installer::globals::isrpmbuild = $value; }
if ( $name eq "islinuxintelrpmbuild" ) { $installer::globals::islinuxintelrpmbuild = $value; }
if ( $name eq "islinuxppcrpmbuild" ) { $installer::globals::islinuxppcrpmbuild = $value; }
if ( $name eq "islinuxx86_64rpmbuild" ) { $installer::globals::islinuxx86_64rpmbuild = $value; }
- if ( $name eq "islinuxdebbuild" ) { $installer::globals::islinuxdebbuild = $value; }
+ if ( $name eq "isdebbuild" ) { $installer::globals::isdebbuild = $value; }
if ( $name eq "islinuxinteldebbuild" ) { $installer::globals::islinuxinteldebbuild = $value; }
if ( $name eq "islinuxppcdebbuild" ) { $installer::globals::islinuxppcdebbuild = $value; }
if ( $name eq "islinuxx86_64debbuild" ) { $installer::globals::islinuxx86_64debbuild = $value; }
@@ -189,6 +190,7 @@ sub read_followme_info
if ( $name eq "product" ) { $installer::globals::product = $value; }
if ( $name eq "patch" ) { $installer::globals::patch = $value; }
if ( $name eq "languagepack" ) { $installer::globals::languagepack = $value; }
+ if ( $name eq "helppack" ) { $installer::globals::helppack = $value; }
if ( $name eq "installertypedir" ) { $installer::globals::installertypedir = $value; }
if ( $name eq "max_lang_length" ) { $installer::globals::max_lang_length = $value; }
if ( $name eq "compiler" ) { $installer::globals::compiler = $value; }
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 066e13dcf6d4..ace634a3ac5e 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -131,8 +131,8 @@ BEGIN
$ismacosx = 0;
$iswindowsbuild = 0;
$islinuxbuild = 0;
- $islinuxrpmbuild = 0;
- $islinuxdebbuild = 0;
+ $isrpmbuild = 0;
+ $isdebbuild = 0;
$islinuxintelrpmbuild = 0;
$islinuxppcrpmbuild = 0;
$islinuxinteldebbuild = 0;
@@ -196,7 +196,7 @@ BEGIN
%alllangmodules = ();
$englishlicenseset = 0;
$englishlicense = "";
- $englishsolarislicensename = "LICENSE_en-US";
+ $englishsolarislicensename = "LICENSE"; # _en-US";
$solarisdontcompress = 0;
$patharray = "";
@@ -310,7 +310,6 @@ BEGIN
$productxpdfile = "setup.xpd";
$xpd_files_prepared = 0;
$defaultlanguage = "";
- # @emptyxpdparents = ();
@createdxpdfiles = ();
@allxpdfiles = ();
$isxpdplatform = 0;
@@ -318,7 +317,6 @@ BEGIN
$javasettozero = 0;
$addlicensefile = 1;
$addsystemintegration = 0;
- $addjavainstaller = 0;
$added_directories = 0;
$makedownload = 1;
$makejds = 1;
@@ -329,6 +327,7 @@ BEGIN
@binarytableonlyfiles = ();
@allscpactions = ();
$languagepackaddon = "LanguagePack";
+ $helppackaddon = "HelpPack";
$patchaddon = "Patch";
$ooodownloadfilename = "";
$downloadfilename = "";
@@ -346,6 +345,7 @@ BEGIN
$patch_user_dir = 0;
$addchildprojects = 0;
$languagepack = 0;
+ $helppack = 0;
$tab = 0;
$patch = 0;
$patchincludepath = "";
@@ -424,7 +424,7 @@ BEGIN
$one_cab_file = 0;
$fix_number_of_cab_files = 1;
$cab_file_per_component = 0;
- $cabfilecompressionlevel = 2;
+ $cabfilecompressionlevel = 21; # Using LZX compression, possible values are: 15 | 16 | ... | 21 (best compression)
$number_of_cabfiles = 1; # only for $fix_number_of_cab_files = 1
$include_cab_in_msi = 0;
$use_packages_for_cabs = 0;
@@ -464,6 +464,7 @@ BEGIN
@environmentvariables = ( "SOLARVERSION", "GUI", "WORK_STAMP", "OUTPATH", "LOCAL_OUT", "LOCAL_COMMON_OUT" );
@packagelistitems = ("module", "solarispackagename", "packagename", "copyright", "vendor", "description" );
@languagepackfeature =();
+ @helppackfeature =();
@featurecollector =();
$msiassemblyfiles = "";
$nsisfilename = "Nsis";
@@ -536,9 +537,6 @@ BEGIN
$isunix = 1;
$iswin = 0;
}
- # WRAPCMD is gone - remove this and all related
- # $installer::globals::wrapcmd entries
- $wrapcmd = "";
if ( $plat =~ /linux/i ) { $islinux = 1; }
if ( $plat =~ /kfreebsd/i ) { $islinux = 1; }
diff --git a/solenv/bin/modules/installer/helppack.pm b/solenv/bin/modules/installer/helppack.pm
new file mode 100644
index 000000000000..e5b674c93f8c
--- /dev/null
+++ b/solenv/bin/modules/installer/helppack.pm
@@ -0,0 +1,537 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+package installer::helppack;
+
+use installer::converter;
+use installer::existence;
+use installer::files;
+use installer::globals;
+use installer::logger;
+use installer::pathanalyzer;
+use installer::scpzipfiles;
+use installer::scriptitems;
+use installer::systemactions;
+use installer::worker;
+
+sub select_help_items
+{
+ my ( $itemsref, $languagesarrayref, $itemname ) = @_;
+
+ installer::logger::include_header_into_logfile("Selecting items for help pack. Item: $itemname");
+
+ my @itemsarray = ();
+
+ for ( my $i = 0; $i <= $#{$itemsref}; $i++ )
+ {
+ my $oneitem = ${$itemsref}[$i];
+
+ my $styles = "";
+ if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
+
+ if (( $styles =~ /\bHELPPACK\b/ ) || ( $styles =~ /\bFORCEHELPPACK\b/ ))
+ {
+ # Files with style "HELPPACK" and "FORCEHELPPACK" also have to be included into the help pack.
+ # Files with style "HELPPACK" are only included into help packs.
+ # Files with style "FORCEHELPPACK" are included into help packs and non help packs. They are
+ # forced, because otherwise they not not be included into helppacks.
+
+ my $ismultilingual = $oneitem->{'ismultilingual'};
+
+ if ($ismultilingual)
+ {
+ my $specificlanguage = "";
+ if ( $oneitem->{'specificlanguage'} ) { $specificlanguage = $oneitem->{'specificlanguage'}; }
+
+ for ( my $j = 0; $j <= $#{$languagesarrayref}; $j++ ) # iterating over all languages
+ {
+ my $onelanguage = ${$languagesarrayref}[$j];
+ my $locallang = $onelanguage;
+ $locallang =~ s/-/_/;
+
+ if ( $specificlanguage eq $onelanguage )
+ {
+ push(@itemsarray, $oneitem);
+ }
+ }
+ }
+ else
+ {
+ push(@itemsarray, $oneitem);
+ }
+ }
+ }
+
+ return \@itemsarray;
+}
+
+sub replace_languagestring_variable
+{
+ my ($onepackageref, $languagestringref) = @_;
+
+ my $key;
+
+ foreach $key (keys %{$onepackageref})
+ {
+ my $value = $onepackageref->{$key};
+ $value =~ s/\%LANGUAGESTRING/$$languagestringref/g;
+ $onepackageref->{$key} = $value;
+ }
+}
+
+#########################################################
+# Including the license text into the script template
+#########################################################
+
+sub put_license_file_into_script
+{
+ my ($scriptfile, $licensefile) = @_;
+
+ my $infoline = "Adding licensefile into help pack script\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ my $includestring = "";
+
+ for ( my $i = 0; $i <= $#{$licensefile}; $i++ )
+ {
+ $includestring = $includestring . ${$licensefile}[$i];
+ }
+
+ for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
+ {
+ ${$scriptfile}[$i] =~ s/LICENSEFILEPLACEHOLDER/$includestring/;
+ }
+}
+
+#########################################################
+# Creating a tar.gz file from a Solaris package
+#########################################################
+
+sub create_tar_gz_file
+{
+ my ($installdir, $packagename, $packagestring) = @_;
+
+ $packagename =~ s/\.rpm\s*$//;
+ my $targzname = $packagename . ".tar.gz";
+ $systemcall = "cd $installdir; tar -cf - $packagestring | gzip > $targzname";
+ installer::logger::print_message( "... $systemcall ...\n" );
+
+ my $returnvalue = system($systemcall);
+
+ my $infoline = "Systemcall: $systemcall\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ if ($returnvalue)
+ {
+ $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+ else
+ {
+ $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+
+ return $targzname;
+}
+
+#########################################################
+# Determining the name of the package file
+#########################################################
+
+sub get_packagename_from_packagelist
+{
+ my ( $alldirs, $allvariables, $languagestringref ) = @_;
+
+ # my $packagename = "";
+
+ # for ( my $i = 0; $i <= $#{$alldirs}; $i++ )
+ # {
+ # if ( ${$alldirs}[$i] =~ /-fonts/ ) { next; }
+ # if ( ${$alldirs}[$i] =~ /-help/ ) { next; }
+ # if ( ${$alldirs}[$i] =~ /-res/ ) { next; }
+ #
+ # $packagename = ${$alldirs}[$i];
+ # last;
+ # }
+
+ # if ( $packagename eq "" ) { installer::exiter::exit_program("ERROR: Could not find base package in directory $installdir!", "get_packagename_from_packagelist"); }
+
+ my $localproductname = $allvariables->{'PRODUCTNAME'};
+ $localproductname = lc($localproductname);
+ $localproductname =~ s/ //g;
+ $localproductname =~ s/-/_/g;
+
+ my $packagename = $localproductname . "_" . $$languagestringref;
+
+ return $packagename;
+}
+
+#########################################################
+# Determining the name of the package file or the rpm
+# in the installation directory. For help packs
+# there is only one file in this directory
+#########################################################
+
+sub determine_packagename
+{
+ my ( $installdir, $allvariables, $languagestringref ) = @_;
+
+ my $packagename = "";
+ my $allnames = "";
+
+ if ( $installer::globals::isrpmbuild )
+ {
+ # determining the rpm file in directory $installdir
+
+ my $fileextension = "rpm";
+ my $rpmfiles = installer::systemactions::find_file_with_file_extension($fileextension, $installdir);
+ if ( ! ( $#{$rpmfiles} > -1 )) { installer::exiter::exit_program("ERROR: Could not find package in directory $installdir!", "determine_packagename"); }
+ my $rpmsav = [@{$rpmfiles}];
+ for ( my $i = 0; $i <= $#{$rpmfiles}; $i++ ) { installer::pathanalyzer::make_absolute_filename_to_relative_filename(\${$rpmfiles}[$i]); }
+
+ $packagename = get_packagename_from_packagelist($rpmfiles, $allvariables, $languagestringref);
+
+ my $packagestring = installer::converter::convert_array_to_space_separated_string($rpmfiles);
+ $packagename = create_tar_gz_file($installdir, $packagename, $packagestring); # only one file
+ for ( my $i = 0; $i <= $#{$rpmsav}; $i++ )
+ {
+ my $onefile = $installdir . $installer::globals::separator . ${$rpmsav}[$i];
+ unlink($onefile);
+ }
+
+ $allnames = $rpmfiles;
+ }
+
+ if ( $installer::globals::issolarisbuild )
+ {
+ # determining the Solaris package file in directory $installdir
+ my $alldirs = installer::systemactions::get_all_directories($installdir);
+
+ if ( ! ( $#{$alldirs} > -1 )) { installer::exiter::exit_program("ERROR: Could not find package in directory $installdir!", "determine_packagename"); }
+ my $alldirssav = [@{$alldirs}];
+ for ( my $i = 0; $i <= $#{$alldirs}; $i++ ) { installer::pathanalyzer::make_absolute_filename_to_relative_filename(\${$alldirs}[$i]); }
+
+ $packagename = get_packagename_from_packagelist($alldirs, $allvariables, $languagestringref);
+ my $packagestring = installer::converter::convert_array_to_space_separated_string($alldirs);
+ $packagename = create_tar_gz_file($installdir, $packagename, $packagestring); # only a file (not a directory) can be included into the shell script
+ for ( my $i = 0; $i <= $#{$alldirssav}; $i++ ) { installer::systemactions::remove_complete_directory(${$alldirssav}[$i], 1); }
+ $allnames = $alldirs;
+ }
+
+ my $infoline = "Found package in installation directory $installdir : $packagename\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ return ( $packagename, $allnames);
+}
+
+#########################################################
+# Including the name of the package file or the rpm
+# into the script template
+#########################################################
+
+sub put_packagename_into_script
+{
+ my ($scriptfile, $packagename, $allnames) = @_;
+
+ my $localpackagename = $packagename;
+ $localpackagename =~ s/\.tar\.gz//; # making "OOOopenoffice-it-ea.tar.gz" to "OOOopenoffice-it-ea"
+ my $infoline = "Adding packagename $localpackagename into help pack script\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ my $installline = "";
+
+ if ( $installer::globals::issolarisbuild ) { $installline = " /usr/sbin/pkgadd -d \$outdir -a \$adminfile"; }
+
+ if ( $installer::globals::isrpmbuild ) { $installline = " rpm --prefix \$PRODUCTINSTALLLOCATION --replacepkgs -i"; }
+
+ for ( my $i = 0; $i <= $#{$allnames}; $i++ )
+ {
+ if ( $installer::globals::issolarisbuild ) { $installline = $installline . " ${$allnames}[$i]"; }
+
+ if ( $installer::globals::isrpmbuild ) { $installline = $installline . " \$outdir/${$allnames}[$i]"; }
+ }
+
+ for ( my $j = 0; $j <= $#{$scriptfile}; $j++ )
+ {
+ ${$scriptfile}[$j] =~ s/INSTALLLINES/$installline/;
+ }
+}
+
+##################################################################
+# Including the lowercase product name into the script template
+##################################################################
+
+sub put_productname_into_script
+{
+ my ($scriptfile, $variableshashref) = @_;
+
+ my $productname = $variableshashref->{'PRODUCTNAME'};
+ $productname = lc($productname);
+ $productname =~ s/\.//g; # openoffice.org -> openofficeorg
+
+ my $infoline = "Adding productname $productname into help pack script\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
+ {
+ ${$scriptfile}[$i] =~ s/PRODUCTNAMEPLACEHOLDER/$productname/;
+ }
+}
+
+##################################################################
+# Including the full product name into the script template
+# (name and version)
+##################################################################
+
+sub put_fullproductname_into_script
+{
+ my ($scriptfile, $variableshashref) = @_;
+
+ my $productname = $variableshashref->{'PRODUCTNAME'};
+ my $productversion = "";
+ if ( $variableshashref->{'PRODUCTVERSION'} ) { $productversion = $variableshashref->{'PRODUCTVERSION'}; };
+ my $fullproductname = $productname . " " . $productversion;
+
+ my $infoline = "Adding full productname \"$fullproductname\" into help pack script\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
+ {
+ ${$scriptfile}[$i] =~ s/FULLPRODUCTNAMELONGPLACEHOLDER/$fullproductname/;
+ }
+}
+
+##################################################################
+# Including the name of the search package (-core01)
+# into the script template
+##################################################################
+
+sub put_searchpackage_into_script
+{
+ my ($scriptfile, $variableshashref) = @_;
+
+ my $basispackageprefix = $variableshashref->{'BASISPACKAGEPREFIX'};
+ my $basispackageversion = $variableshashref->{'OOOBASEVERSION'};
+
+ if ( $installer::globals::issolarisbuild ) { $basispackageversion =~ s/\.//g; } # "3.0" -> "30"
+
+ my $infoline = "Adding basis package prefix $basispackageprefix into help pack script\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ $infoline = "Adding basis package version $basispackageversion into help pack script\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
+ {
+ ${$scriptfile}[$i] =~ s/BASISPACKAGEPREFIXPLACEHOLDER/$basispackageprefix/;
+ ${$scriptfile}[$i] =~ s/OOOBASEVERSIONPLACEHOLDER/$basispackageversion/;
+ }
+
+}
+
+#########################################################
+# Including the linenumber into the script template
+#########################################################
+
+sub put_linenumber_into_script
+{
+ my ( $scriptfile, $licensefile, $allnames ) = @_;
+
+ my $linenumber = $#{$scriptfile} + $#{$licensefile} + 3; # also adding the content of the license file!
+
+ my $infoline = "Adding linenumber $linenumber into help pack script\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
+ {
+ ${$scriptfile}[$i] =~ s/LINENUMBERPLACEHOLDER/$linenumber/;
+ }
+}
+
+#########################################################
+# Determining the name of the new scriptfile
+#########################################################
+
+sub determine_scriptfile_name
+{
+ my ( $packagename ) = @_;
+
+ my $scriptfilename = $packagename;
+
+# if ( $installer::globals::isrpmbuild ) { $scriptfilename =~ s/\.rpm\s*$/\.sh/; }
+# if ( $installer::globals::issolarisbuild ) { $scriptfilename =~ s/\.tar\.gz\s*$/\.sh/; }
+
+ $scriptfilename =~ s/\.tar\.gz\s*$/\.sh/;
+
+ my $infoline = "Setting help pack script file name to $scriptfilename\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ return $scriptfilename;
+}
+
+#########################################################
+# Saving the script file in the installation directory
+#########################################################
+
+sub save_script_file
+{
+ my ($installdir, $newscriptfilename, $scriptfile) = @_;
+
+ $newscriptfilename = $installdir . $installer::globals::separator . $newscriptfilename;
+ installer::files::save_file($newscriptfilename, $scriptfile);
+
+ my $infoline = "Saving script file $newscriptfilename\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ return $newscriptfilename;
+}
+
+#########################################################
+# Including the binary package into the script
+#########################################################
+
+sub include_package_into_script
+{
+ my ( $scriptfilename, $installdir, $packagename ) = @_;
+
+ my $longpackagename = $installdir . $installer::globals::separator . $packagename;
+ my $systemcall = "cat $longpackagename >>$scriptfilename";
+
+ my $returnvalue = system($systemcall);
+
+ my $infoline = "Systemcall: $systemcall\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ if ($returnvalue)
+ {
+ $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+ else
+ {
+ $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+
+ my $localcall = "chmod 775 $scriptfilename \>\/dev\/null 2\>\&1";
+ system($localcall);
+
+}
+
+#########################################################
+# Removing the binary package
+#########################################################
+
+sub remove_package
+{
+ my ( $installdir, $packagename ) = @_;
+
+ my $remove_package = 1;
+
+ if ( $ENV{'DONT_REMOVE_PACKAGE'} ) { $remove_package = 0; }
+
+ if ( $remove_package )
+ {
+ my $longpackagename = $installdir . $installer::globals::separator . $packagename;
+ unlink $longpackagename;
+
+ my $infoline = "Removing package: $longpackagename \n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+}
+
+####################################################
+# Unix help packs, that are not part of
+# multilingual installation sets, need a
+# shell script installer
+####################################################
+
+sub build_installer_for_helppack
+{
+ my ($installdir, $allvariableshashref, $includepatharrayref, $languagesarrayref, $languagestringref) = @_;
+
+ installer::logger::print_message( "... creating shell script installer ...\n" );
+
+ installer::logger::include_header_into_logfile("Creating shell script installer:");
+
+ # find and read setup script template
+
+ my $scriptfilename = "langpackscript.sh";
+ my $scriptref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$scriptfilename, $includepatharrayref, 0);
+ if ($$scriptref eq "") { installer::exiter::exit_program("ERROR: Could not find script file $scriptfilename!", "build_installer_for_helppack"); }
+ my $scriptfile = installer::files::read_file($$scriptref);
+
+ my $infoline = "Found script file $scriptfilename: $$scriptref \n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ # find and read english license file
+ my $licenselanguage = "en-US"; # always english !
+ my $licensefilename = "LICENSE"; # _" . $licenselanguage;
+ my $licenseincludepatharrayref = installer::worker::get_language_specific_include_pathes($includepatharrayref, $licenselanguage);
+
+ my $licenseref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$licensefilename, $licenseincludepatharrayref, 0);
+ if ($$licenseref eq "") { installer::exiter::exit_program("ERROR: Could not find License file $licensefilename!", "build_installer_for_helppack"); }
+ my $licensefile = installer::files::read_file($$licenseref);
+
+ $infoline = "Found licensefile $licensefilename: $$licenseref \n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ # including variables into license file
+ installer::scpzipfiles::replace_all_ziplistvariables_in_file($licensefile, $allvariableshashref);
+
+ # add license text into script template
+ put_license_file_into_script($scriptfile, $licensefile);
+
+ # add rpm or package file name into script template
+ my ( $packagename, $allnames) = determine_packagename($installdir, $allvariableshashref, $languagestringref);
+ put_packagename_into_script($scriptfile, $packagename, $allnames);
+
+ # add product name into script template
+ put_productname_into_script($scriptfile, $allvariableshashref);
+
+ # add product name into script template
+ put_fullproductname_into_script($scriptfile, $allvariableshashref);
+
+ # add product name into script template
+ put_searchpackage_into_script($scriptfile, $allvariableshashref);
+
+ # replace linenumber in script template
+ put_linenumber_into_script($scriptfile, $licensefile, $allnames);
+
+ # saving the script file
+ my $newscriptfilename = determine_scriptfile_name($packagename);
+ $newscriptfilename = save_script_file($installdir, $newscriptfilename, $scriptfile);
+
+ # include rpm or package into script
+ include_package_into_script($newscriptfilename, $installdir, $packagename);
+
+ # remove rpm or package
+ remove_package($installdir, $packagename);
+}
+
+1;
diff --git a/solenv/bin/modules/installer/javainstaller.pm b/solenv/bin/modules/installer/javainstaller.pm
deleted file mode 100644
index f68346bdcce2..000000000000
--- a/solenv/bin/modules/installer/javainstaller.pm
+++ /dev/null
@@ -1,1885 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-package installer::javainstaller;
-
-use Cwd;
-use installer::exiter;
-use installer::files;
-use installer::globals;
-use installer::languages;
-use installer::pathanalyzer;
-use installer::scriptitems;
-use installer::systemactions;
-use installer::worker;
-use installer::logger;
-
-##############################################################
-# Returning a specific language string from the block
-# of all translations
-##############################################################
-
-sub get_language_string_from_language_block
-{
- my ($language_block, $language, $oldstring) = @_;
-
- my $newstring = "";
-
- for ( my $i = 0; $i <= $#{$language_block}; $i++ )
- {
- if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
- {
- $newstring = $1;
- last;
- }
- }
-
- if ( $newstring eq "" )
- {
- $language = "en-US"; # defaulting to english
-
- for ( my $i = 0; $i <= $#{$language_block}; $i++ )
- {
- if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
- {
- $newstring = $1;
- last;
- }
- }
- }
-
- return $newstring;
-}
-
-##############################################################
-# Returning the complete block in all languages
-# for a specified string
-##############################################################
-
-sub get_language_block_from_language_file
-{
- my ($searchstring, $languagefile) = @_;
-
- my @language_block = ();
-
- for ( my $i = 0; $i <= $#{$languagefile}; $i++ )
- {
- if ( ${$languagefile}[$i] =~ /^\s*\[\s*$searchstring\s*\]\s*$/ )
- {
- my $counter = $i;
-
- push(@language_block, ${$languagefile}[$counter]);
- $counter++;
-
- while (( $counter <= $#{$languagefile} ) && (!( ${$languagefile}[$counter] =~ /^\s*\[/ )))
- {
- push(@language_block, ${$languagefile}[$counter]);
- $counter++;
- }
-
- last;
- }
- }
-
- return \@language_block;
-}
-
-#######################################################
-# Searching for the module name and description in the
-# modules collector
-#######################################################
-
-sub get_module_name_description
-{
- my ($modulesarrayref, $onelanguage, $gid, $type) = @_;
-
- my $found = 0;
-
- my $newstring = "";
-
- for ( my $i = 0; $i <= $#{$modulesarrayref}; $i++ )
- {
- my $onemodule = ${$modulesarrayref}[$i];
-
- if ( $onemodule->{'gid'} eq $gid )
- {
- my $typestring = $type . " " . "(" . $onelanguage . ")";
- if ( $onemodule->{$typestring} ) { $newstring = $onemodule->{$typestring}; }
- $found = 1;
- }
-
- if ( $found ) { last; }
- }
-
- # defaulting to english
-
- if ( ! $found )
- {
- my $defaultlanguage = "en-US";
-
- for ( my $i = 0; $i <= $#{$modulesarrayref}; $i++ )
- {
- my $onemodule = ${$modulesarrayref}[$i];
-
- if ( $onemodule->{'gid'} eq $gid )
- {
- my $typestring = $type . " " . "(" . $defaultlanguage . ")";
- if ( $onemodule->{$typestring} ) { $newstring = $onemodule->{$typestring}; }
- $found = 1;
- }
-
- if ( $found ) { last; }
- }
- }
-
- return $newstring;
-}
-
-#######################################################
-# Setting the productname and productversion
-#######################################################
-
-sub set_productname_and_productversion
-{
- my ($templatefile, $variableshashref) = @_;
-
- my $infoline = "\nSetting product name and product version in Java template file\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- my $productname = $variableshashref->{'PRODUCTNAME'};
- my $productversion = $variableshashref->{'PRODUCTVERSION'};
-
- for ( my $i = 0; $i <= $#{$templatefile}; $i++ )
- {
- ${$templatefile}[$i] =~ s/\{PRODUCTNAME\}/$productname/g;
- ${$templatefile}[$i] =~ s/\{PRODUCTVERSION\}/$productversion/g;
- }
-
- $infoline = "End of: Setting product name and product version in Java template file\n\n";
- push( @installer::globals::logfileinfo, $infoline);
-}
-
-#######################################################
-# Setting the localized Module name and description
-#######################################################
-
-sub set_component_name_and_description
-{
- my ($templatefile, $modulesarrayref, $onelanguage) = @_;
-
- my $infoline = "\nSetting component names and description in Java template file\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- for ( my $i = 0; $i <= $#{$templatefile}; $i++ )
- {
- # OOO_gid_Module_Prg_Wrt_Name
- # OOO_gid_Module_Prg_Wrt_Description
-
- my $oneline = ${$templatefile}[$i];
- my $oldstring = "";
- my $gid = "";
- my $type = "";
-
- if ( $oneline =~ /\b(OOO_gid_\w+)\b/ )
- {
- $oldstring = $1;
-
- $infoline = "Found: $oldstring\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- if ( $oldstring =~ /^\s*OOO_(gid_\w+)_(\w+?)\s*$/ )
- {
- $gid = $1;
- $type = $2;
- }
-
- my $newstring = get_module_name_description($modulesarrayref, $onelanguage, $gid, $type);
-
- $infoline = "\tReplacing (language $onelanguage): OLDSTRING: $oldstring NEWSTRING $newstring\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- ${$templatefile}[$i] =~ s/$oldstring/$newstring/; # always substitute, even if $newstring eq ""
- }
- }
-
- $infoline = "End of: Setting component names and description in Java template file\n\n";
- push( @installer::globals::logfileinfo, $infoline);
-}
-
-#######################################################
-# Translating the Java file
-#######################################################
-
-sub translate_javafile
-{
- my ($templatefile, $languagefile, $onelanguage) = @_;
-
- for ( my $i = 0; $i <= $#{$templatefile}; $i++ )
- {
- my @allstrings = ();
-
- my $oneline = ${$templatefile}[$i];
-
- while ( $oneline =~ /\b(OOO_\w+)\b/ )
- {
- my $replacestring = $1;
- push(@allstrings, $replacestring);
- $oneline =~ s/$replacestring//;
- }
-
- my $oldstring;
-
- foreach $oldstring (@allstrings)
- {
- my $language_block = get_language_block_from_language_file($oldstring, $languagefile);
- my $newstring = get_language_string_from_language_block($language_block, $onelanguage, $oldstring);
-
- $newstring =~ s/\"/\\\"/g; # masquerading the "
- $newstring =~ s/\\\\\"/\\\"/g; # unmasquerading if \" was converted to \\" (because " was already masked)
-
- # if (!( $newstring eq "" )) { ${$idtfile}[$i] =~ s/$oldstring/$newstring/; }
- ${$templatefile}[$i] =~ s/$oldstring/$newstring/; # always substitute, even if $newstring eq ""
- }
- }
-}
-
-###########################################################
-# Returning the license file name for a defined language
-###########################################################
-
-sub get_licensefilesource
-{
- my ($language, $includepatharrayref) = @_;
-
- my $licensefilename = "LICENSE_" . $language;
-
- my $licenseref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$licensefilename, $includepatharrayref, 0);
- if ($$licenseref eq "") { installer::exiter::exit_program("ERROR: Could not find License file $licensefilename!", "get_licensefilesource"); }
-
- my $infoline = "Found licensefile $licensefilename: $$licenseref \n";
- push( @installer::globals::logfileinfo, $infoline);
-
- return $$licenseref;
-}
-
-#######################################################
-# Converting the license string into the
-# Java specific encoding.
-#######################################################
-
-sub convert_licenstring
-{
- my ($licensefile, $includepatharrayref, $javadir, $onelanguage) = @_;
-
- my $licensedir = $javadir . $installer::globals::separator . "license";
- installer::systemactions::create_directory($licensedir);
-
- # saving the original license file
-
- my $licensefilename = $licensedir . $installer::globals::separator . "licensefile.txt";
- installer::files::save_file($licensefilename, $licensefile);
-
- # creating the ulf file from the license file
-
- $licensefilename = $licensedir . $installer::globals::separator . "licensefile.ulf";
- my @licensearray = ();
-
- my $section = "\[TRANSLATE\]\n";
- push(@licensearray, $section);
-
- for ( my $i = 0; $i <= $#{$licensefile}; $i++ )
- {
- my $oneline = ${$licensefile}[$i];
-
- if ($i == 0) { $oneline =~ s/^\s*\\\//; }
-
- $oneline =~ s/\s*$//;
- $oneline =~ s/\"/\\\"/g; # masquerading the "
- $oneline =~ s/\'/\\\'/g; # masquerading the '
-
- $oneline =~ s/\$\{/\{/g; # replacement of variables, only {PRODUCTNAME}, not ${PRODUCTNAME}
-
- my $ulfstring = $onelanguage . " = " . "\"" . $oneline . "\"\n";
- push(@licensearray, $ulfstring);
- }
-
- installer::files::save_file($licensefilename, \@licensearray);
-
- # converting the ulf file to the jlf file with ulfconv
-
- @licensearray = ();
-
- my $converter = "ulfconv";
-
- my $converterref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$converter, $includepatharrayref, 0);
- if ($$converterref eq "") { installer::exiter::exit_program("ERROR: Could not find converter $converter!", "convert_licenstring"); }
-
- my $infoline = "Found converter file $converter: $$converterref \n";
- push( @installer::globals::logfileinfo, $infoline);
-
- my $systemcall = "$$converterref $licensefilename |";
- open (CONV, "$systemcall");
- @licensearray = <CONV>;
- close (CONV);
-
- $licensefilename = $licensedir . $installer::globals::separator . "licensefile.jlf";
- installer::files::save_file($licensefilename, \@licensearray);
-
- # creating the license string from the jlf file
-
- $licensestring = "";
-
- for ( my $i = 1; $i <= $#licensearray; $i++ ) # not the first line!
- {
- my $oneline = $licensearray[$i];
- $oneline =~ s/^\s*$onelanguage\s*\=\s*\"//;
- $oneline =~ s/\"\s*$//;
- $licensestring = $licensestring . $oneline . "\\n";
- }
-
- $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- if ( $licensestring eq "" )
- {
- $infoline = "ERROR: Could not convert $licensefilename !\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- return $licensestring;
-}
-
-#######################################################
-# Adding the license file into the java file
-# In the template java file there are two
-# occurences of INSTALLSDK_GUI_LICENSE
-# and INSTALLSDK_CONSOLE_LICENSE
-#######################################################
-
-sub add_license_file_into_javafile
-{
- my ( $templatefile, $licensefile, $includepatharrayref, $javadir, $onelanguage ) = @_;
-
- my $licensestring = convert_licenstring($licensefile, $includepatharrayref, $javadir, $onelanguage);
-
- # saving the licensestring in an ulf file
- # converting the file using "ulfconv license.ulf"
- # including the new string into the java file
-
- for ( my $i = 0; $i <= $#{$templatefile}; $i++ )
- {
- ${$templatefile}[$i] =~ s/INSTALLSDK_GUI_LICENSE/$licensestring/;
- ${$templatefile}[$i] =~ s/INSTALLSDK_CONSOLE_LICENSE/$licensestring/;
- }
-}
-
-#######################################################
-# Executing one system call
-#######################################################
-
-sub make_systemcall
-{
- my ( $systemcall, $logreturn ) = @_;
-
- my @returns = ();
-
- installer::logger::print_message( "... $systemcall ...\n" );
-
- open (REG, "$systemcall");
- while (<REG>) {push(@returns, $_); }
- close (REG);
-
- my $returnvalue = $?; # $? contains the return value of the systemcall
-
- my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- if ( $logreturn )
- {
- for ( my $j = 0; $j <= $#returns; $j++ ) { push( @installer::globals::logfileinfo, "$returns[$j]"); }
- }
-
- if ($returnvalue)
- {
- $infoline = "ERROR: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
- $error_occured = 1;
- }
- else
- {
- $infoline = "SUCCESS: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- return \@returns;
-}
-
-#######################################################
-# Setting the class path for the Installer SDK
-#######################################################
-
-sub set_classpath_for_install_sdk
-{
- my ( $directory ) = @_;
-
- my $installsdk = "";
- my $solarVersion = "";
- my $inPath = "";
- my $updMinorExt = "";
-
- if ( defined( $ENV{ 'SOLARVERSION' } ) ) { $solarVersion = $ENV{'SOLARVERSION'}; }
- else { installer::exiter::exit_program("ERROR: Environment variable \"SOLARVERSION\" not set!", "set_classpath_for_install_sdk"); }
-
- if ( defined( $ENV{ 'INPATH' } ) ) { $inPath = $ENV{'INPATH'}; }
- else { installer::exiter::exit_program("ERROR: Environment variable \"INPATH\" not set!", "set_classpath_for_install_sdk"); }
-
- if ( defined( $ENV{ 'UPDMINOREXT' } ) ) { $updMinorExt = $ENV{'UPDMINOREXT'}; }
-
- $installsdk = $solarVersion . $installer::globals::separator . $inPath . $installer::globals::separator . "bin" . $updMinorExt;
- $installsdk = $installsdk . $installer::globals::separator . "javainstaller";
-
- if ( $ENV{'INSTALLSDK_SOURCE'} ) { $installsdk = $ENV{'INSTALLSDK_SOURCE'}; } # overriding the Install SDK with INSTALLSDK_SOURCE
-
- # The variable CLASSPATH has to contain:
- # $installsdk/classes:$installsdk/classes/setupsdk.jar:
- # $installsdk/classes/parser.jar:$installsdk/classes/jaxp.jar:
- # $installsdk/classes/ldapjdk.jar:$directory
-
- my @additional_classpath = ();
- push(@additional_classpath, "$installsdk\/classes");
- push(@additional_classpath, "$installsdk\/installsdk.jar");
- push(@additional_classpath, "$installsdk\/classes\/parser.jar");
- push(@additional_classpath, "$installsdk\/classes\/jaxp.jar");
- push(@additional_classpath, "$directory");
-
- my $newclasspathstring = "";
- my $oldclasspathstring = "";
- if ( $ENV{'CLASSPATH'} ) { $oldclasspathstring = $ENV{'CLASSPATH'}; }
- else { $oldclasspathstring = "\."; }
-
- for ( my $i = 0; $i <= $#additional_classpath; $i++ )
- {
- $newclasspathstring = $newclasspathstring . $additional_classpath[$i] . ":";
- }
-
- $newclasspathstring = $newclasspathstring . $oldclasspathstring;
-
- $ENV{'CLASSPATH'} = $newclasspathstring;
-
- my $infoline = "Setting CLASSPATH to $ENV{'CLASSPATH'}\n";
- push( @installer::globals::logfileinfo, $infoline);
-}
-
-#######################################################
-# Setting the class file name in the Java locale file
-#######################################################
-
-sub set_classfilename
-{
- my ($templatefile, $classfilename, $searchstring) = @_;
-
- for ( my $j = 0; $j <= $#{$templatefile}; $j++ )
- {
- if ( ${$templatefile}[$j] =~ /\Q$searchstring\E/ )
- {
- ${$templatefile}[$j] =~ s/$searchstring/$classfilename/;
- last;
- }
- }
-}
-
-#######################################################
-# Substituting one variable in the xml file
-#######################################################
-
-sub replace_one_variable
-{
- my ($xmlfile, $variable, $searchstring) = @_;
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- ${$xmlfile}[$i] =~ s/\$\{$searchstring\}/$variable/g;
- }
-}
-
-#######################################################
-# Substituting the variables in the xml file
-#######################################################
-
-sub substitute_variables
-{
- my ($xmlfile, $variableshashref) = @_;
-
- my $key;
-
- foreach $key (keys %{$variableshashref})
- {
- my $value = $variableshashref->{$key};
- replace_one_variable($xmlfile, $value, $key);
- }
-}
-
-##########################################################
-# Finding the line number in xml file of a special
-# component
-##########################################################
-
-sub find_component_line
-{
- my ($xmlfile, $componentname) = @_;
-
- my $linenumber = 0;
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- if ( ${$xmlfile}[$i] =~ /name\s*\=\'\s*$componentname/ )
- {
- $linenumber = $i;
- last;
- }
- }
-
- return $linenumber;
-}
-
-##########################################################
-# Removing one package from the xml file
-##########################################################
-
-sub remove_package
-{
- my ($xmlfile, $packagename) = @_;
-
- my $searchstring = $packagename;
- if ( $searchstring =~ /\-(\S+?)\s*$/ ) { $searchstring = $1; } # "SUNW%PRODUCTNAME-mailcap" -> "mailcap"
-
- my $packagestring = "";
- my $namestring = "";
- my $infoline = "";
-
- if ( $installer::globals::issolarispkgbuild )
- {
- $packagestring = "\<pkgunit";
- $namestring = "pkgName";
- }
- elsif ( $installer::globals::islinuxrpmbuild )
- {
- $packagestring = "\<rpmunit";
- $namestring = "rpmUniqueName";
- }
-
- my $removed_packge = 0;
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- if ( ${$xmlfile}[$i] =~ /^\s*\Q$packagestring\E/ )
- {
- # this is a package, but is it the correct one?
-
- my $do_delete = 0;
- my $linecounter = 1;
- my $startline = $i+1;
- my $line = ${$xmlfile}[$startline];
- if (($line =~ /^\s*\Q$namestring\E\s*\=/) && ($line =~ /\-\Q$searchstring\E/)) { $do_delete = 1; }
-
- # but not deleting fonts package in language packs
- if ( $line =~ /-ONELANGUAGE-/ ) { $do_delete = 0; }
-
- my $endcounter = 0;
-
- while ((!( $line =~ /\/\>/ )) && ( $startline <= $#{$xmlfile} ))
- {
- $linecounter++;
- $startline++;
- $line = ${$xmlfile}[$startline];
- if (($line =~ /^\s*\Q$namestring\E\s*\=/) && ($line =~ /\-\Q$searchstring\E/)) { $do_delete = 1; }
- }
-
- $linecounter = $linecounter + 1;
-
- if ( $do_delete )
- {
- my $infoline = "\tReally removing package $packagename from xml file.\n";
- push( @installer::globals::logfileinfo, $infoline);
- splice(@{$xmlfile},$i, $linecounter); # removing $linecounter lines, beginning in line $i
- $removed_packge = 1;
- last;
- }
- }
- }
-
- if ( $removed_packge )
- {
- $infoline = "Package $packagename successfully removed from xml file.\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- else
- {
- $infoline = "Did not find package $packagename in xml file.\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
-}
-
-##########################################################
-# Removing one component from the xml file
-##########################################################
-
-sub remove_component
-{
- my ($xmlfile, $componentname) = @_;
-
- my @removed_lines = ();
-
- push(@removed_lines, "\n");
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- if ( ${$xmlfile}[$i] =~ /name\s*\=\'\s*$componentname/ )
- {
- # Counting the lines till the second "</component>"
-
- push(@removed_lines, ${$xmlfile}[$i]);
- my $linecounter = 1;
- my $startline = $i+1;
- my $line = ${$xmlfile}[$startline];
- push(@removed_lines, $line);
- my $endcounter = 0;
-
- while ((!( $line =~ /^\s*\<\/component\>\s*$/ )) && ( $startline <= $#{$xmlfile} ))
- {
- $linecounter++;
- $startline++;
- $line = ${$xmlfile}[$startline];
- push(@removed_lines, $line);
- }
-
- $linecounter = $linecounter + 2; # last line and following empty line
-
- splice(@{$xmlfile},$i, $linecounter); # removing $linecounter lines, beginning in line $i
- last;
- }
- }
-
- return \@removed_lines;
-}
-
-##########################################################
-# If this is an installation set without language packs
-# the language pack module can be removed
-##########################################################
-
-sub remove_languagepack_from_xmlfile
-{
- my ($xmlfile) = @_;
-
- # Component begins with "<component selected="true" name='module_languagepacks' componentVersion="${PRODUCTVERSION}">"
- # and ends with "</component>" (the second "</component>" !)
-
- remove_component($xmlfile, "languagepack_DEFAULT");
- remove_component($xmlfile, "languagepack_ONELANGUAGE");
- remove_component($xmlfile, "module_languagepacks");
-}
-
-##########################################################
-# Duplicating a component
-##########################################################
-
-sub duplicate_component
-{
- my ( $arrayref ) = @_;
-
- @newarray = ();
-
- for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
- {
- push(@newarray, ${$arrayref}[$i]);
- }
-
- return \@newarray;
-}
-
-##########################################################
-# Including a component into the xml file
-# at a specified line
-##########################################################
-
-sub include_component_at_specific_line
-{
- my ($xmlfile, $unit, $line) = @_;
-
- splice(@{$xmlfile},$line, 0, @{$unit});
-}
-
-##########################################################
-# Font packages do not exist for all languages.
-##########################################################
-
-sub remove_font_package_from_unit
-{
- my ( $unitcopy, $onelanguage ) = @_;
-
- my $searchstring = "-fonts";
-
- my $packagestring = "";
- my $namestring = "";
-
- if ( $installer::globals::issolarispkgbuild )
- {
- $packagestring = "\<pkgunit";
- $namestring = "pkgName";
- }
- elsif ( $installer::globals::islinuxrpmbuild )
- {
- $packagestring = "\<rpmunit";
- $namestring = "rpmUniqueName";
- }
-
- for ( my $i = 0; $i <= $#{$unitcopy}; $i++ )
- {
- if ( ${$unitcopy}[$i] =~ /^\s*\Q$packagestring\E/ )
- {
- # this is a package, but is it the correct one?
-
- my $do_delete = 0;
- my $linecounter = 1;
- my $startline = $i+1;
- my $line = ${$unitcopy}[$startline];
- if (($line =~ /^\s*\Q$namestring\E\s*\=/) && ($line =~ /\Q$searchstring\E/)) { $do_delete = 1; }
-
- my $endcounter = 0;
-
- while ((!( $line =~ /\/\>/ )) && ( $startline <= $#{$unitcopy} ))
- {
- $linecounter++;
- $startline++;
- $line = ${$unitcopy}[$startline];
- if (($line =~ /^\s*\Q$namestring\E\s*\=/) && ($line =~ /\Q$searchstring\E/)) { $do_delete = 1; }
- }
-
- $linecounter = $linecounter + 1;
-
- if ( $do_delete )
- {
- splice(@{$unitcopy},$i, $linecounter); # removing $linecounter lines, beginning in line $i
- last;
- }
- }
- }
-}
-
-##########################################################
-# If this is an installation set with language packs,
-# modules for each language pack have to be created
-# dynamically
-##########################################################
-
-sub duplicate_languagepack_in_xmlfile
-{
- my ($xmlfile, $languagesarrayref) = @_;
-
- my $unit = remove_component($xmlfile, "languagepack_ONELANGUAGE");
- my $startline = find_component_line($xmlfile, "module_languagepacks");
- my $infoline = "";
- $startline = $startline + 1;
-
- for ( my $i = 0; $i <= $#{$languagesarrayref}; $i++ )
- {
- my $onelanguage = ${$languagesarrayref}[$i];
- my $unitcopy = duplicate_component($unit);
-
- # replacing string ONELANGUAGE in the unit copy
- for ( my $j = 0; $j <= $#{$unitcopy}; $j++ ) { ${$unitcopy}[$j] =~ s/ONELANGUAGE/$onelanguage/g; }
-
- # including the unitcopy into the xml file
- include_component_at_specific_line($xmlfile, $unitcopy, $startline);
- $startline = $startline + $#{$unitcopy} + 1;
- }
-
- # adding the default language as language pack, too
- $unit = remove_component($xmlfile, "languagepack_DEFAULT");
- $startline = find_component_line($xmlfile, "module_languagepacks");
- $startline = $startline + 1;
-
- $onelanguage = ${$languagesarrayref}[0];
- $unitcopy = duplicate_component($unit);
-
- # replacing string DEFAULT in the unit copy
- for ( my $j = 0; $j <= $#{$unitcopy}; $j++ ) { ${$unitcopy}[$j] =~ s/DEFAULT/$onelanguage/g; }
-
- # including the unitcopy into the xml file
- include_component_at_specific_line($xmlfile, $unitcopy, $startline);
- $startline = $startline + $#{$unitcopy} + 1;
-}
-
-#######################################################
-# Removing empty packages from xml file. The names
-# are stored in @installer::globals::emptypackages
-#######################################################
-
-sub remove_empty_packages_in_xmlfile
-{
- my ($xmlfile) = @_;
-
- for ( my $i = 0; $i <= $#installer::globals::emptypackages; $i++ )
- {
- my $packagename = $installer::globals::emptypackages[$i];
- my $infoline = "Try to remove package $packagename from xml file.\n";
- push( @installer::globals::logfileinfo, $infoline);
- remove_package($xmlfile, $packagename);
- }
-}
-
-#######################################################
-# Preparing the language packs in the xml file
-#######################################################
-
-sub prepare_language_pack_in_xmlfile
-{
- my ($xmlfile, $languagesarrayref) = @_;
-
- # if ( ! $installer::globals::is_unix_multi )
- # {
- # remove_languagepack_from_xmlfile($xmlfile);
- # }
- # else
- # {
- duplicate_languagepack_in_xmlfile($xmlfile, $languagesarrayref);
- # }
-
-}
-
-#######################################################
-# Returning a rpm unit from a xml file
-#######################################################
-
-sub get_rpm_unit_from_xmlfile
-{
- my ($rpmname, $xmlfile) = @_;
-
- my $infoline = "Searching for $rpmname in xml file.\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- my @rpmunit = ();
- my $includeline = 0;
- my $record = 0;
- my $foundrpm = 0;
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- my $oneline = ${$xmlfile}[$i];
-
- if ( $oneline =~ /^\s*\<rpmunit/ ) { $record = 1; }
-
- if ( $record ) { push(@rpmunit, $oneline); }
-
- if ( $oneline =~ /^\s*rpmUniqueName\s*=\s*\"\Q$rpmname\E\"\s*$/ ) { $foundrpm = 1; }
-
- if (( $record ) && ( $oneline =~ /\/\>\s*$/ )) { $record = 0; }
-
- if (( ! $foundrpm ) && ( ! $record )) { @rpmunit = (); }
-
- if (( $foundrpm ) && ( ! $record )) { $includeline = $i + 1; }
-
- if (( $foundrpm ) && ( ! $record )) { last; }
- }
-
- if ( ! $foundrpm ) { installer::exiter::exit_program("ERROR: Did not find rpmunit $rpmname in xml file!", "get_rpm_unit_from_xmlfile"); }
-
- $infoline = "Found $rpmname in xml file. Returning block lines: $#rpmunit + 1. Includeline: $includeline \n";
- push( @installer::globals::logfileinfo, $infoline);
-
- return (\@rpmunit, $includeline);
-}
-
-#######################################################
-# Exchanging package names in xml file
-#######################################################
-
-sub exchange_name_in_rpmunit
-{
- my ($rpmunit, $oldpackagename, $newpackagename) = @_;
-
- for ( my $i = 0; $i <= $#{$rpmunit}; $i++ )
- {
- ${$rpmunit}[$i] =~ s/$oldpackagename/$newpackagename/;
- }
-}
-
-#######################################################
-# Preparing link RPMs in the xml file
-#######################################################
-
-sub prepare_linkrpm_in_xmlfile
-{
- my ($xmlfile, $rpmlist) = @_;
-
- for ( my $i = 0; $i <= $#{$rpmlist}; $i++ )
- {
- my $oldpackagename = "";
- my $newpackagename = "";
-
- my $rpmline = ${$rpmlist}[$i];
-
- my $infoline = "Preparing link/patch RPM: $rpmline\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- if ( $rpmline =~ /^\s*(\S.*?\S)\s+(\S.*?\S)\s*$/ )
- {
- $oldpackagename = $1;
- $newpackagename = $2;
- }
-
- my ($rpmunit, $includeline) = get_rpm_unit_from_xmlfile($oldpackagename, $xmlfile);
- exchange_name_in_rpmunit($rpmunit, $oldpackagename, $newpackagename);
- include_component_at_specific_line($xmlfile, $rpmunit, $includeline);
- }
-}
-
-#######################################################################
-# Removing w4w filter module from xml file for Solaris x86 and Linux
-#######################################################################
-
-sub remove_w4w_from_xmlfile
-{
- my ($xmlfile) = @_;
-
- # Component begins with "<component selected='true' name='gid_Module_Prg_Wrt_Flt_W4w' componentVersion="8">"
- # and ends with "</component>"
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- if ( ${$xmlfile}[$i] =~ /name\s*\=\'\s*gid_Module_Prg_Wrt_Flt_W4w/ )
- {
- # Counting the lines till "</component>"
-
- my $linecounter = 1;
- my $startline = $i+1;
- my $line = ${$xmlfile}[$startline];
-
- while ((!( $line =~ /^\s*\<\/component\>\s*$/ )) && ( $startline <= $#{$xmlfile} ))
- {
- $linecounter++;
- $startline++;
- $line = ${$xmlfile}[$startline];
- }
-
- $linecounter = $linecounter + 2; # last line and following empty line
-
- splice(@{$xmlfile},$i, $linecounter); # removing $linecounter lines, beginning in line $i
- last;
- }
- }
-}
-
-#######################################################################
-# Removing module from xml file, if not defined in scp
-#######################################################################
-
-sub remove_scpgid_from_xmlfile
-{
- my ($xmlfile, $scpgid) = @_;
-
- # Component begins with "<component selected='true' name='$scpgid' componentVersion="8">"
- # and ends with "</component>"
-
- my $successfully_removed = 0;
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- if ( ${$xmlfile}[$i] =~ /name\s*\=\'\s*\Q$scpgid\E/ )
- {
- # Counting the lines till "</component>"
-
- my $linecounter = 1;
- my $startline = $i+1;
- my $line = ${$xmlfile}[$startline];
-
- while ((!( $line =~ /^\s*\<\/component\>\s*$/ )) && ( $startline <= $#{$xmlfile} ))
- {
- $linecounter++;
- $startline++;
- $line = ${$xmlfile}[$startline];
- }
-
- $linecounter = $linecounter + 2; # last line and following empty line
-
- splice(@{$xmlfile},$i, $linecounter); # removing $linecounter lines, beginning in line $i
- $successfully_removed = 1;
- last;
- }
- }
-
- my $infoline = "";
- if ($successfully_removed)
- {
- $infoline = "Module $scpgid successfully removed from xml file.\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- else
- {
- $infoline = "Module $scpgid not found in xml file (no problem).\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-}
-
-#######################################################################
-# Special mechanism for removing modules for xml file, if they are
-# not defined in scp (introduced for onlineupdate module).
-#######################################################################
-
-sub remove_module_if_not_defined
-{
- my ($xmlfile, $modulesarrayref, $scpgid) = @_;
-
- my $infoline = "Checking existence of $scpgid in scp definition\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- my $found = 0;
-
- for ( my $i = 0; $i <= $#{$modulesarrayref}; $i++ )
- {
- my $onemodule = ${$modulesarrayref}[$i];
- if ( $onemodule->{'gid'} eq $scpgid ) { $found = 1; }
- if ( $found ) { last; }
- }
-
- if ( ! $found )
- {
- $infoline = "Module $scpgid not found -> Removing from xml file.\n";
- push( @installer::globals::logfileinfo, $infoline);
- remove_scpgid_from_xmlfile($xmlfile, $scpgid);
- }
-}
-
-###########################################################
-# Preparing the package subdirectory
-###########################################################
-
-sub create_empty_packages
-{
- my ( $xmlfile ) = @_;
-
- if ( $installer::globals::issolarispkgbuild )
- {
- my $path = "";
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- if ( ${$xmlfile}[$i] =~ /pkgRelativePath\s*\=\s*\'(.*?)\'\s*$/ )
- {
- $path = $1;
- installer::systemactions::create_directory_structure($path);
- last; # only creating one path
- }
- }
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- if ( ${$xmlfile}[$i] =~ /pkgName\s*\=\s*\'(.*?)\'\s*$/ )
- {
- my $pkgname = $1;
- if ( $path ne "" ) { $pkgname = $path . $installer::globals::separator . $pkgname; }
- installer::systemactions::create_directory_structure($pkgname);
- }
- }
- }
-
- # "-novalidate" does not work for Linux RPMs
-
- if ( $installer::globals::islinuxrpmbuild )
- {
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- if ( ${$xmlfile}[$i] =~ /rpmPath\s*\=\s*\"(.*?)\"\s*$/ )
- {
- my $rpmpath = $1;
- my $path = "";
-
- if ( $rpmpath =~ /^\s*(.*)\/(.*?)\s*$/ )
- {
- $path = $1;
- }
-
- if ( $path ne "" ) { installer::systemactions::create_directory_structure($path); }
-
- my $systemcall = "touch $rpmpath"; # creating empty rpm
- system($systemcall);
- }
- }
- }
-}
-
-###########################################################
-# Reading the archive file name from the xml file
-###########################################################
-
-sub get_archivefilename
-{
- my ( $xmlfile ) = @_;
-
- my $archivefilename = "";
-
- for ( my $j = 0; $j <= $#{$xmlfile}; $j++ )
- {
- if ( ${$xmlfile}[$j] =~ /archiveFileName\s*=\s*\'(.*?)\'/ )
- {
- $archivefilename = $1;
- last;
- }
- }
-
- return $archivefilename;
-}
-
-#######################################################
-# Copying the loader locally
-#######################################################
-
-sub copy_setup_locally
-{
- my ($includepatharrayref, $loadername, $newname) = @_;
-
- my $loadernameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$loadername, $includepatharrayref, 0);
-
- if ($$loadernameref eq "") { installer::exiter::exit_program("ERROR: Could not find Java loader $loadername!", "copy_setup_locally"); }
-
- installer::systemactions::copy_one_file($$loadernameref, $newname);
- my $localcall = "chmod 775 $newname \>\/dev\/null 2\>\&1";
- system($localcall);
-}
-
-
-#######################################################
-# Copying the loader into the installation set
-#######################################################
-
-sub put_loader_into_installset
-{
- my ($installdir, $filename) = @_;
-
- my $installname = $installdir . $installer::globals::separator . $filename;
-
- installer::systemactions::copy_one_file($filename, $installname);
-
- my $localcall = "chmod 775 $installname \>\/dev\/null 2\>\&1";
- system($localcall);
-}
-
-#################################################################
-# Setting for Solaris the package names in the Java translation
-# file. The name is used for the
-# This name is displayed tools like prodreg.
-# Unfortunately this name in the component is also used
-# in the translation template file for the module name
-# and module description translations.
-#################################################################
-
-sub replace_component_name_in_java_file
-{
- my ($alljavafiles, $oldname, $newname) = @_;
-
- # The new name must not contain white spaces
-
- $newname =~ s/ /\_/g;
-
- for ( my $i = 0; $i <= $#{$alljavafiles}; $i++ )
- {
- my $javafilename = ${$alljavafiles}[$i];
- my $javafile = installer::files::read_file($javafilename);
-
- my $oldstring = "ComponentDescription-" . $oldname;
- my $newstring = "ComponentDescription-" . $newname;
-
- for ( my $j = 0; $j <= $#{$javafile}; $j++ ) { ${$javafile}[$j] =~ s/\b$oldstring\b/$newstring/; }
-
- $oldstring = $oldname . "-install-DisplayName";
- $newstring = $newname . "-install-DisplayName";
-
- for ( my $j = 0; $j <= $#{$javafile}; $j++ ) { ${$javafile}[$j] =~ s/\b$oldstring\b/$newstring/; }
-
- $oldstring = $oldname . "-uninstall-DisplayName";
- $newstring = $newname . "-uninstall-DisplayName";
-
- for ( my $j = 0; $j <= $#{$javafile}; $j++ ) { ${$javafile}[$j] =~ s/\b$oldstring\b/$newstring/; }
-
- installer::files::save_file($javafilename, $javafile);
- $infoline = "Changes in Java file: $javafilename : $oldname \-\> $newname\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-}
-
-#################################################################
-# Some module names are not defined in the scp project.
-# The names for this modules are searched in the base Java
-# translation file.
-#################################################################
-
-sub get_module_name_from_basejavafile
-{
- my ($componentname, $javatemplateorigfile, $ulffile) = @_;
-
- my $searchname = $componentname . "-install-DisplayName";
- my $modulename = "";
- my $replacename = "";
-
- # line content: { "coremodule-install-DisplayName", "OOO_INSTALLSDK_117" },
-
- for ( my $i = 0; $i <= $#{$javatemplateorigfile}; $i++ )
- {
- if ( ${$javatemplateorigfile}[$i] =~ /\"\s*\Q$searchname\E\s*\"\s*\,\s*\"\s*(.*?)\s*\"\s*\}\s*\,\s*$/ )
- {
- $replacename = $1;
- last;
- }
- }
-
- if ( $replacename ne "" )
- {
- my $language_block = get_language_block_from_language_file($replacename, $ulffile);
- $modulename = get_language_string_from_language_block($language_block, "en-US", $replacename);
- }
-
- return $modulename;
-}
-
-#################################################################
-# Setting for Solaris the package names in the xml file.
-# This name is displayed tools like prodreg.
-# Unfortunately this name in the component is also used
-# in the translation template file for the module name
-# and module description translations.
-#################################################################
-
-sub replace_component_names
-{
- my ($xmlfile, $templatefilename, $modulesarrayref, $javatemplateorigfile, $ulffile) = @_;
-
- # path in which all java languages files are located
-
- my $javafilesdir = $templatefilename;
- installer::pathanalyzer::get_path_from_fullqualifiedname(\$javafilesdir);
- my $alljavafiles = installer::systemactions::find_file_with_file_extension("java", $javafilesdir);
- for ( my $i = 0; $i <= $#{$alljavafiles}; $i++ ) { ${$alljavafiles}[$i] = $javafilesdir . ${$alljavafiles}[$i]; }
-
- # analyzing the xml file
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- my $newstring = "";
- my $componentname = "";
-
- if ( ${$xmlfile}[$i] =~ /\bcomponent\b.*\bname\s*\=\'\s*(.*?)\s*\'/ )
- {
- $componentname = $1;
-
- # Getting module name from the scp files in $modulesarrayref
-
- my $onelanguage = "en-US";
- my $gid = $componentname;
- my $type = "Name";
-
- my $modulename = "";
- $modulename = get_module_name_description($modulesarrayref, $onelanguage, $gid, $type);
-
- if ( $modulename eq "" )
- {
- $infoline = "Info: Modulename for $gid not defined in modules collector. Looking in Java ulf file.\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- if ( $modulename eq "" ) # the modulename can also be set in the Java ulf file
- {
- $modulename = get_module_name_from_basejavafile($componentname, $javatemplateorigfile, $ulffile);
- }
-
- if ( $modulename ne "" ) # only do something, if the modulename was found
- {
- ${$xmlfile}[$i] =~ s/$componentname/$modulename/;
-
- $infoline = "Replacement in xml file (Solaris): $componentname \-\> $modulename\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- # Replacement has to be done in all Java language files
- replace_component_name_in_java_file($alljavafiles, $componentname, $modulename);
- }
-
- if ( $modulename eq "" ) # the modulename can also be set in the Java ulf file
- {
- $infoline = "WARNING: No replacement in xml file for component: $componentname\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- }
- }
-}
-
-#############################################################################
-# Collecting all packages or rpms located in the installation directory
-#############################################################################
-
-sub get_all_packages_in_installdir
-{
- my ($installdir, $subdir) = @_;
-
- my $infoline = "";
-
- my @allrpms = (); # not needed for Solaris at the moment
- my $allrpms = \@allrpms;
-
- $installdir =~ s/\Q$installer::globals::separator\E\s*$//;
- my $directory = $installdir . $installer::globals::separator . $subdir;
- $directory =~ s/\Q$installer::globals::separator\E\s*$//;
-
- if ( $installer::globals::islinuxrpmbuild )
- {
- $allrpms = installer::systemactions::find_file_with_file_extension("rpm", $directory);
-
- # collecting rpms with the complete path
-
- for ( my $i = 0; $i <= $#{$allrpms}; $i++ )
- {
- ${$allrpms}[$i] = $directory . $installer::globals::separator . ${$allrpms}[$i];
- $infoline = "Found RPM: ${$allrpms}[$i]\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- }
-
- return $allrpms;
-}
-
-#######################################################
-# Adding the values of the array
-#######################################################
-
-sub do_sum
-{
- my ( $allnumbers ) = @_;
-
- my $sum = 0;
-
- for ( my $i = 0; $i <= $#{$allnumbers}; $i++ )
- {
- $sum = $sum + ${$allnumbers}[$i];
- }
-
- return $sum;
-}
-
-#######################################################
-# Setting the filesize for the RPMs in the xml file
-#######################################################
-
-sub set_filesize_in_xmlfile
-{
- my ($filesize, $rpmname, $xmlfile) = @_;
-
- my $infoline = "";
- my $foundrpm = 0;
- my $filesizeset = 0;
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- my $line = ${$xmlfile}[$i];
-
- # searching for "rpmPath="RPMS/${UNIXPRODUCTNAME}-core01-${PACKAGEVERSION}-${PACKAGEREVISION}.i586.rpm""
-
- if (( $line =~ /rpmPath\s*=/ ) && ( $line =~ /\Q$rpmname\E\"\s*$/ ))
- {
- $foundrpm = 1;
-
- my $number = $i;
- $number++;
-
- while ( ! ( ${$xmlfile}[$number] =~ /\/\>\s*$/ ))
- {
- if ( ${$xmlfile}[$number] =~ /FILESIZEPLACEHOLDER/ )
- {
- ${$xmlfile}[$number] =~ s/FILESIZEPLACEHOLDER/$filesize/;
- $filesizeset = 1;
- $infoline = "Setting filesize for $rpmname : $filesize\n";
- push( @installer::globals::logfileinfo, $infoline);
- last;
- }
-
- $number++;
- }
-
- last;
- }
- }
-
- if ( ! $foundrpm )
- {
- $infoline = "ERROR: Did not find $rpmname in xml file !\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- if ( ! $filesizeset )
- {
- $infoline = "ERROR: Did not set filesize for $rpmname in xml file !\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-}
-
-############################################################
-# Collecting all rpmUniqueName in xml file.
-############################################################
-
-sub collect_uniquenames_in_xmlfile
-{
- my ($xmlfile) = @_;
-
- my @rpmuniquenames = ();
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- my $oneline = ${$xmlfile}[$i];
-
- if ( $oneline =~ /^\s*rpmUniqueName\s*\=\s*\"(.*)\"\s*$/ )
- {
- my $rpmuniquename = $1;
- push(@rpmuniquenames, $rpmuniquename)
- }
- }
-
- return \@rpmuniquenames;
-}
-
-############################################################
-# Searching for the corresponding rpm, that fits to
-# the unique rpm name.
-# Simple mechanism: The name of the rpm starts with the
-# unique rpm name followed by a "-".
-############################################################
-
-sub find_rpmname_to_uniquename
-{
- my ($uniquename, $listofpackages) = @_;
-
- my @all_correct_rpms = ();
- my $infoline = "";
-
- # special handling for java RPMs, which have a very strange naming schema
- my $localuniquename = $uniquename;
- if ( $uniquename =~ /^\s*jre\-/ ) { $localuniquename = "jre"; }
-
- for ( my $i = 0; $i <= $#{$listofpackages}; $i++ )
- {
- my $completerpmname = ${$listofpackages}[$i];
- my $rpmname = $completerpmname;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$rpmname);
-
- if ( $rpmname =~ /^\s*\Q$localuniquename\E\-\d/ ) { push(@all_correct_rpms, $rpmname); }
- }
-
- # @all_correct_rpms has to contain exactly one value
-
- if ( $#all_correct_rpms > 0 )
- {
- my $number = $#all_correct_rpms + 1;
- $infoline = "There are $number RPMs for the unique name \"$uniquename\" :\n";
- push( @installer::globals::logfileinfo, $infoline);
- my $allrpmstring = "";
- for ( my $i = 0; $i <= $#all_correct_rpms; $i++ ) { $allrpmstring = $allrpmstring . $all_correct_rpms[$i] . "\n"; }
- push( @installer::globals::logfileinfo, $allrpmstring);
- installer::exiter::exit_program("ERROR: Found $number RPMs that start with unique name \"$uniquename\". Only one allowed!", "find_rpmname_to_uniquename");
- }
-
- if ( $#all_correct_rpms < 0 )
- {
- $infoline = "There is no rpm for the unique name \"$uniquename\"\n";
- push( @installer::globals::logfileinfo, $infoline);
- installer::exiter::exit_program("ERROR: There is no RPM that start with unique name \"$uniquename\"!", "find_rpmname_to_uniquename");
- }
-
- if ( $#all_correct_rpms == 0 )
- {
- $infoline = "Found one rpm for the unique name \"$uniquename\" : $all_correct_rpms[0]\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- return $all_correct_rpms[0];
-}
-
-#######################################################
-# Including the complete RPM name into the xml file
-#######################################################
-
-sub set_rpmname_into_xmlfile
-{
- my ($rpmname, $uniquename, $xmlfile) = @_;
-
- my $foundrpm = 0;
- my $rpmnameset = 0;
-
- for ( my $i = 0; $i <= $#{$xmlfile}; $i++ )
- {
- my $oneline = ${$xmlfile}[$i];
-
- if ( $oneline =~ /^\s*rpmUniqueName\s*\=\s*\"\Q$uniquename\E\"\s*$/ )
- {
- $foundrpm = 1;
-
- my $number = $i;
- $number++;
-
- while ( ! ( ${$xmlfile}[$number] =~ /\/\>\s*$/ ))
- {
- if ( ${$xmlfile}[$number] =~ /RPMFILENAMEPLACEHOLDER/ )
- {
- ${$xmlfile}[$number] =~ s/RPMFILENAMEPLACEHOLDER/$rpmname/;
- $rpmnameset = 1;
- $infoline = "Setting RPM name for $uniquename : $rpmname\n";
- push( @installer::globals::logfileinfo, $infoline);
- last;
- }
-
- $number++;
- }
-
- last;
- }
- }
-
- if ( ! $foundrpm )
- {
- $infoline = "ERROR: Did not find $rpmname in xml file !\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- if ( ! $rpmnameset )
- {
- $infoline = "ERROR: Did not set rpm name for $uniquename in xml file !\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
-}
-
-############################################################
-# Including the rpm path dynamically into the xml file.
-# This is introduced, because system integration has
-# variable PackageVersion and PackageRevision in xml file.
-############################################################
-
-sub put_rpmpath_into_xmlfile
-{
- my ($xmlfile, $listofpackages) = @_;
-
- my $infoline = "";
-
- my $alluniquenames = collect_uniquenames_in_xmlfile($xmlfile);
-
- my $number = $#{$listofpackages} + 1;
- $infoline = "Number of packages in installation set: $number\n";
- push( @installer::globals::logfileinfo, $infoline);
- $number = $#{$alluniquenames} + 1;
- $infoline = "Number of unique RPM names in xml file: $number\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- $infoline = "\nPackages in installation set:\n";
- push( @installer::globals::logfileinfo, $infoline);
- for ( my $i = 0; $i <= $#{$listofpackages}; $i++ )
- {
- $infoline = "${$listofpackages}[$i]\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- $infoline = "\nUnique RPM names in xml file:\n";
- push( @installer::globals::logfileinfo, $infoline);
- for ( my $i = 0; $i <= $#{$alluniquenames}; $i++ )
- {
- $infoline = "${$alluniquenames}[$i]\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- if ( $#{$alluniquenames} != $#{$listofpackages} ) { installer::exiter::exit_program("ERROR: xml file contains $#{$alluniquenames} unique names, but there are $#{$listofpackages} packages in installation set!", "put_rpmpath_into_xmlfile"); }
-
- for ( my $i = 0; $i <= $#{$alluniquenames}; $i++ )
- {
- my $uniquename = ${$alluniquenames}[$i];
- my $rpmname = find_rpmname_to_uniquename($uniquename, $listofpackages);
- set_rpmname_into_xmlfile($rpmname, $uniquename, $xmlfile);
- }
-}
-
-#######################################################
-# Including the file size of the rpms into the
-# xml file
-#######################################################
-
-sub put_filesize_into_xmlfile
-{
- my ($xmlfile, $listofpackages) = @_;
-
- my $infoline = "";
-
- for ( my $i = 0; $i <= $#{$listofpackages}; $i++ )
- {
- my $completerpmname = ${$listofpackages}[$i];
- my $rpmname = $completerpmname;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$rpmname);
-
- if ( ! $installer::globals::rpmquerycommand ) { installer::exiter::exit_program("ERROR: rpm not found for querying packages!", "put_filesize_into_xmlfile"); }
- my $systemcall = "$installer::globals::rpmquerycommand -qp --queryformat \"\[\%\{FILESIZES\}\\n\]\" $completerpmname 2\>\&1 |";
- my $rpmout = make_systemcall($systemcall, 0);
- my $filesize = do_sum($rpmout);
-
- $infoline = "Filesize $rpmname : $filesize\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- set_filesize_in_xmlfile($filesize, $rpmname, $xmlfile);
- }
-}
-
-#######################################################
-# Creating the java installer class file dynamically
-#######################################################
-
-sub create_java_installer
-{
- my ( $installdir, $newdir, $languagestringref, $languagesarrayref, $allvariableshashref, $includepatharrayref, $modulesarrayref ) = @_;
-
- installer::logger::include_header_into_logfile("Creating Java installer:");
-
- my $infoline = "";
-
- # collecting all packages or rpms located in the installation directory
- my $listofpackages = get_all_packages_in_installdir($installdir, $newdir);
-
- # creating the directory
- my $javadir = installer::systemactions::create_directories("javainstaller", $languagestringref);
- $javadir =~ s/\/\s*$//;
-# push(@installer::globals::removedirs, $javadir);
-
- # copying the content from directory install_sdk into the java directory
-
- my $projectroot = "";
- if ( $ENV{'PRJ'} ) { $projectroot = $ENV{'PRJ'}; }
- else { installer::exiter::exit_program("ERROR: Environment variable PRJ not set", "create_java_installer"); }
-
- $projectroot =~ s/\/\s*$//;
- my $sourcedir = "$projectroot/inc_global/unix/install_sdk";
- installer::systemactions::copy_complete_directory_without_cvs($sourcedir, $javadir);
-
- # determining the java template file
-
- my $templatefilename = $javadir . $installer::globals::separator . "locale/resources/MyResources_template.java";
-
- # Saving the content of the template file. It is used in the xml files
-
- my $javatemplateorigfile = installer::files::read_file($templatefilename);
-
- # determining the ulf language file
-
- # my $ulffilename = "installsdk.ulf";
- my $ulffilename = "installsdk.jlf";
- $ulffilename = $installer::globals::javalanguagepath . $installer::globals::separator . $ulffilename;
- my $ulffile = installer::files::read_file($ulffilename);
-
- $infoline = "\nReading ulf file: $ulffilename\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- $infoline = "Translating the Java template file\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- for ( my $i = 0; $i <= $#{$languagesarrayref}; $i++ )
- {
- my $onelanguage = ${$languagesarrayref}[$i];
-
- # replacing all strings in the Java file with content of ulf files
-
- my $templatefile = installer::files::read_file($templatefilename);
-
- set_component_name_and_description($templatefile, $modulesarrayref, $onelanguage);
- translate_javafile($templatefile, $ulffile, $onelanguage);
-
- # adding the license file into the Java file
-
- my $licensefilesource = get_licensefilesource($onelanguage, $includepatharrayref);
- my $licensefile = installer::files::read_file($licensefilesource);
- add_license_file_into_javafile($templatefile, $licensefile, $includepatharrayref, $javadir, $onelanguage);
-
- # setting productname and productversion
-
- set_productname_and_productversion($templatefile, $allvariableshashref);
-
- # setting the class name in the java file ( "MyResources_TEMPLATE" -> "MyResources_en" )
-
- # if ( $onelanguage =~ /^\s*(\w+)\-(\w+)\s*$/ ) { $onelanguage = $1; }
- $onelanguage =~ s/en-US/en/; # java file name and class name contain only "_en"
- $onelanguage =~ s/\-/\_/; # "pt-BR" -> "pt_BR"
- my $classfilename = "MyResources_" . $onelanguage;
- set_classfilename($templatefile, $classfilename, "MyResources_TEMPLATE");
-
- # saving the new file
-
- my $newfilename = $templatefilename;
- $newfilename =~ s/_template\.java\s*$/_$onelanguage\.java/;
-
- installer::files::save_file($newfilename, $templatefile);
-
- $infoline = "Saving Java file: $newfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- # renaming one language java file to "MyResources.java"
-
- my $baselanguage = installer::languages::get_default_language($languagesarrayref);
- $baselanguage =~ s/\-/\_/; # "pt-BR" -> "pt_BR"
- $baselanguage =~ s/en_US/en/; # java file name and class name contain only "_en"
- # if ( $baselanguage =~ /^\s*(\w+)\-(\w+)\s*$/ ) { $baselanguage = $1; } # java file name and class name contain only "_en"
- # $baselanguage =~ s/en-US/en/; # java file name and class name contain only "_en"
- my $baselanguagefilename = $javadir . $installer::globals::separator . "locale/resources/MyResources_" . $baselanguage . "\.java";
- my $basedestfilename = $javadir . $installer::globals::separator . "locale/resources/MyResources.java";
- installer::systemactions::copy_one_file($baselanguagefilename, $basedestfilename);
-
- # setting the class file name also for the base class
-
- my $basetemplatefile = installer::files::read_file($basedestfilename);
- my $oldclassfilename = $baselanguagefilename;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$oldclassfilename);
- $oldclassfilename =~ s/\.java//;
- my $newclassfilename = $basedestfilename;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newclassfilename);
- $newclassfilename =~ s/\.java//;
-
- set_classfilename($basetemplatefile, $newclassfilename, $oldclassfilename);
-
- installer::files::save_file($basedestfilename, $basetemplatefile);
-
- $infoline = "Created base Java file: $basedestfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- # deleting the template file
-
- unlink($templatefilename);
-
- $infoline = "Deleted template Java resource file: $templatefilename\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- # changing into Java directory
-
- my $from = cwd();
-
- chdir($javadir);
-
- $infoline = "Changing into directory: $javadir\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- # preparing the xml file
-
- my $xmlfilename = "";
- my $subdir = "";
-
- if ( $installer::globals::issolarispkgbuild )
- {
- $xmlfilename = "pkgUnit.xml";
- }
- elsif ( $installer::globals::islinuxrpmbuild )
- {
- $xmlfilename = "rpmUnit.xml";
- }
- else
- {
- installer::exiter::exit_program("ERROR: No platform for Install SDK", "create_java_installer");
- }
-
- # reading, editing and saving the xmlfile
-
- my $xmlfile = installer::files::read_file($xmlfilename);
- prepare_language_pack_in_xmlfile($xmlfile, $languagesarrayref);
- my $xmlfilename2 = $xmlfilename . ".test2";
- installer::files::save_file($xmlfilename2, $xmlfile);
- remove_empty_packages_in_xmlfile($xmlfile);
- my $xmlfilename3 = $xmlfilename . ".test3";
- installer::files::save_file($xmlfilename3, $xmlfile);
- substitute_variables($xmlfile, $allvariableshashref);
- if (( $installer::globals::islinuxrpmbuild ) && ( $#installer::globals::linkrpms > -1 )) { prepare_linkrpm_in_xmlfile($xmlfile,\@installer::globals::linkrpms); }
- if ( $installer::globals::issolarisx86build || $installer::globals::islinuxbuild ) { remove_w4w_from_xmlfile($xmlfile); }
- remove_module_if_not_defined($xmlfile, $modulesarrayref, "gid_Module_Optional_Onlineupdate");
- replace_component_names($xmlfile, $templatefilename, $modulesarrayref, $javatemplateorigfile, $ulffile);
- my $xmlfilename4 = $xmlfilename . ".test4";
- installer::files::save_file($xmlfilename4, $xmlfile);
- if ( $installer::globals::islinuxrpmbuild ) { put_rpmpath_into_xmlfile($xmlfile, $listofpackages); }
- if ( $installer::globals::islinuxrpmbuild ) { put_filesize_into_xmlfile($xmlfile, $listofpackages); }
- installer::files::save_file($xmlfilename, $xmlfile);
- $infoline = "Saving xml file: $xmlfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- # Setting the classpath and starting compiler
-
- set_classpath_for_install_sdk($javadir);
-
- # creating class files:
- # language class file, dialog class files, installer class file
-
- my $jdkpath = "";
- if ( $ENV{'JDKPATH'} ) { $jdkpath = $ENV{'JDKPATH'}; }
-
- my $javac = "javac";
- if ( $jdkpath ) { $javac = $jdkpath . $installer::globals::separator . $javac; }
-
- my $systemcall = "$javac locale\/resources\/\*\.java 2\>\&1 |";
- make_systemcall($systemcall, 1);
-
- $systemcall = "$javac com\/sun\/staroffice\/install\/\*\.java 2\>\&1 |";
- make_systemcall($systemcall, 1);
-
- # making subdirectory creating empty packages
- create_empty_packages($xmlfile);
-
- # Copy "jresetup" from solver locally to include it into the classfile
- # Copy "jresetup" from solver to installdir
-
- my $setupname = "jresetup";
- my $newname = "setup";
- copy_setup_locally($includepatharrayref, $setupname, $newname);
-
- my $java = "java";
- if ( $jdkpath ) { $java = $jdkpath . $installer::globals::separator . $java; }
-
- $systemcall = "$java com.sun.setup.builder.InstallBuilder $xmlfilename -novalidate 2\>\&1 |";
- make_systemcall($systemcall, 1);
-
- # copying the newly created classfile into the installation set
-
- my $archivefilename = get_archivefilename($xmlfile);
- $archivefilename = $archivefilename . ".class";
-
- if ( ! -f $archivefilename ) { installer::exiter::exit_program("ERROR: Could not find Java class file $archivefilename!", "create_java_installer"); }
-
- installer::systemactions::copy_one_file($archivefilename, $installdir);
-
- # Adding the loader into the installation set. The name of the loader is setup.
- put_loader_into_installset($installdir, $newname);
-
- chdir($from);
-
- $infoline = "Changing into directory: $from\n";
- push( @installer::globals::logfileinfo, $infoline);
-}
-
-1;
diff --git a/solenv/bin/modules/installer/languagepack.pm b/solenv/bin/modules/installer/languagepack.pm
index ded5bc3d2e21..2108c17ae724 100644
--- a/solenv/bin/modules/installer/languagepack.pm
+++ b/solenv/bin/modules/installer/languagepack.pm
@@ -82,33 +82,6 @@ sub select_language_items
if ( $specificlanguage eq $onelanguage )
{
- # $oneitem->{'modules'} = $installer::globals::rootmodulegid; # all files in a language pack are root files
- # Using $installer::globals::languagemodulesbase (?)
-
-# # no more automatic change of module assignments
-# $oneitem->{'modules'} = $installer::globals::rootmodulegid . "_$locallang"; # all files in a language pack are root files
-#
-# if (( $installer::globals::islinuxbuild ) || ( $installer::globals::issolarispkgbuild ))
-# {
-# if ( $oneitem->{'Dir'} )
-# {
-# if ( $oneitem->{'Dir'} eq "gid_Dir_Fonts_Truetype" ) { $oneitem->{'modules'} = "gid_Module_Langpack_Fonts_$locallang"; }
-# if ( $oneitem->{'Dir'} eq "gid_Dir_Resource" ) { $oneitem->{'modules'} = "gid_Module_Langpack_Resource_$locallang"; }
-# if ( $oneitem->{'Dir'} eq "gid_Dir_Help_Isolanguage" ) { $oneitem->{'modules'} = "gid_Module_Langpack_Help_$locallang"; }
-# }
-# }
-
- # preparing different modules for Windows Installer language packs
- # my $underlinelanguage = $specificlanguage;
- # $underlinelanguage =~ s/-/_/;
- # if ( $installer::globals::iswindowsbuild ) { $oneitem->{'modules'} = $installer::globals::languagemodulesbase . $underlinelanguage; }
-
-# # no more collecting of language pack feature
-# if (! installer::existence::exists_in_array($oneitem->{'modules'}, \@installer::globals::languagepackfeature))
-# {
-# push(@installer::globals::languagepackfeature, $oneitem->{'modules'}); # Collecting all language pack feature
-# }
-
push(@itemsarray, $oneitem);
}
}
@@ -195,20 +168,6 @@ sub get_packagename_from_packagelist
{
my ( $alldirs, $allvariables, $languagestringref ) = @_;
- # my $packagename = "";
-
- # for ( my $i = 0; $i <= $#{$alldirs}; $i++ )
- # {
- # if ( ${$alldirs}[$i] =~ /-fonts/ ) { next; }
- # if ( ${$alldirs}[$i] =~ /-help/ ) { next; }
- # if ( ${$alldirs}[$i] =~ /-res/ ) { next; }
- #
- # $packagename = ${$alldirs}[$i];
- # last;
- # }
-
- # if ( $packagename eq "" ) { installer::exiter::exit_program("ERROR: Could not find base package in directory $installdir!", "get_packagename_from_packagelist"); }
-
my $localproductname = $allvariables->{'PRODUCTNAME'};
$localproductname = lc($localproductname);
$localproductname =~ s/ //g;
@@ -232,14 +191,14 @@ sub determine_packagename
my $packagename = "";
my $allnames = "";
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
# determining the rpm file in directory $installdir
my $fileextension = "rpm";
my $rpmfiles = installer::systemactions::find_file_with_file_extension($fileextension, $installdir);
if ( ! ( $#{$rpmfiles} > -1 )) { installer::exiter::exit_program("ERROR: Could not find package in directory $installdir!", "determine_packagename"); }
- my $rpmsav = installer::converter::copy_array_from_references($rpmfiles);
+ my $rpmsav = [@{$rpmfiles}];
for ( my $i = 0; $i <= $#{$rpmfiles}; $i++ ) { installer::pathanalyzer::make_absolute_filename_to_relative_filename(\${$rpmfiles}[$i]); }
$packagename = get_packagename_from_packagelist($rpmfiles, $allvariables, $languagestringref);
@@ -261,7 +220,7 @@ sub determine_packagename
my $alldirs = installer::systemactions::get_all_directories($installdir);
if ( ! ( $#{$alldirs} > -1 )) { installer::exiter::exit_program("ERROR: Could not find package in directory $installdir!", "determine_packagename"); }
- my $alldirssav = installer::converter::copy_array_from_references($alldirs);
+ my $alldirssav = [@{$alldirs}];
for ( my $i = 0; $i <= $#{$alldirs}; $i++ ) { installer::pathanalyzer::make_absolute_filename_to_relative_filename(\${$alldirs}[$i]); }
$packagename = get_packagename_from_packagelist($alldirs, $allvariables, $languagestringref);
@@ -295,13 +254,13 @@ sub put_packagename_into_script
if ( $installer::globals::issolarisbuild ) { $installline = " /usr/sbin/pkgadd -d \$outdir -a \$adminfile"; }
- if ( $installer::globals::islinuxrpmbuild ) { $installline = " rpm --prefix \$PRODUCTINSTALLLOCATION --replacepkgs -i"; }
+ if ( $installer::globals::isrpmbuild ) { $installline = " rpm --prefix \$PRODUCTINSTALLLOCATION --replacepkgs -i"; }
for ( my $i = 0; $i <= $#{$allnames}; $i++ )
{
if ( $installer::globals::issolarisbuild ) { $installline = $installline . " ${$allnames}[$i]"; }
- if ( $installer::globals::islinuxrpmbuild ) { $installline = $installline . " \$outdir/${$allnames}[$i]"; }
+ if ( $installer::globals::isrpmbuild ) { $installline = $installline . " \$outdir/${$allnames}[$i]"; }
}
for ( my $j = 0; $j <= $#{$scriptfile}; $j++ )
@@ -411,9 +370,6 @@ sub determine_scriptfile_name
my $scriptfilename = $packagename;
-# if ( $installer::globals::islinuxrpmbuild ) { $scriptfilename =~ s/\.rpm\s*$/\.sh/; }
-# if ( $installer::globals::issolarisbuild ) { $scriptfilename =~ s/\.tar\.gz\s*$/\.sh/; }
-
$scriptfilename =~ s/\.tar\.gz\s*$/\.sh/;
my $infoline = "Setting language pack script file name to $scriptfilename\n";
@@ -466,8 +422,7 @@ sub include_package_into_script
push( @installer::globals::logfileinfo, $infoline);
}
- my $localcall = "chmod 775 $scriptfilename \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod 0775, $scriptfilename;
}
@@ -519,7 +474,7 @@ sub build_installer_for_languagepack
# find and read english license file
my $licenselanguage = "en-US"; # always english !
- my $licensefilename = "LICENSE_" . $licenselanguage;
+ my $licensefilename = "LICENSE"; # _" . $licenselanguage;
my $licenseincludepatharrayref = installer::worker::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/languages.pm b/solenv/bin/modules/installer/languages.pm
index 7070b09f80b8..8f0b6e929356 100644
--- a/solenv/bin/modules/installer/languages.pm
+++ b/solenv/bin/modules/installer/languages.pm
@@ -331,45 +331,6 @@ sub get_java_language
{
my ( $language ) = @_;
- # my $javalanguage = "";
-
- # if ( $language eq "en-US" ) { $javalanguage = "en_US"; }
- # elsif ( $language eq "ar" ) { $javalanguage = "ar_AR"; }
- # elsif ( $language eq "bg" ) { $javalanguage = "bg_BG"; }
- # elsif ( $language eq "ca" ) { $javalanguage = "ca_CA"; }
- # elsif ( $language eq "cs" ) { $javalanguage = "cs_CS"; }
- # elsif ( $language eq "da" ) { $javalanguage = "da_DA"; }
- # elsif ( $language eq "de" ) { $javalanguage = "de"; }
- # elsif ( $language eq "de" ) { $javalanguage = "de_DE"; }
- # elsif ( $language eq "et" ) { $javalanguage = "et_ET"; }
- # elsif ( $language eq "el" ) { $javalanguage = "el_EL"; }
- # elsif ( $language eq "fi" ) { $javalanguage = "fi_FI"; }
- # elsif ( $language eq "fr" ) { $javalanguage = "fr_FR"; }
- # elsif ( $language eq "hu" ) { $javalanguage = "hu_HU"; }
- # elsif ( $language eq "he" ) { $javalanguage = "he_HE"; }
- # elsif ( $language eq "it" ) { $javalanguage = "it_IT"; }
- # elsif ( $language eq "nl" ) { $javalanguage = "nl_NL"; }
- # elsif ( $language eq "es" ) { $javalanguage = "es_ES"; }
- # elsif ( $language eq "sv" ) { $javalanguage = "sv_SV"; }
- # elsif ( $language eq "sk" ) { $javalanguage = "sk_SK"; }
- # elsif ( $language eq "pl" ) { $javalanguage = "pl_PL"; }
- # elsif ( $language eq "pt-BR" ) { $javalanguage = "pt_BR"; }
- # elsif ( $language eq "ru" ) { $javalanguage = "ru_RU"; }
- # elsif ( $language eq "tr" ) { $javalanguage = "tr_TR"; }
- # elsif ( $language eq "ja" ) { $javalanguage = "ja"; }
- # elsif ( $language eq "ja" ) { $javalanguage = "ja_JP"; }
- # elsif ( $language eq "ko" ) { $javalanguage = "ko_KR"; }
- # elsif ( $language eq "th" ) { $javalanguage = "th_TH"; }
- # elsif ( $language eq "zh-CN" ) { $javalanguage = "zh_CN"; }
- # elsif ( $language eq "zh-TW" ) { $javalanguage = "zh_TW"; }
-
- # languages not defined yet
- # if ( $javalanguage eq "" )
- # {
- # $javalanguage = $language;
- # $javalanguage =~ s/\-/\_/;
- # }
-
$javalanguage = $language;
$javalanguage =~ s/\-/\_/;
diff --git a/solenv/bin/modules/installer/mail.pm b/solenv/bin/modules/installer/mail.pm
deleted file mode 100644
index 3580b3f3b6ab..000000000000
--- a/solenv/bin/modules/installer/mail.pm
+++ /dev/null
@@ -1,136 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-package installer::mail;
-
-use Net::SMTP;
-use installer::converter;
-use installer::exiter;
-use installer::ziplist;
-
-#########################################
-# Sending a mail
-#########################################
-
-sub send_mail
-{
- my ($message, $listenerstring, $mailinfostring, $languagesref, $destdir) = @_;
-
- my $listener = installer::converter::convert_stringlist_into_array($listenerstring, ",");
- my $mailinfo = installer::converter::convert_stringlist_into_array($mailinfostring, ",");
-
- my @listener = ();
-
- for ( my $i = 0; $i <= $#{$listener}; $i++ ) { push(@listener, ${$listener}[$i]); }
- for ( my $i = 0; $i <= $#{$mailinfo}; $i++ ) { ${$mailinfo}[$i] =~ s/\s*$//g; }
-
- my $smtphost = ${$mailinfo}[0];
- my $account = ${$mailinfo}[1];
- my $sender = ${$mailinfo}[2];
-
- if ( ! $smtphost ) { installer::exiter::exit_program("ERROR: Could not read SMTP Host in list file!", "send_mail"); }
- if ( ! $account ) { installer::exiter::exit_program("ERROR: Could not read Account in list file!", "send_mail"); }
- if ( ! $sender ) { installer::exiter::exit_program("ERROR: Could not read Sender in list file!", "send_mail"); }
-
- my $subject = "";
- my $basestring = $installer::globals::product . " " . $installer::globals::compiler . $installer::globals::productextension . " " . $installer::globals::build. " " . $installer::globals::buildid . " " . $$languagesref . "\n";
- if ( $message eq "ERROR" ) { $subject = "ERROR: $basestring" }
- if ( $message eq "SUCCESS" ) { $subject = "SUCCESS: $basestring" }
-
- my @message = ();
-
- my $recipient_string = join ',', @listener;
- push(@message, "Subject: $subject");
- push(@message, "To: $recipient_string");
- push(@message, "\n");
- push(@message, "Located at $destdir");
-
- if ( $message eq "ERROR" )
- {
- for ( my $j = 0; $j <= $#installer::globals::errorlogfileinfo; $j++ )
- {
- my $line = $installer::globals::errorlogfileinfo[$j];
- $line =~ s/\s*$//g;
- push(@message, $line);
- }
- }
-
- for ( my $i = 0; $i <= $#message; $i++ ) { $message[$i] = $message[$i] . "\015\012"; }
-
- my $smtp = Net::SMTP->new( $smtphost, Hello => $account, Debug => 0 );
-
- # set sender
- $smtp->mail($sender);
-
- # listener
- my @good_addresses = ();
- $smtp->recipient( @listener, { SkipBad => 1 } );
-
- # send message
- $smtp->data(\@message);
-
- # quit server
- $smtp->quit();
-}
-
-sub send_fail_mail
-{
- my ($allsettingsarrayref, $languagestringref, $errordir) = @_;
-
- # sending a mail into the error board
- my $listener = "";
- $listener = installer::ziplist::getinfofromziplist($allsettingsarrayref, "fail");
-
- if ( $$listener )
- {
- my $mailinfo = installer::ziplist::getinfofromziplist($allsettingsarrayref, "mailinfo");
-
- if ( $$mailinfo ) { send_mail("ERROR", $listener, $mailinfo, $languagestringref, $errordir); }
- else { installer::exiter::exit_program("ERROR: Could not read mailinfo in list file!", "send_fail_mail"); }
- }
-}
-
-sub send_success_mail
-{
- my ($allsettingsarrayref, $languagestringref, $completeshipinstalldir) = @_;
-
- # sending success mail
- my $listener = "";
- $listener = installer::ziplist::getinfofromziplist($allsettingsarrayref, "success");
-
- if ( $$listener )
- {
- my $mailinfo = installer::ziplist::getinfofromziplist($allsettingsarrayref, "mailinfo");
-
- if ( $$mailinfo ) { send_mail("SUCCESS", $listener, $mailinfo, $languagestringref, $completeshipinstalldir); }
- else { installer::exiter::exit_program("ERROR: Could not read mailinfo in list file!", "send_success_mail"); }
-
- }
-}
-
-
-1;
diff --git a/solenv/bin/modules/installer/packagelist.pm b/solenv/bin/modules/installer/packagelist.pm
index f2becc19a610..1c5d6fa00ba0 100644
--- a/solenv/bin/modules/installer/packagelist.pm
+++ b/solenv/bin/modules/installer/packagelist.pm
@@ -85,7 +85,6 @@ sub analyze_list
push(@allmodules, $onegid);
- # get_children($moduleslist, $onegid, \@allmodules);
get_children_with_hash($moduleshash, $onegid, \@allmodules);
$onepackage->{'allmodules'} = \@allmodules;
@@ -180,8 +179,6 @@ sub remove_multiple_modules_packages
my $onepackage = ${$allpackagemodules}[$i];
my $allmodules = $onepackage->{'allmodules'};
- # print "Modules below $onepackage->{'module'}: $#{$allmodules}\n";
-
# Comparing each package, with all following packages. If a
# gid for the module is part of more than one package, it is
# removed if the number of modules in the package is greater
@@ -240,14 +237,6 @@ sub remove_multiple_modules_packages
$onepackage->{'allmodules'} = \@optimizedpackage;
}
-
- # for ( my $i = 0; $i <= $#{$allpackagemodules}; $i++ )
- # {
- # my $onepackage = ${$allpackagemodules}[$i];
- # my $allmodules = $onepackage->{'allmodules'};
- # print "New: Modules below $onepackage->{'module'}: $#{$allmodules}\n";
- # }
-
}
#####################################################################
@@ -652,11 +641,6 @@ sub collectpackages
{
my $modulegid = $onemodule->{'gid'};
- # Only collecting modules with correct language for language packs
-# if ( $installer::globals::languagepack ) { if ( ! ( $modulegid =~ /_$onelanguage\s*$/ )) { next; } }
- # Resetting language, if this is no language pack
-# if ( ! $installer::globals::languagepack ) { $onelanguage = ""; }
-
my $styles = "";
if ( $onemodule->{'Styles'} ) { $styles = $onemodule->{'Styles'}; }
diff --git a/solenv/bin/modules/installer/packagepool.pm b/solenv/bin/modules/installer/packagepool.pm
index d4032b7db17e..c3f3a91d2bd3 100644
--- a/solenv/bin/modules/installer/packagepool.pm
+++ b/solenv/bin/modules/installer/packagepool.pm
@@ -743,7 +743,7 @@ sub package_is_up_to_date
log_pool_info(0);
# removing new package from installation set
- if ( $newpackagepath ne "" ) { remove_package_from_installset($newpackagepath); } # A file was copied and a problem occured with pooling
+ if ( $newpackagepath ne "" ) { remove_package_from_installset($newpackagepath); } # A file was copied and a problem occurred with pooling
$package_is_up_to_date = 4; # repeat this package
return $package_is_up_to_date;
@@ -756,7 +756,7 @@ sub package_is_up_to_date
log_pool_info(1);
# removing new package from installation set
- if ( $newpackagepath ne "" ) { remove_package_from_installset($newpackagepath); } # A file was copied and a problem occured with pooling
+ if ( $newpackagepath ne "" ) { remove_package_from_installset($newpackagepath); } # A file was copied and a problem occurred with pooling
$package_is_up_to_date = 4; # repeat this package
return $package_is_up_to_date;
@@ -914,7 +914,7 @@ sub put_content_into_pool
}
# Before the new package is renamed in the pool, it has to be checked, if this process still has the lock for this package.
- # Check, if lock file still exists and if this process is the owner. Otherwise a pool error occured.
+ # Check, if lock file still exists and if this process is the owner. Otherwise a pool error occurred.
if ( ! -f $installer::globals::poollockfilename )
{
unlink $uniquedestination; # removing file from pool
@@ -936,7 +936,7 @@ sub put_content_into_pool
push( @installer::globals::logfileinfo, $infoline);
# Before the lock file in the pool can be removed, it has to be checked, if this process is still the owner of this lock file.
- # Check, if lock file still exists and if this process is the owner. Otherwise a pool error occured.
+ # Check, if lock file still exists and if this process is the owner. Otherwise a pool error occurred.
if ( ! -f $installer::globals::poollockfilename )
{
log_pool_info(0);
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm
index 70bc32e36c7c..9c5ec8c24394 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -69,6 +69,7 @@ The following parameter are needed:
-ispatchedepm : Usage of a patched (non-standard) epm (opt., non-Windows only)
-copyproject : is set for projects that are only used for copying (optional)
-languagepack : do create a languagepack, no product pack (optional)
+-helppack : do create a helppack, no product pack (optional)
-patch : do create a patch (optional)
-patchinc: Source for the patch include files (Solaris only)
-dontstrip: No file stripping (Unix only)
@@ -153,13 +154,14 @@ sub getparameter
elsif ($param eq "-buildid") { $installer::globals::buildid = shift(@ARGV); }
elsif ($param eq "-copyproject") { $installer::globals::is_copy_only_project = 1; }
elsif ($param eq "-languagepack") { $installer::globals::languagepack = 1; }
+ elsif ($param eq "-helppack") { $installer::globals::helppack = 1;}
elsif ($param eq "-patch") { $installer::globals::patch = 1; }
elsif ($param eq "-debian") { $installer::globals::debian = 1; }
elsif ($param eq "-dontstrip") { $installer::globals::strip = 0; }
elsif ($param eq "-destdir") # new parameter for simple installer
{
$installer::globals::rootpath ne "" && die "must set destdir before -i or -simple";
- $installer::globals::destdir = shift @ARGV;
+ $installer::globals::destdir = Cwd::realpath( shift @ARGV );
}
elsif ($param eq "-simple") # new parameter for simple installer
{
@@ -299,6 +301,11 @@ sub setglobalvariables
}
}
+ if ( $installer::globals::compiler =~ /unxobsd/ )
+ {
+ $installer::globals::epmoutpath = "openbsd";
+ }
+
if ( $installer::globals::compiler =~ /unxfbsd/ )
{
$installer::globals::isfreebsdbuild = 1;
@@ -314,12 +321,23 @@ sub setglobalvariables
if ( $installer::globals::compiler =~ /unxso[lg]i/ ) { $installer::globals::issolarisx86build = 1; }
+ if ($ENV{OS} eq 'AIX')
+ {
+ if ( $installer::globals::packageformat eq "rpm" )
+ {
+ $installer::globals::isrpmbuild = 1;
+ $installer::globals::isxpdplatform = 1;
+ $installer::globals::epmoutpath = "RPMS";
+ }
+ if ( $installer::globals::rpm eq "" ) { installer::exiter::exit_program("ERROR: Environment variable \"\$RPM\" has to be defined!", "setglobalvariables"); }
+ }
+
if ($ENV{OS} eq 'LINUX')
{
$installer::globals::islinuxbuild = 1;
if ( $installer::globals::packageformat eq "rpm" )
{
- $installer::globals::islinuxrpmbuild = 1;
+ $installer::globals::isrpmbuild = 1;
$installer::globals::isxpdplatform = 1;
$installer::globals::epmoutpath = "RPMS";
if ( $installer::globals::compiler =~ /unxlngi/ )
@@ -346,8 +364,8 @@ sub setglobalvariables
my $message = "Creating Debian packages";
installer::logger::print_message( $message );
push(@installer::globals::globallogfileinfo, $message);
- $installer::globals::islinuxrpmbuild = 0;
- $installer::globals::islinuxdebbuild = 1;
+ $installer::globals::isrpmbuild = 0;
+ $installer::globals::isdebbuild = 1;
$installer::globals::epmoutpath = "DEBS";
if ( $installer::globals::compiler =~ /unxlngi/ )
{
@@ -379,7 +397,6 @@ sub setglobalvariables
if ($installer::globals::unpackpath eq "") # unpackpath not set
{
$installer::globals::unpackpath = cwd();
- if ( $installer::globals::iswin ) { $installer::globals::unpackpath =~ s/\//\\/g; }
}
if ( $installer::globals::localunpackdir ne "" ) { $installer::globals::unpackpath = $installer::globals::localunpackdir; }
@@ -398,7 +415,7 @@ sub setglobalvariables
# setting jds exclude file list
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
$installer::globals::jdsexcludefilename = "jds_excludefiles_linux.txt";
}
@@ -425,8 +442,7 @@ sub setglobalvariables
if ( $installer::globals::compiler =~ /^unxmac/ )
{
- my $localcall = "chmod 777 $installer::globals::temppath \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod 0777, $installer::globals::temppath;
}
$installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . "i";
@@ -532,7 +548,7 @@ sub control_required_parameter
# for Solaris packages and Linux
#######################################
- if (( $installer::globals::patch ) && ( ! $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::islinuxrpmbuild ) && ( ! $installer::globals::islinuxdebbuild ) && ( ! $installer::globals::iswindowsbuild ) && ( ! $installer::globals::ismacdmgbuild ))
+ if (( $installer::globals::patch ) && ( ! $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::isrpmbuild ) && ( ! $installer::globals::isdebbuild ) && ( ! $installer::globals::iswindowsbuild ) && ( ! $installer::globals::ismacdmgbuild ))
{
installer::logger::print_error( "Sorry, Patch flag currently only available for Solaris pkg, Linux RPM and Windows builds!" );
usage();
@@ -636,6 +652,7 @@ sub outputparameter
}
if ( $installer::globals::is_copy_only_project ) { push(@output, "This is a copy only project!\n"); }
if ( $installer::globals::languagepack ) { push(@output, "Creating language pack!\n"); }
+ if ( $installer::globals::helppack ) { push(@output, "Creating help pack!\n"); }
if ( $installer::globals::patch ) { push(@output, "Creating patch!\n"); }
push(@output, "########################################################\n");
diff --git a/solenv/bin/modules/installer/pathanalyzer.pm b/solenv/bin/modules/installer/pathanalyzer.pm
index 1c57a0d76e02..62085dac5e14 100644
--- a/solenv/bin/modules/installer/pathanalyzer.pm
+++ b/solenv/bin/modules/installer/pathanalyzer.pm
@@ -39,7 +39,7 @@ sub get_path_from_fullqualifiedname
if ( $$longfilenameref =~ /\Q$installer::globals::separator\E/ ) # Is there a separator in the path? Otherwise the path is empty.
{
- if ( $$longfilenameref =~ /^\s*(\S.*\S\Q$installer::globals::separator\E)(\S.+\S?)/ )
+ if ( $$longfilenameref =~ /^\s*(.*\Q$installer::globals::separator\E)(.+)/ )
{
$$longfilenameref = $1;
}
diff --git a/solenv/bin/modules/installer/remover.pm b/solenv/bin/modules/installer/remover.pm
index 541a33bce4c1..c23007edd177 100644
--- a/solenv/bin/modules/installer/remover.pm
+++ b/solenv/bin/modules/installer/remover.pm
@@ -37,8 +37,8 @@ sub remove_leading_and_ending_whitespaces
{
my ( $stringref ) = @_;
- $$stringref =~ s/^\s*//;
- $$stringref =~ s/\s*$//;
+ $$stringref =~ s/^\s+//;
+ $$stringref =~ s/\s+$//;
}
sub remove_leading_and_ending_quotationmarks
diff --git a/solenv/bin/modules/installer/scppatchsoname.pm b/solenv/bin/modules/installer/scppatchsoname.pm
index 32a142828981..df7caeb48c81 100644
--- a/solenv/bin/modules/installer/scppatchsoname.pm
+++ b/solenv/bin/modules/installer/scppatchsoname.pm
@@ -175,9 +175,6 @@ sub resolving_patchsoname_flag
my $destinationpath = $replacedir . $onefilename;
my $movepath = $destinationpath . ".orig";
- # if (!(-f $destinationpath)) # do nothing if the file already exists
- # {
-
my $copysuccess = installer::systemactions::copy_one_file($sourcepath, $movepath);
if ( $copysuccess )
@@ -197,8 +194,6 @@ sub resolving_patchsoname_flag
}
}
- # }
-
# Saving the original source, where the file was found
$onefile->{'originalsourcepath'} = $onefile->{'sourcepath'};
diff --git a/solenv/bin/modules/installer/scpzipfiles.pm b/solenv/bin/modules/installer/scpzipfiles.pm
index 52dea6032ee1..cb0e6408e565 100644
--- a/solenv/bin/modules/installer/scpzipfiles.pm
+++ b/solenv/bin/modules/installer/scpzipfiles.pm
@@ -45,7 +45,7 @@ sub replace_all_ziplistvariables_in_file
{
my $line = ${$fileref}[$i];
- if ( $line =~ /^.*\$\{\w+\}.*$/ ) # only occurence of ${abc}
+ if ( $line =~ /^.*\$\{\w+\}.*$/ ) # only occurrence of ${abc}
{
my $key;
@@ -69,13 +69,11 @@ sub replace_all_ziplistvariables_in_rtffile
{
my ( $fileref, $variablesref, $onelanguage, $loggingdir ) = @_;
- # installer::files::save_file($loggingdir . "license_" . $onelanguage . "_before.rtf", $fileref);
-
for ( my $i = 0; $i <= $#{$fileref}; $i++ )
{
my $line = ${$fileref}[$i];
- if ( $line =~ /^.*\$\\\{\w+\\\}.*$/ ) # only occurence of $\{abc\}
+ if ( $line =~ /^.*\$\\\{\w+\\\}.*$/ ) # only occurrence of $\{abc\}
{
for ( my $j = 0; $j <= $#{$variablesref}; $j++ )
{
@@ -96,8 +94,6 @@ sub replace_all_ziplistvariables_in_rtffile
}
}
}
-
- # installer::files::save_file($loggingdir . "license_" . $onelanguage . "_after.rtf", $fileref);
}
#########################################################
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 54d22df1e19e..f6b3909a53a0 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -809,7 +809,6 @@ sub replace_setup_variables
if ( $localminor =~ /^\s*\w(\d+)\w*\s*$/ ) { $localminor = $1; }
- # $updateid
my $updateid = $productname . "_" . $userdirproductversion . "_" . $$languagestringref;
$updateid =~ s/ /_/g;
@@ -830,6 +829,8 @@ sub replace_setup_variables
$value =~ s/\<sourceid\>/$installer::globals::build/;
$value =~ s/\<updateid\>/$updateid/;
$value =~ s/\<pkgformat\>/$installer::globals::packageformat/;
+ $value =~ s/\<vendor\>/$ENV{'OOO_VENDOR'}/;
+ $value =~ s/\<buildversion\>/$ENV{'BUILD_VER_STRING'}/;
$oneitem->{'Value'} = $value;
}
@@ -1226,6 +1227,7 @@ sub get_Source_Directory_For_Files_From_Includepathlist
if ( $styles =~ /\bFILE_CAN_MISS\b/ ) { $file_can_miss = 1; }
if (( $installer::globals::languagepack ) && ( ! $onefile->{'ismultilingual'} ) && ( ! ( $styles =~ /\bFORCELANGUAGEPACK\b/ ))) { $file_can_miss = 1; }
+ if (( $installer::globals::helppack ) && ( ! $onefile->{'ismultilingual'} ) && ( ! ( $styles =~ /\bFORCEHELPPACK\b/ ))) { $file_can_miss = 1; }
my $sourcepathref = "";
@@ -1243,7 +1245,6 @@ sub get_Source_Directory_For_Files_From_Includepathlist
my $oldname = $onefile->{'Name'};
my $oldlanguage = $onefile->{'specificlanguage'};
my $newlanguage = "en-US";
- # $onefile->{'Name'} =~ s/$oldlanguage\./$newlanguage\./; # Example: tplwizfax_it.zip -> tplwizfax_en-US.zip
$onefilename = $onefile->{'Name'};
$onefilename =~ s/$oldlanguage\./$newlanguage\./; # Example: tplwizfax_it.zip -> tplwizfax_en-US.zip
$onefilename =~ s/^\s*\Q$installer::globals::separator\E//; # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
@@ -1255,7 +1256,6 @@ sub get_Source_Directory_For_Files_From_Includepathlist
$infoline = "WARNING: Using $onefilename instead of $oldname\n";
push( @installer::globals::logfileinfo, $infoline);
print " $infoline";
- # if ( $onefile->{'destination'} ) { $onefile->{'destination'} =~ s/\Q$oldname\E/$onefile->{'Name'}/; }
# If the directory, in which the new file is installed, is not language dependent,
# the filename has to be changed to avoid installation conflicts
@@ -1338,7 +1338,7 @@ sub remove_Files_Without_Sourcedirectory
my $infoline;
- my $error_occured = 0;
+ my $error_occurred = 0;
my @missingfiles = ();
push(@missingfiles, "ERROR: The following files could not be found: \n");
@@ -1354,17 +1354,17 @@ sub remove_Files_Without_Sourcedirectory
my $styles = $onefile->{'Styles'};
my $filename = $onefile->{'Name'};
- if ( ! $installer::globals::languagepack )
+ if ( ! $installer::globals::languagepack && !$installer::globals::helppack)
{
$infoline = "ERROR: Removing file $filename from file list.\n";
push( @installer::globals::logfileinfo, $infoline);
push(@missingfiles, "ERROR: File not found: $filename\n");
- $error_occured = 1;
+ $error_occurred = 1;
next; # removing this file from list, if sourcepath is empty
}
- else # special case for language packs
+ elsif ( $installer::globals::languagepack ) # special case for language packs
{
if (( $onefile->{'ismultilingual'} ) || ( $styles =~ /\bFORCELANGUAGEPACK\b/ ))
{
@@ -1372,7 +1372,7 @@ sub remove_Files_Without_Sourcedirectory
push( @installer::globals::logfileinfo, $infoline);
push(@missingfiles, "ERROR: File not found: $filename\n");
- $error_occured = 1;
+ $error_occurred = 1;
next; # removing this file from list, if sourcepath is empty
}
@@ -1386,6 +1386,28 @@ sub remove_Files_Without_Sourcedirectory
next; # removing this file from list, if sourcepath is empty
}
}
+ else # special case for help packs
+ {
+ if (( $onefile->{'ismultilingual'} ) || ( $styles =~ /\bFORCEHELPPACK\b/ ))
+ {
+ $infoline = "ERROR: Removing file $filename from file list.\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ push(@missingfiles, "ERROR: File not found: $filename\n");
+ $error_occured = 1;
+
+ next; # removing this file from list, if sourcepath is empty
+ }
+ else
+ {
+ $infoline = "INFO: Removing file $filename from file list. It is not language dependent.\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ $infoline = "INFO: It is not language dependent and can be ignored in help packs.\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ next; # removing this file from list, if sourcepath is empty
+ }
+ }
}
push(@newfilesarray, $onefile);
@@ -1394,7 +1416,7 @@ sub remove_Files_Without_Sourcedirectory
$infoline = "\n";
push( @installer::globals::logfileinfo, $infoline);
- if ( $error_occured )
+ if ( $error_occurred )
{
for ( my $i = 0; $i <= $#missingfiles; $i++ ) { print "$missingfiles[$i]"; }
installer::exiter::exit_program("ERROR: Missing files", "remove_Files_Without_Sourcedirectory");
@@ -1870,6 +1892,44 @@ sub remove_Languagepacklibraries_from_Installset
}
############################################################################
+# Removing all help pack files from installation set (files with
+# the style HELPPACK), except this is a help pack.
+############################################################################
+
+sub remove_Helppacklibraries_from_Installset
+{
+ my ($itemsarrayref) = @_;
+
+ if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::scriptitems::remove_Helppacklibraries_from_Installset : $#{$itemsarrayref}"); }
+
+ my $infoline;
+
+ my @newitemsarray = ();
+
+ for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
+ {
+ my $oneitem = ${$itemsarrayref}[$i];
+ my $styles = "";
+ if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
+
+ if ( $styles =~ /\bHELPPACK\b/ )
+ {
+ $infoline = "Removing help pack file $oneitem->{'gid'} from the installation set.\n";
+ push( @installer::globals::globallogfileinfo, $infoline);
+
+ next;
+ }
+
+ push(@newitemsarray, $oneitem);
+ }
+
+ $infoline = "\n";
+ push( @installer::globals::globallogfileinfo, $infoline);
+
+ return \@newitemsarray;
+}
+
+############################################################################
# Removing all files with flag PATCH_ONLY from installation set.
# This function is not called during patch creation.
############################################################################
@@ -2009,18 +2069,14 @@ sub quoting_illegal_filenames
# sourcepath and destination have to be quoted for epm list file
- # $filename =~ s/\$/\$\$/g;
$destpath =~ s/\$/\$\$/g;
$sourcepath =~ s/\$/\$\$/g;
- # my $infoline = "ATTENTION: Files: Renaming $onefile->{'Name'} to $filename\n";
- # push( @installer::globals::logfileinfo, $infoline);
my $infoline = "ATTENTION: Files: Quoting sourcepath $onefile->{'sourcepath'} to $sourcepath\n";
push( @installer::globals::logfileinfo, $infoline);
$infoline = "ATTENTION: Files: Quoting destination path $onefile->{'destination'} to $destpath\n";
push( @installer::globals::logfileinfo, $infoline);
- # $onefile->{'Name'} = $filename;
$onefile->{'sourcepath'} = $sourcepath;
$onefile->{'destination'} = $destpath;
}
@@ -2028,19 +2084,20 @@ sub quoting_illegal_filenames
}
############################################################################
-# Removing multiple occurences of same module.
+# Removing multiple occurrences of same module.
############################################################################
sub optimize_list
{
my ( $longlist ) = @_;
+ my %tmpHash;
- my $shortlist = "";
- my $hashref = installer::converter::convert_stringlist_into_hash(\$longlist, ",");
- foreach my $key (sort keys %{$hashref} ) { $shortlist = "$shortlist,$key"; }
- $shortlist =~ s/^\s*\,//;
+ $longlist =~ s/^\s+//;
+ $longlist =~ s/\s+$//;
+ $longlist =~ s/\s*,\s*/,/g;
- return $shortlist;
+ @tmpHash{split /,/, $longlist} = ();
+ return join(",", sort keys %tmpHash);
}
#######################################################################
@@ -2063,7 +2120,6 @@ sub collect_directories_from_filesarray
my %alldirectoryhash = ();
my $predefinedprogdir_added = 0;
- my $alreadyincluded = 0;
# Preparing this already as hash, although the only needed value at the moment is the HostName
# But also adding: "specificlanguage" and "Dir" (for instance gid_Dir_Program)
@@ -2075,64 +2131,26 @@ sub collect_directories_from_filesarray
installer::pathanalyzer::get_path_from_fullqualifiedname(\$destinationpath);
$destinationpath =~ s/\Q$installer::globals::separator\E\s*$//; # removing ending slashes or backslashes
- $alreadyincluded = 0;
- if ( exists($alldirectoryhash{$destinationpath}) ) { $alreadyincluded = 1; }
-
- if (!($alreadyincluded))
+ do
{
- my %directoryhash = ();
- $directoryhash{'HostName'} = $destinationpath;
- $directoryhash{'specificlanguage'} = $onefile->{'specificlanguage'};
- $directoryhash{'Dir'} = $onefile->{'Dir'};
- $directoryhash{'modules'} = $onefile->{'modules'}; # NEW, saving modules
- # NEVER!!! if ( ! $installer::globals::iswindowsbuild ) { $directoryhash{'Styles'} = "(CREATE)"; } # this directories must be created
-
- if ( $onefile->{'Dir'} eq "PREDEFINED_PROGDIR" ) { $predefinedprogdir_added = 1; }
-
- $alldirectoryhash{$destinationpath} = \%directoryhash;
-
- # Problem: The $destinationpath can be share/registry/schema/org/openoffice
- # but not all directories contain files and will be added to this list.
- # Therefore the path has to be analyzed.
-
- while ( $destinationpath =~ /(^.*\S)\Q$installer::globals::separator\E(\S.*?)\s*$/ ) # as long as the path contains slashes
+ if (!exists($alldirectoryhash{$destinationpath}))
{
- $destinationpath = $1;
-
- $alreadyincluded = 0;
- if ( exists($alldirectoryhash{$destinationpath}) ) { $alreadyincluded = 1; }
-
- if (!($alreadyincluded))
- {
- my %directoryhash = ();
+ my %directoryhash = ();
+ $directoryhash{'HostName'} = $destinationpath;
+ $directoryhash{'specificlanguage'} = $onefile->{'specificlanguage'};
+ $directoryhash{'Dir'} = $onefile->{'Dir'};
+ $directoryhash{'modules'} = $onefile->{'modules'}; # NEW, saving modules
- $directoryhash{'HostName'} = $destinationpath;
- $directoryhash{'specificlanguage'} = $onefile->{'specificlanguage'};
- $directoryhash{'Dir'} = $onefile->{'Dir'};
- $directoryhash{'modules'} = $onefile->{'modules'}; # NEW, saving modules
- # NEVER!!! if ( ! $installer::globals::iswindowsbuild ) { $directoryhash{'Styles'} = "(CREATE)"; } # this directories must be created
+ $predefinedprogdir_added ||= $onefile->{'Dir'} eq "PREDEFINED_PROGDIR";
- $alldirectoryhash{$destinationpath} = \%directoryhash;
- }
- else
- {
- # Adding the modules to the module list!
- $alldirectoryhash{$destinationpath}->{'modules'} = $alldirectoryhash{$destinationpath}->{'modules'} . "," . $onefile->{'modules'};
- }
+ $alldirectoryhash{$destinationpath} = \%directoryhash;
}
- }
- else
- {
- # Adding the modules to the module list!
- $alldirectoryhash{$destinationpath}->{'modules'} = $alldirectoryhash{$destinationpath}->{'modules'} . "," . $onefile->{'modules'};
-
- # Also adding the module to all parents
- while ( $destinationpath =~ /(^.*\S)\Q$installer::globals::separator\E(\S.*?)\s*$/ ) # as long as the path contains slashes
+ else
{
- $destinationpath = $1;
- $alldirectoryhash{$destinationpath}->{'modules'} = $alldirectoryhash{$destinationpath}->{'modules'} . "," . $onefile->{'modules'};
+ # Adding the modules to the module list!
+ $alldirectoryhash{$destinationpath}->{'modules'} .= "," . $onefile->{'modules'};
}
- }
+ } while ($destinationpath =~ s/(^.*\S)\Q$installer::globals::separator\E(\S.*?)\s*$/$1/); # as long as the path contains slashes
}
# if there is no file in the root directory PREDEFINED_PROGDIR, it has to be included into the directory array now
@@ -2195,7 +2213,6 @@ sub collect_directories_with_create_flag_from_directoryarray
my %directoryhash = ();
$directoryhash{'HostName'} = $directoryname;
$directoryhash{'specificlanguage'} = $onedir->{'specificlanguage'};
- # $directoryhash{'gid'} = $onedir->{'gid'};
$directoryhash{'Dir'} = $onedir->{'gid'};
$directoryhash{'Styles'} = $onedir->{'Styles'};
@@ -2468,7 +2485,6 @@ sub insert_for_item ($$$)
{
my ($hash, $item, $id) = @_;
- # print STDERR "insert '$id' for '$item'\n";
if (!defined $hash->{$item})
{
my @gids = ();
@@ -2522,7 +2538,6 @@ sub get_string_of_modulegids_for_itemgid
my $haslanguagemodule = 0;
my %foundmodules = ();
- # print STDERR "lookup '" . lc($itemgid) . "'\n";
my $gid_list = $module_lookup_table->{lc($itemgid)};
for my $gid (@{$gid_list})
@@ -2542,8 +2557,6 @@ sub get_string_of_modulegids_for_itemgid
if ( ! $isreallylanguagemodule ) { installer::exiter::exit_program("ERROR: \"$itemgid\" is assigned to modules with flag \"LANGUAGEMODULE\" and also to modules without this flag! Modules: $allmodules", "get_string_of_modulegids_for_itemgid"); }
}
- # print STDERR "get_string_for_itemgid ($itemgid, $itemname) => $allmodules, $haslanguagemodule\n";
-
return ($allmodules, $haslanguagemodule);
}
@@ -2923,7 +2936,7 @@ sub filter_layerlinks_from_unixlinks
if ( $styles =~ /\bLAYERLINK\b/ )
{
# Platforms, that do not need the layer links
- if (( $installer::globals::islinuxrpmbuild ) || ( $installer::globals::issolarispkgbuild ))
+ if (( $installer::globals::isrpmbuild ) || ( $installer::globals::issolarispkgbuild ))
{
$isrequired = 0;
}
diff --git a/solenv/bin/modules/installer/setupscript.pm b/solenv/bin/modules/installer/setupscript.pm
index a3bf5abf50a9..c463eb23bd45 100644
--- a/solenv/bin/modules/installer/setupscript.pm
+++ b/solenv/bin/modules/installer/setupscript.pm
@@ -162,23 +162,17 @@ sub add_lowercase_productname_setupscriptvariable
push(@{$variablesref} ,$newline);
$value = $original;
$value =~ s/\s/\_/g;
- # if ( $value =~ /^\s*(.*?)\_(\w)(.*?)\_(\w)(.*)\s*$/ ) { $value = $1 . $2 . $4; }
$newline = "\%UNIXPRODUCTNAME " . lc($value) . "\n";
push(@{$variablesref} ,$newline);
$newline = "\%SYSTEMINTUNIXPACKAGENAME " . lc($value) . "\n";
push(@{$variablesref} ,$newline);
- # if ( $value =~ /^\s*(.*?)\_(\w)(.*?)\_(\w)(.*)\s*$/ ) { $value = $1 . $2 . $4; }
- # if ( $value =~ /^\s*(.*?)\_(\w)(.*?)\_(\w)(.*)\s*$/ ) { $value = $2 . $4; }
$newline = "\%UNIXPACKAGENAME " . lc($value) . "\n";
push(@{$variablesref} ,$newline);
$value = $original;
$value =~ s/\s/\_/g;
$value =~ s/\.//g;
- # if ( $value =~ /^\s*(.*?)\_(\w)(.*?)\_(\w)(.*)\s*$/ ) { $value = $1 . $2 . $4; }
$newline = "\%WITHOUTDOTUNIXPRODUCTNAME " . lc($value) . "\n";
push(@{$variablesref} ,$newline);
- # if ( $value =~ /^\s*(.*?)\_(\w)(.*?)\_(\w)(.*)\s*$/ ) { $value = $1 . $2 . $4; }
- # if ( $value =~ /^\s*(.*?)\_(\w)(.*?)\_(\w)(.*)\s*$/ ) { $value = $2 . $4; }
$newline = "\%WITHOUTDOTUNIXPACKAGENAME " . lc($value) . "\n";
push(@{$variablesref} ,$newline);
$newline = "\%SOLARISBRANDPACKAGENAME " . lc($value) . "\n";
@@ -272,7 +266,7 @@ sub replace_all_setupscriptvariables_in_script
my $bigstring = '';
for my $line (@{$scriptref}) { $bigstring = $bigstring . $line; }
- foreach my $key ( keys %subs )
+ foreach my $key (sort { length ($b) <=> length ($a) } keys %subs)
{
# Attention: It must be possible to substitute "%PRODUCTNAMEn", "%PRODUCTNAME%PRODUCTVERSIONabc"
my $value = $subs{$key};
@@ -292,7 +286,6 @@ sub replace_all_setupscriptvariables_in_script
if (( $check =~ /%1/ ) || ( $check =~ /%2/ ) || ( $check =~ /%verify/ )) { next; }
my $infoline = "WARNING: mis-named or un-known '%' variable in setup script at line $num:\n$check\n";
push( @installer::globals::globallogfileinfo, $infoline);
- # print STDERR "Warning: mis-named or un-known '%' variable at line $num:\n$check\n";
}
}
@@ -311,91 +304,72 @@ sub get_all_items_from_script
my @allitemarray = ();
- my ($itemkey, $itemvalue, $valuecounter);
+ my ($itemkey, $itemvalue);
for ( my $i = 0; $i <= $#{$scriptref}; $i++ )
{
my $line = ${$scriptref}[$i];
- if ( $line =~ /^\s*\Q$searchitem\E\s+(\S+)\s*$/ )
- {
- my $gid = $1;
- my $counter = $i + 1;
+ next unless ($line =~ /^\s*\Q$searchitem\E\s+(\S+)\s*$/);
+ my $gid = $1;
- my %oneitemhash = ();
- my $ismultilang = 0;
+ my %oneitemhash = ();
+ my $ismultilang = 0;
- $oneitemhash{'gid'} = $gid;
+ $oneitemhash{'gid'} = $gid;
- while (!( $line =~ /^\s*End\s*$/ ))
+ while (!( $line =~ /^\s*End\s*$/ ))
+ {
+ if ( $i >= $#{$scriptref} ) {
+ installer::exiter::exit_program("Invalid setup script file. End of file reached before 'End' line of '$searchitem' section.", "get_all_items_from_script");
+ }
+ $line = ${$scriptref}[++$i];
+
+ if ( $line =~ /^\s*(.+?)\=\s*(.+?)\;\s*$/ ) # only oneliner!
{
- if ( $counter > $#{$scriptref} ) {
- installer::exiter::exit_program("Invalid setup script file. End of file reached before 'End' line of '$searchitem' section.", "get_all_items_from_script");
- }
- $line = ${$scriptref}[$counter];
- $counter++;
+ $itemkey = $1;
+ $itemvalue = $2;
- if ( $line =~ /^\s*(.+?)\s*\=\s*(.+?)\s*\;\s*$/ ) # only oneliner!
- {
- $itemkey = $1;
- $itemvalue = $2;
+ $itemkey =~ s/\s+$//;
+ $itemvalue =~ s/\s+$//;
- installer::remover::remove_leading_and_ending_quotationmarks(\$itemvalue);
- $itemvalue =~ s/\s*$//; # removing ending whitespaces. Could be introduced by empty variables.
+ installer::remover::remove_leading_and_ending_quotationmarks(\$itemvalue);
- $oneitemhash{$itemkey} = $itemvalue;
+ $oneitemhash{$itemkey} = $itemvalue;
- if ( $itemkey =~ /^\s*\S+\s+\(\S+\)\s*$/ )
- {
- $ismultilang = 1;
- }
- }
- else
+ $ismultilang ||= $itemkey =~ /^\S+\s+\(\S+\)$/;
+ }
+ elsif (($searchitem eq "Module") &&
+ ($line =~ /^\s*.+?\s*\=\s*\(/) &&
+ (!($line =~ /\)\;\s*$/))) # more than one line, for instance files at modules!
+ {
+ $line =~ /^\s*(.+?)\s*\=\s*(.+?)\s*$/; # the first line
+ $itemkey = $1;
+ $itemvalue = $2;
+
+ # collecting the complete itemvalue
+ do
{
- if ( $searchitem eq "Module" ) # more than one line, for instance files at modules!
- {
- if (( $line =~ /^\s*(.+?)\s*\=\s*\(/ ) && (!($line =~ /\)\;\s*$ / )))
- {
- if ( $line =~ /^\s*(.+?)\s*\=\s*(.+)/ ) # the first line
- {
- $itemkey = $1;
- $itemvalue = $2;
- $itemvalue =~ s/\s*$//;
- }
-
- # collecting the complete itemvalue
-
- $valuecounter = $counter;
- $line = ${$scriptref}[$valuecounter];
- installer::remover::remove_leading_and_ending_whitespaces(\$line);
- $itemvalue = $itemvalue . $line;
-
- while (!( $line =~ /\)\;\s*$/ ))
- {
- $valuecounter++;
- $line = ${$scriptref}[$valuecounter];
- installer::remover::remove_leading_and_ending_whitespaces(\$line);
- $itemvalue = $itemvalue . $line;
- }
-
- # removing ending ";"
- $itemvalue =~ s/\;\s*$//;
-
- $oneitemhash{$itemkey} = $itemvalue;
-
- if ( $itemkey =~ /^\s*\S+\s+\(\S+\)\s*$/ )
- {
- $ismultilang = 1;
- }
- }
+ if ( $i >= $#{$scriptref} ) {
+ installer::exiter::exit_program("Invalid setup script file. Premature end of file.", "get_all_items_from_script");
}
- }
- }
+ $line = ${$scriptref}[++$i];
+ installer::remover::remove_leading_and_ending_whitespaces(\$line);
+ $itemvalue .= $line;
+ } while (!($line =~ /\)\;\s*$/));
+
+ # removing ending ";"
+ $itemvalue =~ s/\;\s*$//;
- $oneitemhash{'ismultilingual'} = $ismultilang;
+ $oneitemhash{$itemkey} = $itemvalue;
- push(@allitemarray, \%oneitemhash);
+ $ismultilang ||= $itemkey =~ /^\S+\s+\(\S+\)$/;
+ }
}
+
+ $oneitemhash{'ismultilingual'} = $ismultilang+0;
+
+ push(@allitemarray, \%oneitemhash);
}
return \@allitemarray;
@@ -521,10 +495,6 @@ sub replace_preset_properties
my @presetproperties = ();
push(@presetproperties, "SOLARISBRANDPACKAGENAME");
push(@presetproperties, "SYSTEMINTUNIXPACKAGENAME");
- # push(@presetproperties, "UNIXPACKAGENAME");
- # push(@presetproperties, "WITHOUTDOTUNIXPACKAGENAME");
- # push(@presetproperties, "UNIXPRODUCTNAME");
- # push(@presetproperties, "WITHOUTDOTUNIXPRODUCTNAME");
foreach $property ( @presetproperties )
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index 1f392f4f6c86..8c0e9ee0be79 100755
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -27,7 +27,6 @@
package installer::simplepackage;
-# use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
use Cwd;
use File::Copy;
use installer::download;
@@ -111,6 +110,13 @@ sub register_extensions
push( @installer::globals::logfileinfo, $infoline);
}
+ if (( $installer::globals::helppack ) && ( ! -f $unopkgfile ))
+ {
+ $unopkgexists = 0;
+ $infoline = "Help packs do not contain unopkg!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+
if ( ! -f $unopkgfile )
{
$unopkgexists = 0;
@@ -127,7 +133,7 @@ sub register_extensions
if ( ! -f $unopkgfile ) { installer::exiter::exit_program("ERROR: $unopkgfile not found!", "register_extensions"); }
- my $systemcall = $unopkgfile . " sync --verbose" . " -env:UNO_JAVA_JFW_ENV_JREHOME=true 2\>\&1 |";
+ my $systemcall = "JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 " . $unopkgfile . " sync --verbose" . " -env:UNO_JAVA_JFW_ENV_JREHOME=true 2\>\&1 |";
print "... $systemcall ...\n";
@@ -174,9 +180,6 @@ sub register_extensions
sub get_mac_translation_file
{
my $translationfilename = $installer::globals::maclangpackfilename;
- # my $translationfilename = $installer::globals::idtlanguagepath . $installer::globals::separator . $installer::globals::maclangpackfilename;
- # if ( $installer::globals::unicodensis ) { $translationfilename = $translationfilename . ".uulf"; }
- # else { $translationfilename = $translationfilename . ".mlf"; }
if ( ! -f $translationfilename ) { installer::exiter::exit_program("ERROR: Could not find language file $translationfilename!", "get_mac_translation_file"); }
my $translationfile = installer::files::read_file($translationfilename);
@@ -288,8 +291,6 @@ sub localize_scriptfile
{
my ($scriptfile, $translationfile, $languagestringref) = @_;
- # my $translationfile = get_mac_translation_file();
-
my $onelanguage = $$languagestringref;
if ( $onelanguage =~ /^\s*(.*?)_/ ) { $onelanguage = $1; }
@@ -337,7 +338,7 @@ sub replace_variables_in_scriptfile
replace_one_variable_in_shellscript($scriptfile, $allvariables->{'PRODUCTVERSION'}, "PRODUCTVERSION" );
my $scriptname = lc($allvariables->{'PRODUCTNAME'}) . "\.script";
- if ( $allvariables->{'PRODUCTNAME'} eq "OpenOffice.org" ) { $scriptname = "org.openoffice.script"; }
+ if ( $allvariables->{'PRODUCTNAME'} eq "LibreOffice" ) { $scriptname = "org.libreoffice.script"; }
replace_one_variable_in_shellscript($scriptfile, $scriptname, "SEARCHSCRIPTNAME" );
}
@@ -414,9 +415,10 @@ sub create_package
my $localtempdir = $tempdir;
- if (( $installer::globals::languagepack ) || ( $installer::globals::patch ))
+ if (( $installer::globals::languagepack ) || ( $installer::globals::helppack ) || ( $installer::globals::patch ))
{
$localtempdir = "$tempdir/$packagename";
+ if ( $installer::globals::helppack ) { $volume_name = "$volume_name Help Pack"; }
if ( $installer::globals::languagepack )
{
$volume_name = "$volume_name Language Pack";
@@ -473,6 +475,7 @@ sub create_package
my $scriptrealfilename = "osx_install.applescript";
my $scriptfilename = "";
if ( $installer::globals::languagepack ) { $scriptfilename = "osx_install_languagepack.applescript"; }
+ if ( $installer::globals::helppack ) { $scriptfilename = "osx_install_helppack.applescript"; }
if ( $installer::globals::patch ) { $scriptfilename = "osx_install_patch.applescript"; }
my $scripthelpersolverfilename = "mac_install.script";
# my $scripthelperrealfilename = $volume_name;
@@ -503,10 +506,8 @@ sub create_package
replace_variables_in_scriptfile($scriptfilecontent, $volume_name_classic, $volume_name_classic_app, $allvariables);
installer::files::save_file($scriptfilename, $scriptfilecontent);
- $systemcall = "chmod 775 " . "\"" . $scriptfilename . "\"";
- system($systemcall);
- $systemcall = "chmod 775 " . "\"" . $scripthelperrealfilename . "\"";
- system($systemcall);
+ chmod 0775, $scriptfilename;
+ chmod 0775, $scripthelperrealfilename;
# Copy also Info.plist and icon file
# Finding both files in solver
@@ -620,6 +621,7 @@ sub create_simple_package
{
$downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "downloadname");
if ( $installer::globals::languagepack ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "langpackdownloadname"); }
+ if ( $installer::globals::helppack ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "helppackdownloadname"); }
if ( $installer::globals::patch ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "patchdownloadname"); }
$packagename = installer::download::resolve_variables_in_downloadname($allvariables, $$downloadname, \$locallanguage);
}
@@ -709,7 +711,7 @@ sub create_simple_package
}
else
{
- $infoline = "ERROR: Could not copy $source to $destination\n";
+ $infoline = "ERROR: Could not copy $source to $destination $!\n";
$returnvalue = 0;
}
@@ -722,13 +724,9 @@ sub create_simple_package
if ( ! $installer::globals::iswindowsbuild )
{
# see issue 102274
- my $unixrights = "";
if ( $onefile->{'UnixRights'} )
{
- $unixrights = $onefile->{'UnixRights'};
-
- my $localcall = "$installer::globals::wrapcmd chmod $unixrights \'$destination\' \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod oct($onefile->{'UnixRights'}), $destination;
}
}
}
diff --git a/solenv/bin/modules/installer/substfilenamefiles.pm b/solenv/bin/modules/installer/substfilenamefiles.pm
index fd9557ff81c0..98906913c159 100644
--- a/solenv/bin/modules/installer/substfilenamefiles.pm
+++ b/solenv/bin/modules/installer/substfilenamefiles.pm
@@ -79,7 +79,6 @@ sub resolving_subst_filename_flag
my $sourcepath = $onefile->{'sourcepath'};
- # if ( $onefilename =~ /^\s*\Q$installer::globals::separator\E/ ) # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
if ( $onefilename =~ /\Q$installer::globals::separator\E/ ) # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
{
$onefilename =~ s/^\s*\Q$installer::globals::separator\E//;
diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm
index 07cd838cf4fa..09b4cb1882a3 100644
--- a/solenv/bin/modules/installer/systemactions.pm
+++ b/solenv/bin/modules/installer/systemactions.pm
@@ -43,108 +43,7 @@ sub create_directory
{
my ($directory) = @_;
- my $returnvalue = 1;
- my $infoline = "";
-
- if (!(-d $directory))
- {
- $returnvalue = mkdir($directory, 0775);
-
- if ($returnvalue)
- {
- $infoline = "\nCreated directory: $directory\n";
- push(@installer::globals::logfileinfo, $infoline);
-
- my $localcall = "chmod 0775 $directory \>\/dev\/null 2\>\&1";
- system($localcall);
-
- # chmod 0775 is not sufficient on mac to remove sticky tag
- $localcall = "chmod a-s $directory \>\/dev\/null 2\>\&1";
- system($localcall);
- }
- else
- {
- # New solution in parallel packing: It is possible, that the directory now exists, although it
- # was not created in this process. There is only an important error, if the directory does not
- # exist now.
-
- $infoline = "\nDid not succeed in creating directory: \"$directory\". Further attempts will follow.\n";
- push(@installer::globals::logfileinfo, $infoline);
-
- if (!(-d $directory))
- {
- # Problem with parallel packaging? -> Try a little harder, before exiting.
- # Did someone else remove the parent directory in the meantime?
- my $parentdir = $directory;
- installer::pathanalyzer::get_path_from_fullqualifiedname(\$parentdir);
- if (!(-d $parentdir))
- {
- $returnvalue = mkdir($parentdir, 0775);
-
- if ($returnvalue)
- {
- $infoline = "\nAttention: Successfully created parent directory (should already be created before): $parentdir\n";
- push(@installer::globals::logfileinfo, $infoline);
-
- my $localcall = "chmod 775 $parentdir \>\/dev\/null 2\>\&1";
- system($localcall);
- }
- else
- {
- $infoline = "\Error: \"$directory\" could not be created. Even the parent directory \"$parentdir\" does not exist and could not be created.\n";
- push(@installer::globals::logfileinfo, $infoline);
- if ( -d $parentdir )
- {
- $infoline = "\nAttention: Finally the parent directory \"$parentdir\" exists, but I could not create it.\n";
- push(@installer::globals::logfileinfo, $infoline);
- }
- else
- {
- # Now it is time to exit, even the parent could not be created.
- installer::exiter::exit_program("ERROR: Could not create parent directory \"$parentdir\"", "create_directory");
- }
- }
- }
-
- # At this point we have to assume, that the parent directory exist.
- # Trying once more to create the desired directory
-
- $returnvalue = mkdir($directory, 0775);
-
- if ($returnvalue)
- {
- $infoline = "\nAttention: Created directory \"$directory\" in the second try.\n";
- push(@installer::globals::logfileinfo, $infoline);
-
- my $localcall = "chmod 775 $directory \>\/dev\/null 2\>\&1";
- system($localcall);
- }
- else
- {
- if ( -d $directory )
- {
- $infoline = "\nAttention: Finally the directory \"$directory\" exists, but I could not create it.\n";
- push(@installer::globals::logfileinfo, $infoline);
- }
- else
- {
- # It is time to exit, even the second try failed.
- installer::exiter::exit_program("ERROR: Failed to create the directory: $directory", "create_directory");
- }
- }
- }
- else
- {
- $infoline = "\nAnother process created this directory in exactly this moment :-) : $directory\n";
- push(@installer::globals::logfileinfo, $infoline);
- }
- }
- }
- else
- {
- $infoline = "\nAlready existing directory, did not create: $directory\n";
- push(@installer::globals::logfileinfo, $infoline);
- }
+ create_directory_with_privileges( $directory, "755" );
}
######################################################
@@ -157,10 +56,10 @@ sub create_directory_with_privileges
my $returnvalue = 1;
my $infoline = "";
+ my $localprivileges = oct("0".$privileges); # changes "777" to 0777
if (!(-d $directory))
{
- my $localprivileges = oct("0".$privileges); # changes "777" to 0777
$returnvalue = mkdir($directory, $localprivileges);
if ($returnvalue)
@@ -168,8 +67,7 @@ sub create_directory_with_privileges
$infoline = "\nCreated directory: $directory\n";
push(@installer::globals::logfileinfo, $infoline);
- my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod $localprivileges, $directory;
}
else
{
@@ -195,8 +93,7 @@ sub create_directory_with_privileges
$infoline = "\nAttention: Successfully created parent directory (should already be created before): $parentdir\n";
push(@installer::globals::logfileinfo, $infoline);
- my $localcall = "chmod $privileges $parentdir \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod $localprivileges, $parentdir;
}
else
{
@@ -225,8 +122,7 @@ sub create_directory_with_privileges
$infoline = "\nAttention: Created directory \"$directory\" in the second try.\n";
push(@installer::globals::logfileinfo, $infoline);
- my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod $localprivileges, $directory;
}
else
{
@@ -254,8 +150,7 @@ sub create_directory_with_privileges
$infoline = "\nAlready existing directory, did not create: $directory\n";
push(@installer::globals::logfileinfo, $infoline);
- my $localcall = "chmod $privileges $directory \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod $localprivileges, $directory;
}
}
@@ -374,6 +269,7 @@ sub create_directories
}
if ( $installer::globals::languagepack ) { $path = $path . $localproductname . "_languagepack" . $installer::globals::separator; }
+ elsif ( $installer::globals::helppack ) { $path = $path . $localproductname . "_helppack" . $installer::globals::separator; }
elsif ( $installer::globals::patch ) { $path = $path . $localproductname . "_patch" . $installer::globals::separator; }
else { $path = $path . $localproductname . $installer::globals::separator; }
@@ -395,21 +291,30 @@ sub create_directories
if ( $$languagesref ) { $locallanguagesref = $$languagesref; }
- if (!($locallanguagesref eq "" )) # this will be a path like "01_49", for Profiles and ConfigurationFiles, idt-Files
+ if ($newdirectory eq "install" && $installer::globals::ooodownloadfilename ne "" )
{
- my $languagestring = $$languagesref;
-
- if (length($languagestring) > $installer::globals::max_lang_length )
+ # put packages into versioned path; needed only on linux (fdo#30837)
+ $path = $path . "$installer::globals::ooodownloadfilename" . $installer::globals::separator;
+ create_directory($path);
+ }
+ else
+ {
+ if ($locallanguagesref ne "") # this will be a path like "01_49", for Profiles and ConfigurationFiles, idt-Files
{
- my $number_of_languages = get_number_of_langs($languagestring);
- chomp(my $shorter = `echo $languagestring | md5sum | sed -e "s/ .*//g"`);
- # $languagestring = $shorter;
- my $id = substr($shorter, 0, 8); # taking only the first 8 digits
- $languagestring = "lang_" . $number_of_languages . "_id_" . $id;
- }
- $path = $path . $languagestring . $installer::globals::separator;
- create_directory($path);
+ my $languagestring = $$languagesref;
+
+ if (length($languagestring) > $installer::globals::max_lang_length )
+ {
+ my $number_of_languages = get_number_of_langs($languagestring);
+ chomp(my $shorter = `echo $languagestring | md5sum | sed -e "s/ .*//g"`);
+ my $id = substr($shorter, 0, 8); # taking only the first 8 digits
+ $languagestring = "lang_" . $number_of_languages . "_id_" . $id;
+ }
+
+ $path = $path . $languagestring . $installer::globals::separator;
+ create_directory($path);
+ }
}
}
@@ -439,7 +344,7 @@ sub copy_one_file
}
else
{
- $infoline = "ERROR: Could not copy $source to $dest\n";
+ $infoline = "ERROR: Could not copy $source to $dest $!\n";
$returnvalue = 0;
}
@@ -1194,9 +1099,7 @@ sub rename_directory
}
else
{
- installer::exiter::exit_program("ERROR: Could not move directory from $olddir to $newdir", "rename_directory");
- # $infoline = "\nATTENTION: Could not move directory from $olddir to $newdir, \"rename_directory\"\n";
- # push(@installer::globals::logfileinfo, $infoline);
+ installer::exiter::exit_program("ERROR: Could not move directory from $olddir to $newdir $!", "rename_directory");
}
return $newdir;
@@ -1433,12 +1336,7 @@ sub try_to_create_directory
$infoline = "\nCreated directory: $directory\n";
push(@installer::globals::logfileinfo, $infoline);
- my $localcall = "chmod 0775 $directory \>\/dev\/null 2\>\&1";
- system($localcall);
-
- # chmod 0775 is not sufficient on mac to remove sticky tag
- $localcall = "chmod a-s $directory \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod 0775, $directory;
}
else
{
diff --git a/solenv/bin/modules/installer/windows/admin.pm b/solenv/bin/modules/installer/windows/admin.pm
index 47a71b059b2a..6c79aaedea3c 100644
--- a/solenv/bin/modules/installer/windows/admin.pm
+++ b/solenv/bin/modules/installer/windows/admin.pm
@@ -54,13 +54,6 @@ sub unpack_cabinet_file
# But this wrong expand.exe is typically in the PATH before this expand.exe, to unpack
# cabinet files.
-# if ( $^O =~ /cygwin/i )
-# {
-# $expandfile = $ENV{'SYSTEMROOT'} . "/system32/expand.exe"; # Has to be located in the systemdirectory
-# $expandfile =~ s/\\/\//;
-# if ( ! -f $expandfile ) { exit_program("ERROR: Did not find file $expandfile in the Windows system folder!"); }
-# }
-
if ( $^O =~ /cygwin/i )
{
$expandfile = qx(cygpath -u "$ENV{WINDIR}"/System32/expand.exe);
@@ -70,7 +63,6 @@ sub unpack_cabinet_file
my $expandlogfile = $unpackdir . $installer::globals::separator . "expand.log";
# exclude cabinet file
- # my $systemcall = $cabarc . " -o X " . $mergemodulehash->{'cabinetfile'};
my $systemcall = "";
if ( $^O =~ /cygwin/i ) {
@@ -326,7 +318,6 @@ sub analyze_registry_file
my $component = $6;
my %helphash = ();
- # $helphash{'Registry'} = $registry;
$helphash{'Root'} = $root;
$helphash{'Key'} = $key;
$helphash{'Name'} = $name;
@@ -489,13 +480,7 @@ sub copy_files_into_directory_structure
}
if ( $destfile =~ /unopkg\.exe\s*$/ ) { $unopkgfile = $destfile; }
-
- # installer::systemactions::copy_one_file($sourcefile, $destfile);
}
- # else # allowing missing sequence numbers ?
- # {
- # installer::exiter::exit_program("ERROR: No file assigned to sequence $i", "copy_files_into_directory_structure");
- # }
}
return $unopkgfile;
@@ -805,8 +790,6 @@ sub remove_empty_dirs_in_folder
# try to remove empty directory
my $returnvalue = rmdir $dir;
-
- # if ( $returnvalue ) { print "Successfully removed empty dir $dir\n"; }
}
}
diff --git a/solenv/bin/modules/installer/windows/assembly.pm b/solenv/bin/modules/installer/windows/assembly.pm
index bb5efe2207d5..349f92cecc42 100644
--- a/solenv/bin/modules/installer/windows/assembly.pm
+++ b/solenv/bin/modules/installer/windows/assembly.pm
@@ -81,7 +81,6 @@ sub get_msiassembly_filemanifest
my $filemanifest = "";
$filemanifest = $onefile->{'uniquename'};
- # $filemanifest = $onefile->{'Name'};
return $filemanifest;
}
@@ -139,8 +138,6 @@ sub get_msiassembly_file
}
# It does not need to exist. For example products that do not contain the libraries.
- # if (! $foundfile ) { installer::exiter::exit_program("ERROR: No unique file name found for $filename !", "get_selfreg_file"); }
-
if (! $foundfile ) { $onefile = ""; }
return $onefile;
@@ -170,8 +167,6 @@ sub get_msiassembly_file_by_gid
}
# It does not need to exist. For example products that do not contain the libraries.
- # if (! $foundfile ) { installer::exiter::exit_program("ERROR: No unique file name found for $filename !", "get_selfreg_file"); }
-
if (! $foundfile ) { $onefile = ""; }
return $onefile;
@@ -344,7 +339,6 @@ sub add_assembly_condition_into_component_table
{
# setting the condition
- # $condition = "MsiNetAssemblySupport";
$condition = "DOTNET_SUFFICIENT=1";
$oneline = $component . "\t" . $componentid . "\t" . $directory . "\t" . $attributes . "\t" . $condition . "\t" . $keypath . "\n";
${$componenttable}[$j] = $oneline;
@@ -368,4 +362,4 @@ sub add_assembly_condition_into_component_table
}
}
-1; \ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm
index 4ab5aac68954..da11997e5f83 100644
--- a/solenv/bin/modules/installer/windows/component.pm
+++ b/solenv/bin/modules/installer/windows/component.pm
@@ -128,6 +128,11 @@ sub get_file_component_directory
return $installer::globals::templatefolder;
}
+ if ( $destdir =~ /\bPREDEFINED_OSWINSHELLNEWDIR\b/ )
+ {
+ return "WindowsShellNewFolder";
+ }
+
my $destination = $onefile->{'destination'};
installer::pathanalyzer::get_path_from_fullqualifiedname(\$destination);
@@ -395,9 +400,6 @@ sub create_component_table
installer::windows::idtglobal::write_idt_header(\@componenttable, "component");
- # collect_layer_conditions();
-
-
# File components
for ( my $i = 0; $i <= $#{$allfilecomponentsref}; $i++ )
@@ -527,4 +529,4 @@ sub set_component_in_environment_table
}
}
-1; \ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/createfolder.pm b/solenv/bin/modules/installer/windows/createfolder.pm
index 7ade8866c6c5..cc3d87e47bb7 100644
--- a/solenv/bin/modules/installer/windows/createfolder.pm
+++ b/solenv/bin/modules/installer/windows/createfolder.pm
@@ -96,6 +96,7 @@ sub get_createfolder_component
my $onefile = "";
if ( $installer::globals::languagepack ) { $onefile = get_languagepack_file($filesref, $onedir); }
+ elsif ( $installer::globals::helppack ) { $onefile = installer::existence::get_specified_file($filesref, 'gid_File_Help_Common_Zip'); }
else { $onefile = installer::existence::get_specified_file($filesref, $globalfilegid); }
return $onefile->{'componentname'};
@@ -121,8 +122,8 @@ sub create_createfolder_table
{
my $onedir = ${$dirref}[$i];
- # language packs get only language dependent directories
- if (( $installer::globals::languagepack ) && ( $onedir->{'specificlanguage'} eq "" )) { next };
+ # language packs and help packs get only language dependent directories
+ if (( $installer::globals::languagepack ) || ( $installer::globals::languagepack ) && ( $onedir->{'specificlanguage'} eq "" )) { next };
my $styles = "";
@@ -150,4 +151,4 @@ sub create_createfolder_table
}
-1; \ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm
index f7b13747e3bf..7a588edeb71b 100644
--- a/solenv/bin/modules/installer/windows/directory.pm
+++ b/solenv/bin/modules/installer/windows/directory.pm
@@ -133,6 +133,8 @@ sub make_short_dir_version
# Adding unique directory names to the directory collection
##############################################################
+my $already_checked_the_frigging_directories_for_uniqueness = 0;
+
sub create_unique_directorynames
{
my ($directoryref, $allvariables) = @_;
@@ -161,6 +163,7 @@ sub create_unique_directorynames
$uniquename =~ s/\.//g; # removing dots in directoryname
$uniquename =~ s/\Q$installer::globals::separator\E/\_/g; # replacing slash and backslash with underline
$uniquename =~ s/OpenOffice/OO/g;
+ $uniquename =~ s/LibreOffice/LO/g;
$uniquename =~ s/_registry/_rgy/g;
$uniquename =~ s/_registration/_rgn/g;
$uniquename =~ s/_extension/_ext/g;
@@ -176,7 +179,8 @@ sub create_unique_directorynames
$uniquename = make_short_dir_version($uniquename, $startlength, $hostname); # taking care of underlines!
}
- if ( exists($installer::globals::alluniquedirectorynames{$uniquename}) )
+ if ( !$already_checked_the_frigging_directories_for_uniqueness &&
+ exists($installer::globals::alluniquedirectorynames{$uniquename}) )
{
# This is an error, that must stop the packaging process
$errorcount++;
@@ -260,6 +264,7 @@ sub check_sourcedir_addon
if (($installer::globals::addchildprojects) ||
($installer::globals::patch) ||
($installer::globals::languagepack) ||
+ ($installer::globals::helppack) ||
($allvariableshashref->{'CHANGETARGETDIR'}))
{
my $sourcediraddon = "\:\.";
@@ -335,7 +340,6 @@ sub create_defaultdir_directorynames
$hostname =~ s/\Q$installer::globals::separator\E\s*$//;
get_last_directory_name(\$hostname);
- # installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$hostname); # making program/classes to classes
my $uniquename = $onedir->{'uniquename'};
my $shortstring;
if (( $installer::globals::updatedatabase ) && ( exists($shortdirnamehashref->{$uniquename}) ))
@@ -408,22 +412,15 @@ sub create_directorytable_from_collection
sub add_root_directories
{
- my ($directorytableref, $allvariableshashref) = @_;
-
-# my $sourcediraddon = "";
-# if (($installer::globals::addchildprojects) ||
-# ($installer::globals::patch) ||
-# ($installer::globals::languagepack) ||
-# ($allvariableshashref->{'CHANGETARGETDIR'}))
-# {
-# $sourcediraddon = "\:\.";
-# }
+ my ($directorytableref, $allvariableshashref, $onelanguage) = @_;
my $oneline = "";
- if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} ))
+ if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} ))
{
- my $productname = $allvariableshashref->{'PRODUCTNAME'};
+ my $productname;
+
+ $productname = $allvariableshashref->{'PRODUCTNAME'};
my $productversion = $allvariableshashref->{'PRODUCTVERSION'};
my $baseproductversion = $productversion;
@@ -461,6 +458,12 @@ sub add_root_directories
$oneline = "TARGETDIR\t\tSourceDir\n";
push(@{$directorytableref}, $oneline);
+ $oneline = "WindowsFolder\tTARGETDIR\tWindows\n";
+ push(@{$directorytableref}, $oneline);
+
+ $oneline = "WindowsShellNewFolder\tWindowsFolder\tShellNew\n";
+ push(@{$directorytableref}, $oneline);
+
$oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n";
push(@{$directorytableref}, $oneline);
@@ -520,7 +523,7 @@ sub add_root_directories
sub create_directory_table
{
- my ($directoryref, $basedir, $allvariableshashref, $shortdirnamehashref, $loggingdir) = @_;
+ my ($directoryref, $languagesarrayref, $basedir, $allvariableshashref, $shortdirnamehashref, $loggingdir) = @_;
# Structure of the directory table:
# Directory Directory_Parent DefaultDir
@@ -530,28 +533,34 @@ sub create_directory_table
# Before ":" : [sourcedir]:[destdir] (not programmed yet)
# After ":" : 8+3 and not 8+3 the destination directory name
+ for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ )
+ {
+ my $onelanguage = ${$languagesarrayref}[$m];
+ $installer::globals::installlocationdirectoryset = 0;
+
my @directorytable = ();
my $infoline;
overwrite_programfilesfolder($allvariableshashref);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1.log", $directoryref); }
create_unique_directorynames($directoryref, $allvariableshashref);
+ $already_checked_the_frigging_directories_for_uniqueness++;
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1a.log", $directoryref); }
create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir!
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_2.log", $directoryref); }
set_installlocation_directory($directoryref, $allvariableshashref);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_3.log", $directoryref); }
installer::windows::idtglobal::write_idt_header(\@directorytable, "directory");
- add_root_directories(\@directorytable, $allvariableshashref);
+ add_root_directories(\@directorytable, $allvariableshashref, $onelanguage);
create_directorytable_from_collection(\@directorytable, $directoryref);
# Saving the file
- my $directorytablename = $basedir . $installer::globals::separator . "Director.idt";
+ my $directorytablename = $basedir . $installer::globals::separator . "Director.idt" . "." . $onelanguage;
installer::files::save_file($directorytablename ,\@directorytable);
$infoline = "Created idt file: $directorytablename\n";
push(@installer::globals::logfileinfo, $infoline);
-
+ }
}
1;
diff --git a/solenv/bin/modules/installer/windows/feature.pm b/solenv/bin/modules/installer/windows/feature.pm
index 39521baecdfe..e5aa5f5a3fdc 100644
--- a/solenv/bin/modules/installer/windows/feature.pm
+++ b/solenv/bin/modules/installer/windows/feature.pm
@@ -120,8 +120,8 @@ sub get_feature_display
# Special handling for c05office. No program module visible.
if (( $onefeature->{'gid'} eq "gid_Module_Prg" ) && ( $installer::globals::product =~ /c05office/i )) { $display = "0"; }
- # making all feature invisible in Language packs!
- if ( $installer::globals::languagepack ) { $display = "0"; }
+ # making all feature invisible in Language packs and in Help packs!
+ if ( $installer::globals::languagepack || $installer::globals::helppack ) { $display = "0"; }
return $display
}
@@ -218,7 +218,8 @@ sub replace_variables
{
my ($translationfile, $variableshashref) = @_;
- foreach $key (keys %{$variableshashref})
+ # we want to substitute FOO_BR before FOO to avoid floating _BR suffixes
+ foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
{
my $value = $variableshashref->{$key};
replace_one_variable($translationfile, $value, $key);
@@ -399,7 +400,6 @@ sub create_feature_table
$feature{'feature'} = get_feature_gid($onefeature);
$feature{'feature_parent'} = get_feature_parent($onefeature);
- # if ( $onefeature->{'ParentID'} eq "" ) { $feature{'feature_parent'} = ""; } # Root has no parent
$feature{'Title'} = $onefeature->{'Name'};
$feature{'Description'} = $onefeature->{'Description'};
$feature{'Display'} = get_feature_display($onefeature);
diff --git a/solenv/bin/modules/installer/windows/featurecomponent.pm b/solenv/bin/modules/installer/windows/featurecomponent.pm
index c5053212aad3..8e9ebee84703 100644
--- a/solenv/bin/modules/installer/windows/featurecomponent.pm
+++ b/solenv/bin/modules/installer/windows/featurecomponent.pm
@@ -132,71 +132,6 @@ sub create_featurecomponent_table_from_registry_collector
}
#################################################################################
-# Collecting all feature that are listed in the featurecomponent table.
-#################################################################################
-
-sub collect_all_feature
-{
- my ($featurecomponenttable) = @_;
-
- my @allfeature = ();
-
- for ( my $i = 3; $i <= $#{$featurecomponenttable}; $i++ ) # beginning in line 4
- {
- my $oneline = ${$featurecomponenttable}[$i];
-
- if ( $oneline =~ /^\s*(\S+)\s+(\S+)\s*$/ )
- {
- my $feature = $1;
-
- if (! installer::existence::exists_in_array($feature, \@allfeature)) { push(@allfeature, $feature); }
- }
- }
-
- return \@allfeature;
-}
-
-#################################################################################
-# On Win98 and Win Me there seems to be the problem, that maximum 817
-# components can be added to a feature. Even if Windows Installer 2.0
-# is used.
-#################################################################################
-
-sub check_number_of_components_at_feature
-{
- my ($featurecomponenttable) = @_;
-
- my $infoline = "\nChecking number of components at features. Maximum is 817 (for Win 98 and Win Me)\n";
- push(@installer::globals::logfileinfo, $infoline);
-
- my $allfeature = collect_all_feature($featurecomponenttable);
-
- for ( my $i = 0; $i <= $#{$allfeature}; $i++ )
- {
- my $onefeature = ${$allfeature}[$i];
- my $featurecomponents = 0;
-
- for ( my $j = 0; $j <= $#{$featurecomponenttable}; $j++ )
- {
- if ( ${$featurecomponenttable}[$j] =~ /^\s*\Q$onefeature\E\s+(\S+)\s*$/ ) { $featurecomponents++; }
- }
-
- if ( $featurecomponents > 816 )
- {
- installer::exiter::exit_program("ERROR: More than 816 components ($featurecomponents) at feature $onefeature. This causes problems on Win 98 and Win Me!", "check_number_of_components_at_feature");
- }
-
- # Logging the result
-
- $infoline = "Number of components at feature $onefeature : $featurecomponents\n";
- push(@installer::globals::logfileinfo, $infoline);
- }
-
- $infoline = "\n";
- push(@installer::globals::logfileinfo, $infoline);
-}
-
-#################################################################################
# Creating the file FeatureC.idt dynamically
# Content:
# Feature Component
@@ -228,10 +163,6 @@ sub create_featurecomponent_table
# Additional components have to be added here
- # Checking, whether there are more than 817 components at a feature
-
- check_number_of_components_at_feature(\@featurecomponenttable);
-
# Saving the file
my $featurecomponenttablename = $basedir . $installer::globals::separator . "FeatureC.idt";
@@ -241,4 +172,4 @@ sub create_featurecomponent_table
}
-1; \ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm
index 3ac72ecf6ac3..c4315b43aceb 100644
--- a/solenv/bin/modules/installer/windows/file.pm
+++ b/solenv/bin/modules/installer/windows/file.pm
@@ -877,7 +877,6 @@ sub create_files_table
# The filenames must be collected because of uniqueness
# 01-44-~1.DAT, 01-44-~2.DAT, ...
- # my @shortnames = ();
my %shortnames = ();
if ( $installer::globals::updatedatabase ) { collect_shortnames_from_old_database($uniquefilenamehashref, \%shortnames); }
@@ -902,7 +901,6 @@ sub create_files_table
$onefile->{'componentname'} = $file{'Component_'};
# Collecting all components
- # if (!(installer::existence::exists_in_array($file{'Component_'}, $allfilecomponentsref))) { push(@{$allfilecomponentsref}, $file{'Component_'}); }
if ( ! exists($allfilecomponents{$file{'Component_'}}) ) { $allfilecomponents{$file{'Component_'}} = 1; }
@@ -984,7 +982,6 @@ sub create_files_table
}
# Collecting all language specific conditions
- # if ( $onefile->{'haslanguagemodule'} )
if ( $onefile->{'ismultilingual'} )
{
if ( $onefile->{'ComponentCondition'} ) { installer::exiter::exit_program("ERROR: Cannot set language condition. There is already another component condition for file $onefile->{'gid'}: \"$onefile->{'ComponentCondition'}\" !", "create_files_table"); }
diff --git a/solenv/bin/modules/installer/windows/font.pm b/solenv/bin/modules/installer/windows/font.pm
index 9dab78caf5f7..3e3afed5577b 100644
--- a/solenv/bin/modules/installer/windows/font.pm
+++ b/solenv/bin/modules/installer/windows/font.pm
@@ -58,7 +58,6 @@ sub create_font_table
my %font = ();
$font{'File_'} = $onefile->{'uniquename'};
- # $font{'FontTitle'} = $onefile->{'FontName'}; # results in a warning during validation
$font{'FontTitle'} = "";
my $oneline = $font{'File_'} . "\t" . $font{'FontTitle'} . "\n";
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm
index 4a54ead9dfd4..94b5dcc62399 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -139,7 +139,6 @@ sub get_next_free_number_with_hash
if (!($dontsave))
{
- # push(@{$shortnamesref}, $newname); # adding the new shortname to the array of shortnames
$shortnamesref->{$newname} = 1; # adding the new shortname to the array of shortnames, always uppercase
$saved = 1;
}
@@ -273,7 +272,6 @@ sub make_eight_three_conform_with_hash
my $changed = 0;
my $saved;
- # if (( $inputstring =~ /^\s*(.*?)\.(.*?)\s*$/ ) && ( $pattern eq "file" )) # files with a dot
if (( $inputstring =~ /^\s*(.*)\.(.*?)\s*$/ ) && ( $pattern eq "file" )) # files with a dot
{
# extension has to be non-greedy, but name is. This is important to find the last dot in the filename
@@ -401,7 +399,7 @@ sub write_idt_header
{
$oneline = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n";
push(@{$idtref}, $oneline);
- $oneline = "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n";
+ $oneline = "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti4\n";
push(@{$idtref}, $oneline);
$oneline = "File\tFile\n";
push(@{$idtref}, $oneline);
@@ -461,7 +459,7 @@ sub write_idt_header
{
$oneline = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n";
push(@{$idtref}, $oneline);
- $oneline = "i2\ti2\tL64\tS255\tS32\tS72\n";
+ $oneline = "i2\ti4\tL64\tS255\tS32\tS72\n";
push(@{$idtref}, $oneline);
$oneline = "Media\tDiskId\n";
push(@{$idtref}, $oneline);
@@ -629,7 +627,6 @@ sub get_languagefilename
{
my ($idtfilename, $basedir) = @_;
- # $idtfilename =~ s/\.idt/\.ulf/;
$idtfilename =~ s/\.idt/\.mlf/;
my $languagefilename = $basedir . $installer::globals::separator . $idtfilename;
@@ -758,7 +755,6 @@ sub translate_idtfile
my $language_block = get_language_block_from_language_file($oldstring, $languagefile);
my $newstring = get_language_string_from_language_block($language_block, $onelanguage, $oldstring);
- # if (!( $newstring eq "" )) { ${$idtfile}[$i] =~ s/$oldstring/$newstring/; }
${$idtfile}[$i] =~ s/$oldstring/$newstring/; # always substitute, even if $newstring eq "" (there are empty strings for control.idt)
}
}
@@ -922,18 +918,12 @@ sub get_rtf_licensetext
for ( my $i = 0; $i <= $#{$licensefile}; $i++ )
{
my $oneline = ${$licensefile}[$i];
- # if ( $oneline =~ /^\s*$/ ) { $oneline = '\par'; } # empty lines
if ( $i == 0 ) { $oneline =~ s/^\W*//; }
$oneline =~ s/\t/ /g; # no tabs allowed, converting to four spaces
$oneline =~ s/\n$//g; # no newline at line end
-# $oneline =~ s//\\\'e4/g; # converting ""
-# $oneline =~ s//\\\'f6/g; # converting ""
-# $oneline =~ s//\\\'fc/g; # converting ""
-# $oneline =~ s//\\\'df/g; # converting ""
-
# german replacements
$oneline =~ s/\\/\\\'c4/g; # converting ""
@@ -1146,11 +1136,7 @@ sub add_language_checkboxes_to_database
my $onelanguage = ${$languagesarrayref}[$i];
my $windowslanguage = installer::windows::language::get_windows_language($onelanguage);
- # my $is_english = 0;
- # if ( $windowslanguage eq "1033" ) { $is_english = 1; }
-
my $checkboxattribute = "3";
- # if ( $is_english ) { $checkboxattribute = "1"; } # english is not deselectable
my $count = $i + 1;
my $nextcount = $i + 2;
@@ -1167,7 +1153,6 @@ sub add_language_checkboxes_to_database
my $yvalue = $offset + $i * $multiplier;
my $property = "IS" . $windowslanguage;
- # if ( ! exists($installer::globals::languageproperties{$property}) ) { installer::exiter::exit_program("ERROR: Could not find property \"$property\" in the list of language properties!", "add_language_checkboxes_to_database"); }
my $controlnext = "";
if ( $last ) { $controlnext = "Next"; }
@@ -1301,7 +1286,7 @@ sub set_custom_action
# All files are located in $filesref and in @installer::globals::binarytableonlyfiles.
# Both must be added together
- my $localfilesref = installer::converter::combine_arrays_from_references(\@installer::globals::binarytableonlyfiles, $filesref);
+ my $localfilesref = [@installer::globals::binarytableonlyfiles, @{$filesref}];
for ( my $i = 0; $i <= $#{$localfilesref}; $i++ )
{
@@ -1379,7 +1364,7 @@ sub add_custom_action_to_install_table
# All files are located in $filesref and in @installer::globals::binarytableonlyfiles.
# Both must be added together
- my $localfilesref = installer::converter::combine_arrays_from_references(\@installer::globals::binarytableonlyfiles, $filesref);
+ my $localfilesref = [@installer::globals::binarytableonlyfiles, @{$filesref}];
for ( my $i = 0; $i <= $#{$localfilesref}; $i++ )
{
@@ -1613,7 +1598,6 @@ sub include_subdirname_into_directory_table
{
my $newuniquename = "sub" . $subdir;
$newdir = $newuniquename;
- # my $newparent = $parent;
my $newparent = "INSTALLLOCATION";
my $newname = $name . "\:" . $subdir;
my $newline =
@@ -2097,7 +2081,7 @@ sub get_customaction_position
##########################################################################
# Setting the position of CustomActions in sequence tables.
-# Replacing all occurences of "POSITIONTEMPLATE_"
+# Replacing all occurrences of "POSITIONTEMPLATE_"
##########################################################################
sub set_positions_in_table
@@ -2107,7 +2091,7 @@ sub set_positions_in_table
my $infoline = "\nSetting positions in table \"$tablename\".\n";
push(@installer::globals::logfileinfo, $infoline);
- # Step 1: Resolving all occurences of "POSITIONTEMPLATE_end"
+ # Step 1: Resolving all occurrences of "POSITIONTEMPLATE_end"
my $lastposition = get_last_position_in_sequencetable($sequencetable);
@@ -2123,9 +2107,9 @@ sub set_positions_in_table
}
}
- # Step 2: Resolving all occurences of "POSITIONTEMPLATE_abc" or "POSITIONTEMPLATE_behind_abc"
+ # Step 2: Resolving all occurrences of "POSITIONTEMPLATE_abc" or "POSITIONTEMPLATE_behind_abc"
# where abc is the name of the reference Custom Action.
- # This has to be done, until there is no more occurence of POSITIONTEMPLATE (success)
+ # This has to be done, until there is no more occurrence of POSITIONTEMPLATE (success)
# or there is no replacement in one circle (failure).
my $template_exists = 0;
@@ -2180,7 +2164,7 @@ sub set_positions_in_table
}
} while (( $template_exists ) && ( $template_replaced ));
- # An error occured, because templates still exist, but could not be replaced.
+ # An error occurred, because templates still exist, but could not be replaced.
# Reason:
# 1. Wrong name of CustomAction in scp2 (typo?)
# 2. Circular dependencies of CustomActions (A after B and B after A)
@@ -2193,9 +2177,6 @@ sub set_positions_in_table
if (( $template_exists ) && ( ! $template_replaced ))
{
- # Giving a precise error message, collecting all unresolved templates
- # my $templatestring = "";
-
for ( my $i = 0; $i <= $#{$sequencetable}; $i++ )
{
if ( ${$sequencetable}[$i] =~ /^\s*([\w\.]+)\t.*\t\s*(POSITIONTEMPLATE_.*?)\s*$/ )
@@ -2204,22 +2185,12 @@ sub set_positions_in_table
my $fulltemplate = $2;
my $template = $fulltemplate;
$template =~ s/POSITIONTEMPLATE_//;
- # my $newstring = $customactionname . " (" . $template . ")";
- # $templatestring = $templatestring . $newstring . ", ";
- # Setting at the end!
$lastposition = $lastposition + 25;
${$sequencetable}[$i] =~ s/$fulltemplate/$lastposition/;
$infoline = "WARNING: Setting position \"$lastposition\" for custom action \"$customactionname\". Could not find CustomAction \"$template\".\n";
push(@installer::globals::logfileinfo, $infoline);
}
}
- # $templatestring =~ s/,\s*$//;
-
- # $infoline = "Error: Saving table \"$tablename\"\n";
- # push(@installer::globals::logfileinfo, $infoline);
- # print $infoline;
- # installer::files::save_file($tablename, $sequencetable);
- # installer::exiter::exit_program("ERROR: Unresolved positions in CustomActions in scp2: $templatestring", "set_positions_in_table");
}
}
diff --git a/solenv/bin/modules/installer/windows/language.pm b/solenv/bin/modules/installer/windows/language.pm
index c0dca543eb56..a95bed94517c 100644
--- a/solenv/bin/modules/installer/windows/language.pm
+++ b/solenv/bin/modules/installer/windows/language.pm
@@ -60,7 +60,6 @@ sub get_windows_encoding
if ( $installer::globals::msiencoding->{$language} ) { $windowsencoding = $installer::globals::msiencoding->{$language}; }
- # if ( $windowsencoding eq "" ) { installer::exiter::exit_program("ERROR: Unknown language $language in function get_windows_encoding", "get_windows_encoding"); }
if ( $windowsencoding eq "" ) { $windowsencoding = "0"; } # setting value, if the language is not listed in the encodinglist
if ( $windowsencoding eq "0" ) { $windowsencoding = "65001"; } # languages with "0" have to be available in UTF-8 (65001)
@@ -71,4 +70,4 @@ sub get_windows_encoding
return $windowsencoding;
}
-1; \ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/media.pm b/solenv/bin/modules/installer/windows/media.pm
index 35e90f6a3856..12da8a723c9d 100644
--- a/solenv/bin/modules/installer/windows/media.pm
+++ b/solenv/bin/modules/installer/windows/media.pm
@@ -351,7 +351,6 @@ sub create_media_table
if ( $allvariables->{'CABFILENUMBER'} ) { $maxcabfilenumber = $allvariables->{'CABFILENUMBER'}; }
my $allfiles = $#{$filesref} + 1;
my $maxfilenumber = get_maximum_filenumber($allfiles, $maxcabfilenumber);
- # my $maxfilenumber = 1000; # maximum 1000 files in each cabinet file
my $cabfilenumber = 0;
my $cabfull = 0;
my $counter = 0;
@@ -385,7 +384,6 @@ sub create_media_table
$cabfilenumber++;
$media{'DiskId'} = get_media_diskid($cabfilenumber);
- # $media{'LastSequence'} = get_media_lastsequence($onefile);
$media{'LastSequence'} = $i + 1; # This should be correct, also for unsorted files collectors
$media{'DiskPrompt'} = get_media_diskprompt();
$media{'Cabinet'} = generate_cab_filename_for_some_cabs($allvariables, $cabfilenumber);
@@ -420,7 +418,6 @@ sub create_media_table
my $maximumfile = $#{$filesref};
$media{'DiskId'} = get_media_diskid($diskid);
- # $media{'LastSequence'} = ${$filesref}[$maximumfile]->{'sequencenumber'}; # sequence number of the last file
$media{'LastSequence'} = $maximumfile + 1; # This works also for unsorted file collector
$media{'DiskPrompt'} = get_media_diskprompt();
$media{'Cabinet'} = generate_cab_filename($allvariables);
diff --git a/solenv/bin/modules/installer/windows/mergemodule.pm b/solenv/bin/modules/installer/windows/mergemodule.pm
index eb524fdafc3e..b9591c417994 100755
--- a/solenv/bin/modules/installer/windows/mergemodule.pm
+++ b/solenv/bin/modules/installer/windows/mergemodule.pm
@@ -51,7 +51,7 @@ sub merge_mergemodules_into_msi_database
my ($mergemodules, $filesref, $msifilename, $languagestringref, $language, $languagefile, $allvariables, $includepatharrayref, $allupdatesequences, $allupdatelastsequences, $allupdatediskids) = @_;
my $domerge = 0;
- if (( $#{$mergemodules} > -1 ) && ( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack )) { $domerge = 1; }
+ if (( $#{$mergemodules} > -1 ) && ( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack )) { $domerge = 1; }
if ( $domerge )
{
@@ -79,7 +79,6 @@ sub merge_mergemodules_into_msi_database
%installer::globals::mergemodules = ();
my $mergemoduledir = installer::systemactions::create_directories("mergefiles", $languagestringref);
- # push(@installer::globals::removedirs, $mergemoduledir);
my $mergemodule;
foreach $mergemodule ( @{$mergemodules} )
@@ -144,7 +143,6 @@ sub merge_mergemodules_into_msi_database
}
else
{
- # $systemcall = $msidb . " -d " . $filename . " -f " . $workdir . " -e File Component MsiAssembly Directory";
$systemcall = $msidb . " -d " . $filename . " -f " . $workdir . " -e \*";
}
@@ -398,14 +396,14 @@ sub merge_mergemodules_into_msi_database
installer::logger::include_timestamp_into_logfile("\nPerformance Info: After merging database");
# Saving original idt files
- if ( -f "File.idt" ) { installer::systemactions::rename_one_file("File.idt", "File.idt.$counter"); }
- if ( -f "Media.idt" ) { installer::systemactions::rename_one_file("Media.idt", "Media.idt.$counter"); }
- if ( -f "Directory.idt" ) { installer::systemactions::rename_one_file("Directory.idt", "Directory.idt.$counter"); }
- if ( -f "Director.idt" ) { installer::systemactions::rename_one_file("Director.idt", "Director.idt.$counter"); }
- if ( -f "FeatureComponents.idt" ) { installer::systemactions::rename_one_file("FeatureComponents.idt", "FeatureComponents.idt.$counter"); }
- if ( -f "FeatureC.idt" ) { installer::systemactions::rename_one_file("FeatureC.idt", "FeatureC.idt.$counter"); }
- if ( -f "MsiAssembly.idt" ) { installer::systemactions::rename_one_file("MsiAssembly.idt", "MsiAssembly.idt.$counter"); }
- if ( -f "MsiAssem.idt" ) { installer::systemactions::rename_one_file("MsiAssem.idt", "MsiAssem.idt.$counter"); }
+ if ( -f "File.idt" ) { installer::systemactions::rename_one_file("File.idt", "old.File.idt.$counter"); }
+ if ( -f "Media.idt" ) { installer::systemactions::rename_one_file("Media.idt", "old.Media.idt.$counter"); }
+ if ( -f "Directory.idt" ) { installer::systemactions::rename_one_file("Directory.idt", "old.Directory.idt.$counter"); }
+ if ( -f "Director.idt" ) { installer::systemactions::rename_one_file("Director.idt", "old.Director.idt.$counter"); }
+ if ( -f "FeatureComponents.idt" ) { installer::systemactions::rename_one_file("FeatureComponents.idt", "old.FeatureComponents.idt.$counter"); }
+ if ( -f "FeatureC.idt" ) { installer::systemactions::rename_one_file("FeatureC.idt", "old.FeatureC.idt.$counter"); }
+ if ( -f "MsiAssembly.idt" ) { installer::systemactions::rename_one_file("MsiAssembly.idt", "old.MsiAssembly.idt.$counter"); }
+ if ( -f "MsiAssem.idt" ) { installer::systemactions::rename_one_file("MsiAssem.idt", "old.MsiAssem.idt.$counter"); }
# Extracting tables
@@ -474,13 +472,13 @@ sub merge_mergemodules_into_msi_database
# merged into the three ExecuteSequences with the following process (also into InstallUISequence.idt).
# Saving original idt files
- if ( -f "InstallE.idt" ) { installer::systemactions::rename_one_file("InstallE.idt", "InstallE.idt.$counter"); }
- if ( -f "InstallU.idt" ) { installer::systemactions::rename_one_file("InstallU.idt", "InstallU.idt.$counter"); }
- if ( -f "AdminExe.idt" ) { installer::systemactions::rename_one_file("AdminExe.idt", "AdminExe.idt.$counter"); }
- if ( -f "AdvtExec.idt" ) { installer::systemactions::rename_one_file("AdvtExec.idt", "AdvtExec.idt.$counter"); }
- if ( -f "ModuleInstallExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleInstallExecuteSequence.idt", "ModuleInstallExecuteSequence.idt.$counter"); }
- if ( -f "ModuleAdminExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleAdminExecuteSequence.idt", "ModuleAdminExecuteSequence.idt.$counter"); }
- if ( -f "ModuleAdvtExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleAdvtExecuteSequence.idt", "ModuleAdvtExecuteSequence.idt.$counter"); }
+ if ( -f "InstallE.idt" ) { installer::systemactions::rename_one_file("InstallE.idt", "old.InstallE.idt.$counter"); }
+ if ( -f "InstallU.idt" ) { installer::systemactions::rename_one_file("InstallU.idt", "old.InstallU.idt.$counter"); }
+ if ( -f "AdminExe.idt" ) { installer::systemactions::rename_one_file("AdminExe.idt", "old.AdminExe.idt.$counter"); }
+ if ( -f "AdvtExec.idt" ) { installer::systemactions::rename_one_file("AdvtExec.idt", "old.AdvtExec.idt.$counter"); }
+ if ( -f "ModuleInstallExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleInstallExecuteSequence.idt", "old.ModuleInstallExecuteSequence.idt.$counter"); }
+ if ( -f "ModuleAdminExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleAdminExecuteSequence.idt", "old.ModuleAdminExecuteSequence.idt.$counter"); }
+ if ( -f "ModuleAdvtExecuteSequence.idt" ) { installer::systemactions::rename_one_file("ModuleAdvtExecuteSequence.idt", "old.ModuleAdvtExecuteSequence.idt.$counter"); }
# Extracting tables
my $moduleexecutetables = "ModuleInstallExecuteSequence ModuleAdminExecuteSequence ModuleAdvtExecuteSequence"; # new tables
@@ -557,16 +555,22 @@ sub merge_mergemodules_into_msi_database
my $localworkdir = $workdir;
$localmsifilename =~ s/\//\\\\/g;
$localworkdir =~ s/\//\\\\/g;
- $systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -i " . $workingtables. " " . $executetables;
+ foreach $table (split / /, $workingtables . ' ' . $executetables) {
+ $systemcall = $msidb . " -d " . $localmsifilename . " -f " . $localworkdir . " -i " . $table;
+ my $retval = system($systemcall);
+ $infoline = "Systemcall returned $retval: $systemcall\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ $returnvalue |= $retval;
+ }
}
else
{
$systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -i " . $workingtables. " " . $executetables;
- }
- $returnvalue = system($systemcall);
+ $returnvalue = system($systemcall);
+ $infoline = "Systemcall: $systemcall\n";
+ push( @installer::globals::logfileinfo, $infoline);
- $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ }
if ($returnvalue)
{
@@ -1105,23 +1109,6 @@ sub change_file_table
{
if ( ! -d $unpackdir ) { installer::systemactions::create_directory($unpackdir); }
- # Unpack the cab file, so that in can be included into the last office cabinet file. Attention: cararc.exe from cabsdk required.
- # cabarc.exe -o X <fullcabfilepath>
-
- # my $cabarcfilename = "cabarc.exe";
- # my $cabarcfile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$cabarcfilename, $includepatharrayref, 1);
-
- # if ( ! -f $$cabarcfile )
- # {
- # $cabarcfilename = "CABARC.EXE";
- # $cabarcfile = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$cabarcfilename, $includepatharrayref, 1);
- # if ( ! -f $$cabarcfile )
- # {
- # installer::exiter::exit_program("ERROR: cabarc.exe not found !", "change_file_table");
- # }
- # }
- # my $cabarc = $$cabarcfile;
-
# changing directory
my $from = cwd();
my $to = $mergemodulehash->{'workdir'};
@@ -1148,9 +1135,6 @@ sub change_file_table
my $cabfilename = "MergeModule.CABinet";
- # exclude cabinet file
- # my $systemcall = $cabarc . " -o X " . $mergemodulehash->{'cabinetfile'};
-
my $systemcall = "";
if ( $^O =~ /cygwin/i ) {
my $localunpackdir = qx(cygpath -m "$unpackdir");
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index dbb6e051aa29..07f6b73c9cbc 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -64,7 +64,10 @@ sub write_ddf_file_header
push(@{$ddffileref} ,$oneline);
$oneline = ".Set Compress=ON\n";
push(@{$ddffileref} ,$oneline);
- $oneline = ".Set CompressionLevel=$installer::globals::cabfilecompressionlevel\n";
+# The window size for LZX compression
+# CompressionMemory=15 | 16 | ... | 21
+# Reference: http://msdn.microsoft.com/en-us/library/bb417343.aspx
+ $oneline = ".Set CompressionMemory=$installer::globals::cabfilecompressionlevel\n";
push(@{$ddffileref} ,$oneline);
$oneline = ".Set Cabinet=ON\n";
push(@{$ddffileref} ,$oneline);
@@ -1010,9 +1013,9 @@ sub create_transforms
my $infoline = "Systemcall: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
- # Problem: msitran.exe in version 4.0 always returns "1", even if no failure occured.
+ # Problem: msitran.exe in version 4.0 always returns "1", even if no failure occurred.
# Therefore it has to be checked, if this is version 4.0. If yes, if the mst file
- # exists and if it is larger than 0 bytes. If this is true, then no error occured.
+ # exists and if it is larger than 0 bytes. If this is true, then no error occurred.
# File Version of msitran.exe: 4.0.6000.16384 has checksum: "b66190a70145a57773ec769e16777b29".
# Same for msitran.exe from wntmsci12: "aa25d3445b94ffde8ef0c1efb77a56b8"
@@ -1026,7 +1029,7 @@ sub create_transforms
my $digest = Digest::MD5->new->addfile(*FILE)->hexdigest;
close(FILE);
- my @problemchecksums = ("b66190a70145a57773ec769e16777b29", "aa25d3445b94ffde8ef0c1efb77a56b8");
+ my @problemchecksums = ("b66190a70145a57773ec769e16777b29", "aa25d3445b94ffde8ef0c1efb77a56b8", "748206e54fc93efe6a1aaa9d491f3ad1");
my $isproblemchecksum = 0;
foreach my $problemchecksum ( @problemchecksums )
@@ -1057,13 +1060,13 @@ sub create_transforms
}
else
{
- $infoline = "Filesize indicates that an error occured.\n";
+ $infoline = "Filesize indicates that an error occurred.\n";
push( @installer::globals::logfileinfo, $infoline);
}
}
else
{
- $infoline = "File $transformfile does not exist -> An error occured.\n";
+ $infoline = "File $transformfile does not exist -> An error occurred.\n";
push( @installer::globals::logfileinfo, $infoline);
}
}
@@ -1476,7 +1479,6 @@ sub get_guid_list
# "-c" for uppercase output
- # my $systemcall = "$uuidgen -n$number -c |";
my $systemcall = "$uuidgen -n$number |";
open (UUIDGEN, "$systemcall" ) or die("uuidgen is missing.");
my @uuidlist = <UUIDGEN>;
@@ -1519,7 +1521,6 @@ sub calculate_guid
my $digest = $md5->hexdigest;
$digest = uc($digest);
- # my $id = pack("A32", $digest);
my ($first, $second, $third, $fourth, $fifth) = unpack ('A8 A4 A4 A4 A12', $digest);
$guid = "$first-$second-$third-$fourth-$fifth";
@@ -1593,8 +1594,6 @@ sub set_uuid_into_component_table
my $infoline = "";
my $counter = 0;
- # my $componentfile = installer::files::read_file($installer::globals::componentfilename);
- # my $componenthash = fill_component_hash($componentfile);
for ( my $i = 3; $i <= $#{$componenttable}; $i++ ) # ignoring the first three lines
{
@@ -1604,13 +1603,6 @@ sub set_uuid_into_component_table
my $uuid = "";
- # if ( $componenthash->{$componentname} )
- # {
- # $uuid = $componenthash->{$componentname};
- # }
- # else
- # {
-
if ( exists($installer::globals::calculated_component_guids{$componentname}))
{
$uuid = $installer::globals::calculated_component_guids{$componentname};
@@ -1634,44 +1626,12 @@ sub set_uuid_into_component_table
if ( exists($installer::globals::allcalculated_guids{$uuid}) ) { installer::exiter::exit_program("ERROR: \"$uuid\" was already created before!", "set_uuid_into_component_table"); }
$installer::globals::allcalculated_guids{$uuid} = 1;
$installer::globals::calculated_component_guids{$componentname} = $uuid;
-
- # Setting new uuid
- # $componenthash->{$componentname} = $uuid;
-
- # Setting flag
- # $installer::globals::created_new_component_guid = 1; # this is very important!
}
- # }
${$componenttable}[$i] =~ s/COMPONENTGUID/$uuid/;
}
installer::files::save_file($componenttablename, $componenttable);
-
-# if ( $installer::globals::created_new_component_guid )
-# {
-# # create new component file!
-# $componentfile = create_new_component_file($componenthash);
-# installer::worker::sort_array($componentfile);
-#
-# # To avoid conflict the components file cannot be saved at the same place
-# # All important data have to be saved in the directory: $installer::globals::infodirectory
-# my $localcomponentfilename = $installer::globals::componentfilename;
-# installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$localcomponentfilename);
-# $localcomponentfilename = $installer::globals::infodirectory . $installer::globals::separator . $localcomponentfilename;
-# installer::files::save_file($localcomponentfilename, $componentfile);
-#
-# # installer::files::save_file($installer::globals::componentfilename, $componentfile); # version using new file in solver
-#
-# $infoline = "COMPONENTCODES: Created $counter new GUIDs for components ! \n";
-# push( @installer::globals::logfileinfo, $infoline);
-# }
-# else
-# {
-# $infoline = "SUCCESS COMPONENTCODES: All component codes exist! \n";
-# push( @installer::globals::logfileinfo, $infoline);
-# }
-
}
#########################################################################
@@ -1884,8 +1844,6 @@ sub execute_packaging
installer::logger::print_message( "... makecab.exe ($callscounter/$allmakecabcalls) ... \n" );
- # my $returnvalue = system($systemcall);
-
for ( my $n = 1; $n <= $maxmakecabcalls; $n++ )
{
my @ddfoutput = ();
@@ -1913,7 +1871,6 @@ sub execute_packaging
}
push( @installer::globals::logfileinfo, $infoline);
- # for ( my $j = 0; $j <= $#ddfoutput; $j++ ) { push( @installer::globals::logfileinfo, "$ddfoutput[$j]"); }
for ( my $m = 0; $m <= $#ddfoutput; $m++ )
{
@@ -1930,7 +1887,6 @@ sub execute_packaging
}
else
{
- # installer::logger::print_message( "Success (Try $n): \"$systemcall\"\n" );
$infoline = "Success (Try $n): $systemcall";
push( @installer::globals::logfileinfo, $infoline);
last;
@@ -2033,7 +1989,6 @@ sub set_global_code_variables
$installer::globals::upgradecode = installer::windows::idtglobal::get_language_string_from_language_block($codeblock, $onelanguage, "");
}
- # if (( $installer::globals::productcode eq "" ) && ( ! $isopensource )) { installer::exiter::exit_program("ERROR: ProductCode for language $onelanguage not defined in $installer::globals::codefilename !", "set_global_code_variables"); }
if ( $installer::globals::upgradecode eq "" ) { installer::exiter::exit_program("ERROR: UpgradeCode not defined in $installer::globals::codefilename !", "set_global_code_variables"); }
$infoline = "Setting ProductCode to: $installer::globals::productcode \n";
@@ -2226,8 +2181,8 @@ sub read_saved_mappings
{
my @errorlines = ();
my $errorstring = "";
- my $error_occured = 0;
- my $file_error_occured = 0;
+ my $error_occurred = 0;
+ my $file_error_occurred = 0;
my $dir_error = 0;
my $idtdir = $installer::globals::previous_idt_dir;
@@ -2251,28 +2206,28 @@ sub read_saved_mappings
if ( exists($installer::globals::savedmapping{"$2/$5"}))
{
- if ( ! $file_error_occured )
+ if ( ! $file_error_occurred )
{
$errorstring = "\nErrors in $idtfile: \n";
push(@errorlines, $errorstring);
}
$errorstring = "Duplicate savedmapping{" . "$2/$5}\n";
push(@errorlines, $errorstring);
- $error_occured = 1;
- $file_error_occured = 1;
+ $error_occurred = 1;
+ $file_error_occurred = 1;
}
if ( exists($installer::globals::savedrevmapping{$lc1}))
{
- if ( ! $file_error_occured )
+ if ( ! $file_error_occurred )
{
$errorstring = "\nErrors in $idtfile: \n";
push(@errorlines, $errorstring);
}
$errorstring = "Duplicate savedrevmapping{" . "$lc1}\n";
push(@errorlines, $errorstring);
- $error_occured = 1;
- $file_error_occured = 1;
+ $error_occurred = 1;
+ $file_error_occurred = 1;
}
my $shortname = $4 || '';
@@ -2286,15 +2241,15 @@ sub read_saved_mappings
if (( $shortname ne '' ) && ( index($shortname, '~') > 0 ) && ( exists($installer::globals::savedrev83mapping{$shortname}) ))
{
- if ( ! $file_error_occured )
+ if ( ! $file_error_occurred )
{
$errorstring = "\nErrors in $idtfile: \n";
push(@errorlines, $errorstring);
}
$errorstring = "Duplicate savedrev83mapping{" . "$shortname}\n";
push(@errorlines, $errorstring);
- $error_occured = 1;
- $file_error_occured = 1;
+ $error_occurred = 1;
+ $file_error_occurred = 1;
}
$installer::globals::savedmapping{"$2/$5"} = "$1;$shortname";
@@ -2326,15 +2281,15 @@ sub read_saved_mappings
if ( exists($installer::globals::saved83dirmapping{$1}) )
{
- if ( ! $dir_error_occured )
+ if ( ! $dir_error_occurred )
{
$errorstring = "\nErrors in $idtfile: \n";
push(@errorlines, $errorstring);
}
$errorstring = "Duplicate saved83dirmapping{" . "$1}\n";
push(@errorlines, $errorstring);
- $error_occured = 1;
- $dir_error_occured = 1;
+ $error_occurred = 1;
+ $dir_error_occurred = 1;
}
$installer::globals::saved83dirmapping{$1} = $4;
@@ -2346,7 +2301,7 @@ sub read_saved_mappings
# Analyzing errors
- if ( $error_occured )
+ if ( $error_occurred )
{
for ( my $i = 0; $i <= $#errorlines; $i++ )
{
@@ -2356,7 +2311,6 @@ sub read_saved_mappings
installer::exiter::exit_program("ERROR: Duplicate entries in saved mappings!", "read_saved_mappings");
}
} else {
- # push( @installer::globals::globallogfileinfo, "WARNING: Windows patch shall be prepared, but PREVIOUS_IDT_DIR is not set!\n" );
installer::exiter::exit_program("ERROR: Windows patch shall be prepared, but environment variable PREVIOUS_IDT_DIR is not set!", "read_saved_mappings");
}
diff --git a/solenv/bin/modules/installer/windows/msp.pm b/solenv/bin/modules/installer/windows/msp.pm
index ac28f9258820..7593c96a6ea8 100644
--- a/solenv/bin/modules/installer/windows/msp.pm
+++ b/solenv/bin/modules/installer/windows/msp.pm
@@ -420,7 +420,6 @@ sub execute_msimsp
$locallogfilename =~ s/\//\\\\/g;
$localmspfilename =~ s/\\/\\\\/g; # path already contains backslash
- # $localmspfilename =~ s/\//\\\\/g;
$localmsimsptemppath = qx{cygpath -w "$localmsimsptemppath"};
$localmsimsptemppath =~ s/\\/\\\\/g;
@@ -888,7 +887,7 @@ sub change_patchmetadata_table
if ( $allvariables->{'PROPERTYTABLEPRODUCTNAME'} ) { $targetproductnamevalue = $allvariables->{'PROPERTYTABLEPRODUCTNAME'}; }
my $manufacturerstring = "ManufacturerName";
- my $manufacturervalue = "OpenOffice.org";
+ my $manufacturervalue = "LibreOffice";
if ( $installer::globals::longmanufacturer ) { $manufacturervalue = $installer::globals::longmanufacturer; }
my $displaynamestring = "DisplayName";
@@ -897,7 +896,7 @@ sub change_patchmetadata_table
my $descriptionvalue = "";
my $base = $allvariables->{'PRODUCTNAME'} . " " . $allvariables->{'PRODUCTVERSION'};
- if ( $installer::globals::languagepack ) { $base = $targetproductnamevalue; }
+ if ( $installer::globals::languagepack || $installer::globals::helppack ) { $base = $targetproductnamevalue; }
my $windowspatchlevel = 0;
if ( $allvariables->{'WINDOWSPATCHLEVEL'} ) { $windowspatchlevel = $allvariables->{'WINDOWSPATCHLEVEL'}; }
@@ -1176,6 +1175,7 @@ sub correct_patch
my $localproduct = $installer::globals::product;
if ( $installer::globals::languagepack ) { $localproduct = $localproduct . "LanguagePack"; }
+ elsif ( $installer::globals::helppack ) { $localproduct = $localproduct . "HelpPack"; }
if ( $product eq $localproduct ) { $product_is_good = 1; }
@@ -1273,10 +1273,7 @@ sub convert_unicode_to_ascii
my $savfilename = $filename . "_before.unicode";
installer::systemactions::copy_one_file($filename, $savfilename);
-# open( IN, "<:utf16", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
-# open( IN, "<:para:crlf:uni", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
open( IN, "<:encoding(UTF16-LE)", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
-# open( IN, "<:encoding(UTF-8)", $filename ) || installer::exiter::exit_program("ERROR: Cannot open file $filename for reading", "convert_unicode_to_ascii");
while ( $line = <IN> ) {
push @localfile, $line;
}
@@ -1408,6 +1405,7 @@ sub create_msp_patch
my $pcpfilename = $allvariables->{'PCPFILENAME'};
if ( $installer::globals::languagepack ) { $pcpfilename =~ s/.pcp\s*$/languagepack.pcp/; }
+ elsif ( $installer::globals::helppack ) { $pcpfilename =~ s/.pcp\s*$/helppack.pcp/; }
# Searching the pcp file in the include pathes
my $fullpcpfilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$pcpfilename, $includepatharrayref, 1);
@@ -1456,7 +1454,7 @@ sub create_msp_patch
installer::systemactions::copy_complete_directory($oldinstallationsetpath, $mspdir);
# Copying additional patches into the installation set, if required
- if (( $allvariables->{'ADDITIONALREQUIREDPATCHES'} ) && ( $allvariables->{'ADDITIONALREQUIREDPATCHES'} ne "" ) && ( ! $installer::globals::languagepack ))
+ if (( $allvariables->{'ADDITIONALREQUIREDPATCHES'} ) && ( $allvariables->{'ADDITIONALREQUIREDPATCHES'} ne "" ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ))
{
my $filename = $allvariables->{'ADDITIONALREQUIREDPATCHES'};
diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm
index a5d3745d94c3..5cfa674dd7c0 100644
--- a/solenv/bin/modules/installer/windows/property.pm
+++ b/solenv/bin/modules/installer/windows/property.pm
@@ -54,6 +54,7 @@ sub get_arpcomments_for_property_table
}
if ( $installer::globals::languagepack ) { $comment = $comment . " " . "Language Pack"; }
+ elsif ( $installer::globals::helppack ) { $comment = $comment . " " . "Help Pack"; }
if ( $installer::globals::patch )
{
@@ -142,11 +143,20 @@ sub get_english_language_string
return $langstring;
}
-sub get_productname_for_property_table
+sub get_productname($$)
{
- my ( $allvariables ) = @_;
+ my ( $language, $allvariables ) = @_;
my $name = $allvariables->{'PRODUCTNAME'};
+
+ return $name;
+}
+
+sub get_productname_for_property_table($$)
+{
+ my ( $language, $allvariables ) = @_;
+
+ my $name = get_productname ($language, $allvariables);
my $version = $allvariables->{'PRODUCTVERSION'};
my $productname = $name . " " . $version;
@@ -166,10 +176,14 @@ sub get_productname_for_property_table
if ( $installer::globals::languagepack )
{
- # my $langstring = get_language_string(); # Example (English, Deutsch)
- my $langstring = get_english_language_string(); # New: (English, German)
+ my $langstring = get_english_language_string(); # Example: (English, German)
$productname = $name . " " . $version . " Language Pack" . " " . $langstring;
}
+ elsif ( $installer::globals::helppack )
+ {
+ my $langstring = get_english_language_string(); # New: (English, German)
+ $productname = $name . " " . $version . " Help Pack" . " " . $langstring;
+ }
if ( $installer::globals::patch )
{
@@ -186,13 +200,12 @@ sub get_productname_for_property_table
return $productname;
}
-sub get_quickstarterlinkname_for_property_table
+sub get_quickstarterlinkname_for_property_table($$)
{
- my ( $allvariables ) = @_;
+ my ( $language, $allvariables ) = @_;
# no usage of POSTVERSIONEXTENSION for Quickstarter link name!
-
- my $name = $allvariables->{'PRODUCTNAME'};
+ my $name = get_productname ($language, $allvariables);
my $version = $allvariables->{'PRODUCTVERSION'};
my $quickstartername = $name . " " . $version;
@@ -358,6 +371,11 @@ sub set_important_properties
my $onepropertyline = "ISLANGUAGEPACK" . "\t" . "1" . "\n";
push(@{$propertyfile}, $onepropertyline);
}
+ elsif ( $installer::globals::helppack )
+ {
+ my $onepropertyline = "ISHELPPACK" . "\t" . "1" . "\n";
+ push(@{$propertyfile}, $onepropertyline);
+ }
my $languagesline = "PRODUCTALLLANGUAGES" . "\t" . $$languagestringref . "\n";
push(@{$propertyfile}, $languagesline);
@@ -485,9 +503,9 @@ sub update_property_table
my $ischeckforproductupdates = get_ischeckforproductupdates_for_property_table();
my $manufacturer = get_manufacturer_for_property_table();
my $productlanguage = get_productlanguage_for_property_table($language);
- my $productname = get_productname_for_property_table($allvariables);
+ my $productname = get_productname_for_property_table($language, $allvariables);
my $productversion = get_productversion_for_property_table();
- my $quickstarterlinkname = get_quickstarterlinkname_for_property_table($allvariables);
+ my $quickstarterlinkname = get_quickstarterlinkname_for_property_table($language, $allvariables);
# Updating the values
diff --git a/solenv/bin/modules/installer/windows/registry.pm b/solenv/bin/modules/installer/windows/registry.pm
index 18981d661372..ad036865ebc3 100644
--- a/solenv/bin/modules/installer/windows/registry.pm
+++ b/solenv/bin/modules/installer/windows/registry.pm
@@ -94,6 +94,7 @@ sub get_registry_component_name
$componentname = $componentname . $addon;
if (( $styles =~ /\bLANGUAGEPACK\b/ ) && ( $installer::globals::languagepack )) { $componentname = $componentname . "_lang"; }
+ elsif (( $styles =~ /\bHELPPACK\b/ ) && ( $installer::globals::helppack )) { $componentname = $componentname . "_help"; }
if ( $styles =~ /\bALWAYS_REQUIRED\b/ ) { $componentname = $componentname . "_forced"; }
# Attention: Maximum length for the componentname is 72
diff --git a/solenv/bin/modules/installer/windows/shortcut.pm b/solenv/bin/modules/installer/windows/shortcut.pm
index 76039baf10c9..cb62a0a7fdd9 100644
--- a/solenv/bin/modules/installer/windows/shortcut.pm
+++ b/solenv/bin/modules/installer/windows/shortcut.pm
@@ -357,10 +357,9 @@ sub get_folderitem_directory
{
my ($shortcut) = @_;
- # my $directory = "$installer::globals::programmenufolder"; # default
my $directory = "$installer::globals::officemenufolder"; # default
- # The value $installer::globals::programmenufolder is not correct for the
+ # The default is not correct for the
# PREDEFINED folders, like PREDEFINED_AUTOSTART
if ( $shortcut->{'FolderID'} eq "PREDEFINED_AUTOSTART" )
@@ -694,4 +693,4 @@ sub create_shortcut_table
}
-1; \ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/sign.pm b/solenv/bin/modules/installer/windows/sign.pm
index 70954bd9f5b1..8fb7b3fe13a0 100644
--- a/solenv/bin/modules/installer/windows/sign.pm
+++ b/solenv/bin/modules/installer/windows/sign.pm
@@ -243,9 +243,6 @@ sub execute_open_system_call
if( $^O =~ /cygwin/i )
{
- # $comspec =~ s/\\/\\\\/g;
- # $comspec = qx{cygpath -u "$comspec"};
- # $comspec =~ s/\s*$//g;
$comspec = "";
}
@@ -548,7 +545,6 @@ sub cabinet_cosistency_check
my $sourcecabfile = $finalinstalldir . $installer::globals::separator . $onefile;
my $currentpath = cwd();
my $destcabfile = $currentpath . $installer::globals::separator . $onefile;
- # my $destcabfile = $onefile;
if ( $^O =~ /cygwin/i )
{
@@ -614,7 +610,6 @@ sub cabinet_cosistency_check
# Also making a binary diff?
my $difffile = "diff.exe"; # has to be in the path
- # $systemcall = "$difffile $sourcecabfile $destcabfile"; # Test for differences
$systemcall = "$difffile $origfile $newfile";
$infoline = $systemcall . "\n";
$returnvalue = make_systemcall($systemcall, $systemcall);
@@ -634,9 +629,9 @@ sub cabinet_cosistency_check
}
else
{
- $infoline = "ERROR: Problem occured calling diff.exe (File: $lastfile)\n";
+ $infoline = "ERROR: Problem occurred calling diff.exe (File: $lastfile)\n";
push( @installer::globals::logfileinfo, $infoline);
- installer::exiter::exit_program("ERROR: Problem occured calling diff.exe (File: $lastfile) !", "cabinet_cosistency_check");
+ installer::exiter::exit_program("ERROR: Problem occurred calling diff.exe (File: $lastfile) !", "cabinet_cosistency_check");
}
}
}
@@ -1050,8 +1045,6 @@ sub already_certified
if ( $returnvalue ) { $success = 0; }
- # my $success = make_systemcall($systemcall, $systemcall);
-
if ( $success )
{
$is_certified = 1;
diff --git a/solenv/bin/modules/installer/windows/update.pm b/solenv/bin/modules/installer/windows/update.pm
index efe6949b6fc4..50d31f022024 100644
--- a/solenv/bin/modules/installer/windows/update.pm
+++ b/solenv/bin/modules/installer/windows/update.pm
@@ -215,6 +215,7 @@ sub correct_database
my $localproduct = $installer::globals::product;
if ( $installer::globals::languagepack ) { $localproduct = $localproduct . "LanguagePack"; }
+ elsif ( $installer::globals::helppack ) { $localproduct = $localproduct . "HelpPack"; }
if ( $product eq $localproduct ) { $product_is_good = 1; }
@@ -334,7 +335,6 @@ sub readdatabase
}
else
{
- # installer::logger::print_message( "... no update process, no database found ...\n" );
$infoline = "\nNo database found in $completelistname. This is no update process!\n\n";
}
push( @installer::globals::logfileinfo, $infoline);
@@ -597,4 +597,4 @@ sub create_database_hashes
}
-1; \ No newline at end of file
+1;
diff --git a/solenv/bin/modules/installer/windows/upgrade.pm b/solenv/bin/modules/installer/windows/upgrade.pm
index 49479b26bf49..547bc4ce7bf1 100644
--- a/solenv/bin/modules/installer/windows/upgrade.pm
+++ b/solenv/bin/modules/installer/windows/upgrade.pm
@@ -47,7 +47,7 @@ sub create_upgrade_table
# fix for problematic OOo 1.9 versions
my $include_ooo_fix = 0;
my $ooomaxnew = "";
- if (($installer::globals::product =~ /^\s*OpenOffice/i ) && ( ! ( $installer::globals::product =~ /SDK/i )) && ( ! $installer::globals::languagepack ))
+ if (($installer::globals::product =~ /^\s*OpenOffice/i ) && ( ! ( $installer::globals::product =~ /SDK/i )) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ))
{
$include_ooo_fix = 1;
$ooomaxnew = "34.0.0";
@@ -61,7 +61,8 @@ sub create_upgrade_table
push(@upgradetable, $newline);
# Setting all products, that must be removed.
- $newline = $installer::globals::upgradecode . "\t" . $installer::globals::msimajorproductversion . "\t" . $installer::globals::msiproductversion . "\t" . "\t" . "257" . "\t" . "\t" . "OLDPRODUCTSSAMEMAJOR" . "\n";
+ # $newline = $installer::globals::upgradecode . "\t" . $installer::globals::msimajorproductversion . "\t" . $installer::globals::msiproductversion . "\t" . "\t" . "257" . "\t" . "\t" . "OLDPRODUCTSSAMEMAJOR" . "\n";
+ $newline = $installer::globals::upgradecode . "\t" . $installer::globals::msimajorproductversion . "\t" . $installer::globals::msiproductversion . "\t" . "\t" . "769" . "\t" . "\t" . "OLDPRODUCTSSAMEMAJOR" . "\n";
push(@upgradetable, $newline);
if ( ! $installer::globals::patch )
@@ -70,8 +71,8 @@ sub create_upgrade_table
$newline = $installer::globals::upgradecode . "\t" . $installer::globals::msiproductversion . "\t" . $ooomaxnew . "\t" . "\t" . "2" . "\t" . "\t" . "NEWPRODUCTS" . "\n";
push(@upgradetable, $newline);
- $newline = $installer::globals::upgradecode . "\t" . $installer::globals::msiproductversion . "\t" . $ooomaxnew . "\t" . "\t" . "258" . "\t" . "\t" . "SAMEPRODUCTS" . "\n";
- push(@upgradetable, $newline);
+ # $newline = $installer::globals::upgradecode . "\t" . $installer::globals::msiproductversion . "\t" . $ooomaxnew . "\t" . "\t" . "258" . "\t" . "\t" . "SAMEPRODUCTS" . "\n";
+ # push(@upgradetable, $newline);
if ( $include_ooo_fix )
{
@@ -93,7 +94,7 @@ sub create_upgrade_table
# also searching for the beta
- if (( $allvariableshashref->{'BETAUPGRADECODE'} ) && ( ! $installer::globals::languagepack ))
+ if (( $allvariableshashref->{'BETAUPGRADECODE'} ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ))
{
$newline = $allvariableshashref->{'BETAUPGRADECODE'} . "\t" . "1.0" . "\t" . "\t" . "\t" . "1" . "\t" . "\t" . "BETAPRODUCTS" . "\n";
push(@upgradetable, $newline);
@@ -101,7 +102,7 @@ sub create_upgrade_table
# also searching for the stub
- if (( $allvariableshashref->{'STUBUPGRADECODE'} ) && ( ! $installer::globals::languagepack ))
+ if (( $allvariableshashref->{'STUBUPGRADECODE'} ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ))
{
$newline = $allvariableshashref->{'STUBUPGRADECODE'} . "\t" . "1.0" . "\t" . "\t" . "\t" . "1" . "\t" . "\t" . "STUBPRODUCTS" . "\n";
push(@upgradetable, $newline);
@@ -109,7 +110,7 @@ sub create_upgrade_table
# searching for all older patches and languagepacks (defined in a extra file)
- if (( $allvariableshashref->{'REMOVE_UPGRADE_CODE_FILE'} ) && ( ! $installer::globals::languagepack ))
+ if (( $allvariableshashref->{'REMOVE_UPGRADE_CODE_FILE'} ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ))
{
my $filename = $allvariableshashref->{'REMOVE_UPGRADE_CODE_FILE'};
my $langpackcodefilename = $installer::globals::idttemplatepath . $installer::globals::separator . $filename;
@@ -124,7 +125,7 @@ sub create_upgrade_table
# No upgrade for Beta versions!
- if (( $allvariableshashref->{'PRODUCTEXTENSION'} eq "Beta" ) && ( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ))
+ if (( $allvariableshashref->{'PRODUCTEXTENSION'} eq "Beta" ) && ( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ))
{
@upgradetable = ();
installer::windows::idtglobal::write_idt_header(\@upgradetable, "upgrade");
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 564a8cb71da7..d3b96d155e59 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -31,6 +31,7 @@ use Cwd;
use File::Copy;
use File::stat;
use File::Temp qw(tmpnam);
+use File::Path;
use installer::control;
use installer::converter;
use installer::existence;
@@ -38,7 +39,6 @@ use installer::exiter;
use installer::files;
use installer::globals;
use installer::logger;
-use installer::mail;
use installer::pathanalyzer;
use installer::scpzipfiles;
use installer::scriptitems;
@@ -104,13 +104,6 @@ sub copy_install_sets_to_ship
installer::logger::print_message( "... copy installation set from " . $destdir . " to " . $localshipinstalldir . "\n" );
installer::systemactions::copy_complete_directory($destdir, $localshipinstalldir);
- if (( ! $installer::globals::iswindowsbuild ) && ( $installer::globals::addjavainstaller ))
- {
- # Setting Unix rights for Java starter ("setup")
- my $localcall = "chmod 775 $localshipinstalldir/setup \>\/dev\/null 2\>\&1";
- system($localcall);
- }
-
# unpacking the tar.gz file for Solaris
if ( $installer::globals::issolarisbuild ) { unpack_all_targzfiles_in_directory($localshipinstalldir); }
@@ -184,17 +177,6 @@ sub make_checksum_file
my $checksumfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$installer::globals::checksumfile, $includepatharrayref, 1);
if ( $$checksumfileref eq "" ) { installer::exiter::exit_program("ERROR: Could not find file $installer::globals::checksumfile !", "make_checksum_file"); }
-# # very slow on Windows
-# for ( my $i = 0; $i <= $#{$filesref}; $i++ )
-# {
-# my $onefile = ${$filesref}[$i];
-# my $systemcall = "$$checksumfileref $onefile->{'sourcepath'} |";
-# open (CHECK, "$systemcall");
-# my $localchecksum = <CHECK>;
-# close (CHECK);
-# push(@checksum, $localchecksum);
-# }
-
my $systemcall = "$$checksumfileref";
for ( my $i = 0; $i <= $#{$filesref}; $i++ )
@@ -429,12 +411,11 @@ sub analyze_and_save_logfile
my $contains_error = installer::control::check_logfile(\@installer::globals::logfileinfo);
- # Dependent from the success, the installation directory can be renamed and mails can be send.
+ # Dependent from the success, the installation directory can be renamed.
if ( $contains_error )
{
my $errordir = installer::systemactions::rename_string_in_directory($installdir, "_inprogress", "_witherror");
- if ( $installer::globals::updatepack ) { installer::mail::send_fail_mail($allsettingsarrayref, $languagestringref, $errordir); }
# Error output to STDERR
for ( my $j = 0; $j <= $#installer::globals::errorlogfileinfo; $j++ )
{
@@ -460,7 +441,6 @@ sub analyze_and_save_logfile
if ( $installdir =~ /_packed/ ) { $destdir = installer::systemactions::rename_string_in_directory($installdir, "_inprogress", ""); }
else { $destdir = installer::systemactions::rename_string_in_directory($installdir, "_inprogress", "_packed"); }
}
- installer::mail::send_success_mail($allsettingsarrayref, $languagestringref, $destdir);
}
else
{
@@ -486,7 +466,7 @@ 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.
+ # Exiting the packaging process, if an error occurred.
# 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
@@ -563,45 +543,8 @@ sub clean_jds_temp_dirs
}
###########################################################
-# Copying a reference array
-###########################################################
-
-sub copy_array_from_references
-{
- my ( $arrayref ) = @_;
-
- my @newarray = ();
-
- for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
- {
- push(@newarray, ${$arrayref}[$i]);
- }
-
- return \@newarray;
-}
-
-###########################################################
-# Copying a reference hash
-###########################################################
-
-sub copy_hash_from_references
-{
- my ($hashref) = @_;
-
- my %newhash = ();
- my $key;
-
- foreach $key (keys %{$hashref})
- {
- $newhash{$key} = $hashref->{$key};
- }
-
- return \%newhash;
-}
-
-###########################################################
# Setting one language in the language independent
-# array of include pathes with $(LANG)
+# array of include paths with $(LANG)
###########################################################
sub get_language_specific_include_pathes
@@ -773,9 +716,16 @@ sub install_simple ($$$$$$)
if ((!($dir =~ /\bPREDEFINED_/ )) || ( $dir =~ /\bPREDEFINED_PROGDIR\b/ ))
{
- # printf "mkdir $destdir$onedir->{'HostName'}\n";
- mkdir $destdir . $onedir->{'HostName'};
- push @lines, "%dir " . $onedir->{'HostName'} . "\n";
+ my $hostname = $onedir->{'HostName'};
+
+ # ignore '.' subdirectories
+ next if ( $hostname =~ m/\.$/ );
+ # remove './' from the path
+ $hostname =~ s/\.\///g;
+
+ # printf "mkdir $destdir$hostname\n";
+ mkdir $destdir . $hostname;
+ push @lines, "%dir " . $hostname . "\n";
}
}
@@ -792,13 +742,23 @@ sub install_simple ($$$$$$)
$destination =~ s/\$\$/\$/;
$sourcepath =~ s/\$\$/\$/;
+ # remove './' from the path
+ $sourcepath =~ s/\.\///g;
+ $destination =~ s/\.\///g;
+
push @lines, "$destination\n";
- # printf "cp $sourcepath $destdir$destination\n";
+ if(-d "$destdir$destination"){
+ rmtree("$destdir$destination");
+ }
+ if(-e "$destdir$destination") {
+ unlink "$destdir$destination";
+ }
+
copy ("$sourcepath", "$destdir$destination") || die "Can't copy file: $sourcepath -> $destdir$destination $!";
my $sourcestat = stat($sourcepath);
utime ($sourcestat->atime, $sourcestat->mtime, "$destdir$destination");
chmod (oct($unixrights), "$destdir$destination") || die "Can't change permissions: $!";
- push @lines, "$destination\n";
+ push @lines, "$destination\n";
}
for ( my $i = 0; $i <= $#{$linksarray}; $i++ )
@@ -807,7 +767,9 @@ sub install_simple ($$$$$$)
my $destination = $onelink->{'destination'};
my $destinationfile = $onelink->{'destinationfile'};
- # print "link $destinationfile -> $destdir$destination\n";
+ if(-e "$destdir$destination") {
+ unlink "$destdir$destination";
+ }
symlink ("$destinationfile", "$destdir$destination") || die "Can't create symlink: $!";
push @lines, "$destination\n";
}
@@ -818,7 +780,6 @@ sub install_simple ($$$$$$)
my $target = $onelink->{'Target'};
my $destination = $onelink->{'destination'};
- # print "Unix link $target -> $destdir$destination\n";
`ln -sf '$target' '$destdir$destination'`;
push @lines, "$destination\n";
}
@@ -827,7 +788,6 @@ sub install_simple ($$$$$$)
{
my $filelist;
my $fname = $installer::globals::destdir . "/$packagename";
- if ($installer::globals::languagepack) { $fname .= ".$languagestring"; }
open ($filelist, ">$fname") || die "Can't open $fname: $!";
print $filelist @lines;
close ($filelist);
@@ -1223,7 +1183,7 @@ sub select_patch_items_without_name
}
###########################################################
-# Selecting patch items
+# Selecting langpack items
###########################################################
sub select_langpack_items
@@ -1248,6 +1208,31 @@ sub select_langpack_items
}
###########################################################
+# Selecting helppack items
+###########################################################
+
+sub select_helppack_items
+{
+ my ( $itemsref, $itemname ) = @_;
+
+ installer::logger::include_header_into_logfile("Selecting RegistryItems for Help Packs");
+
+ my @itemsarray = ();
+
+ for ( my $i = 0; $i <= $#{$itemsref}; $i++ )
+ {
+ my $oneitem = ${$itemsref}[$i];
+
+ # Items with style "HELPPACK" have to be included into the patch
+ my $styles = "";
+ if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
+ if (( $styles =~ /\bHELPPACK\b/ ) || ( $styles =~ /\bFORCEHELPPACK\b/ )) { push(@itemsarray, $oneitem); }
+ }
+
+ return \@itemsarray;
+}
+
+###########################################################
# Searching if LICENSE and README, which are not removed
# in select_patch_items are really needed for the patch.
# If not, they are removed now.
@@ -1491,7 +1476,6 @@ sub reorg_patchfile
for ( my $j = 0; $j <= $#{$patchfiles}; $j++ )
{
- # "\tXXXXX\t" . $olddestination . "\n";
if ( ${$patchfiles}[$j] =~ /^\s*(.*?)\s*\tXXXXX\t\Q$directory\E\s*$/ )
{
$line = $1 . "\n";
@@ -1625,7 +1609,6 @@ sub prepare_windows_patchfiles
my $patchfilename2 = "patchmsi.dll";
if ( ! $allvariableshashref->{'WINDOWSPATCHLEVEL'} ) { installer::exiter::exit_program("ERROR: No Windows patch level defined in list file (WINDOWSPATCHLEVEL) !", "prepare_windows_patchfiles"); }
- # my $windowspatchlevel = $allvariableshashref->{'WINDOWSPATCHLEVEL'};
my $windowspatchlevel = $installer::globals::buildid;
# the environment variable CWS_WORK_STAMP is set only in CWS
@@ -1701,9 +1684,6 @@ sub prepare_windows_patchfiles
$infoline = "Size of patch file list: $filesize\n\n";
push( @installer::globals::logfileinfo, $infoline);
installer::logger::print_message( "... size of patch list file: $filesize Byte ... \n" );
-
- # Win 98: Maximum size of ini file is 65 kB
- # if ( $filesize > 64000 ) { installer::exiter::exit_program("ERROR: Maximum size of patch file list is 65 kB (Win98), now reached: $filesize Byte !", "prepare_windows_patchfiles"); }
}
}
@@ -1721,7 +1701,8 @@ sub replace_variables_in_string
{
my $key;
- foreach $key (keys %{$variableshashref})
+ # we want to substitute FOO_BR before FOO to avoid floating _BR suffixes
+ foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
{
my $value = $variableshashref->{$key};
$key = "\%" . $key;
@@ -1767,14 +1748,9 @@ sub get_all_files_from_filelist
my @allpackages = ();
- for ( my $i = 0; $i <= $#{$listfile}; $i++ )
- {
- my $line = ${$listfile}[$i];
- if ( $line =~ /^\s*\#/ ) { next; } # this is a comment line
- if ( $line =~ /^\s*$/ ) { next; } # empty line
- $line =~ s/^\s*//;
- $line =~ s/\s*$//;
- push(@allpackages, $line);
+ for (@{$listfile}) {
+ next unless /^\s*([^#].*?)\s*$/;
+ push @allpackages, $1;
}
return \@allpackages;
@@ -1860,7 +1836,7 @@ sub get_all_packages_in_installdir
my @allpackages = ();
my $allpackages = \@allpackages;
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
$allpackages = installer::systemactions::find_file_with_file_extension("rpm", $directory);
}
@@ -1930,7 +1906,7 @@ sub copy_all_packages
if ( ! is_matching($packagename, $allexcludepackages ) )
{
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
my $sourcepackage = $sourcedir . $installer::globals::separator . $packagename;
my $destfile = $destdir . $installer::globals::separator . $packagename;
@@ -1942,8 +1918,6 @@ sub copy_all_packages
{
my $destinationdir = $destdir . $installer::globals::separator . $packagename;
if ( ! -d $onepackage ) { installer::exiter::exit_program("ERROR: Could not find Solaris package $onepackage!", "copy_all_packages"); }
- # installer::systemactions::hardlink_complete_directory($onepackage, $destinationdir);
- # installer::systemactions::copy_complete_directory($onepackage, $destinationdir);
my $systemcall = "cp -p -R $onepackage $destinationdir";
make_systemcall($systemcall);
@@ -2108,8 +2082,6 @@ sub check_jds_language
my $infoline = "";
- # languagesarrayref and $allvariableshashref->{'JDSLANG'}
-
if ( ! $allvariableshashref->{'JDSLANG'} ) { installer::exiter::exit_program("ERROR: For building JDS installation sets \"JDSLANG\" must be defined!", "check_jds_language"); }
my $languagestring = $allvariableshashref->{'JDSLANG'};
@@ -2207,8 +2179,7 @@ sub put_scpactions_into_installset
if ( $onescpaction->{'UnixRights'} )
{
- my $localcall = "chmod $onescpaction->{'UnixRights'} $destfile \>\/dev\/null 2\>\&1";
- system($localcall);
+ chmod oct($onescpaction->{'UnixRights'}), $destfile;
}
}
@@ -2273,7 +2244,6 @@ sub get_platform_name
}
else
{
- # $platformname = $installer::globals::packageformat;
$platformname = $installer::globals::compiler;
}
@@ -2295,7 +2265,7 @@ sub add_variables_from_inc_to_hashref
my $includefilelist = "";
if ( $allvariables->{'ADD_INCLUDE_FILES'} ) { $includefilelist = $allvariables->{'ADD_INCLUDE_FILES'}; }
- my $includefiles = installer::converter::convert_stringlist_into_array_without_linebreak_and_quotes(\$includefilelist, ",");
+ my $includefiles = installer::converter::convert_stringlist_into_array_without_newline(\$includefilelist, ",");
for ( my $i = 0; $i <= $#{$includefiles}; $i++ )
{
@@ -2341,7 +2311,7 @@ sub add_variables_from_inc_to_hashref
}
##############################################
-# Collecting all files from include pathes
+# Collecting all files from include paths
##############################################
sub collect_all_files_from_includepathes
@@ -2349,7 +2319,7 @@ sub collect_all_files_from_includepathes
my ($patharrayref) = @_;
installer::logger::globallog("Reading all directories: Start");
- installer::logger::print_message( "... reading include pathes ...\n" );
+ installer::logger::print_message( "... reading include paths ...\n" );
# empty the global
@installer::globals::allincludepathes =();
@@ -2369,7 +2339,6 @@ sub collect_all_files_from_includepathes
my @sourcefiles = ();
my $pathstring = "";
- # installer::systemactions::read_complete_directory($includepath, $pathstring, \@sourcefiles);
installer::systemactions::read_full_directory($includepath, $pathstring, \@sourcefiles);
if ( ! ( $#sourcefiles > -1 ))
@@ -2424,9 +2393,6 @@ sub find_file_by_id
}
}
- # It does not need to exist. For example products that do not contain the libraries.
- # if (! $foundfile ) { installer::exiter::exit_program("ERROR: No unique file name found for $filename !", "get_selfreg_file"); }
-
if (! $foundfile ) { $onefile = ""; }
return $onefile;
@@ -2974,7 +2940,6 @@ sub resolving_hidden_flag
if ( $copysuccess )
{
- # $onefile->{'Name'} = $newfilename;
$onefile->{'sourcepath'} = $destfile;
$destination = $onefile->{'destination'};
installer::pathanalyzer::get_path_from_fullqualifiedname(\$destination);
@@ -3132,8 +3097,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 . ".txt";
+ # 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);
@@ -3184,7 +3149,6 @@ sub tar_package
if ( $getuidlibrary ne "" ) { $ldpreloadstring = "LD_PRELOAD=" . $getuidlibrary; }
my $systemcall = "cd $installdir; $ldpreloadstring tar -cf - $packagename > $tarfilename";
- # my $systemcall = "cd $installdir; $ldpreloadstring tar -cf - * > $tarfilename";
my $returnvalue = system($systemcall);
@@ -3202,8 +3166,7 @@ sub tar_package
push( @installer::globals::logfileinfo, $infoline);
}
- my $localcall = "chmod 775 $tarfilename \>\/dev\/null 2\>\&1";
- $returnvalue = system($localcall);
+ chmod 0775, $tarfilename;
my $fulltarfile = $installdir . $installer::globals::separator . $tarfilename;
my $filesize = ( -s $fulltarfile );
@@ -3240,8 +3203,7 @@ sub untar_package
push( @installer::globals::logfileinfo, $infoline);
}
- my $localcall = "chmod 775 $tarfilename \>\/dev\/null 2\>\&1";
- $returnvalue = system($localcall);
+ chmod 0775, $tarfilename;
}
#########################################################
@@ -3252,32 +3214,12 @@ sub shuffle_array
{
my ( $arrayref ) = @_;
- # my $counter = 0;
- # my $infoline = "Old package order: \n";
- # push( @installer::globals::logfileinfo, $infoline);
- # foreach my $onepackage ( @{$arrayref} )
- # {
- # $counter++;
- # $infoline = "$counter: $onepackage->{'module'}\n";
- # push( @installer::globals::logfileinfo, $infoline);
- # }
-
my $i = @$arrayref;
while (--$i)
{
my $j = int rand ($i+1);
@$arrayref[$i,$j] = @$arrayref[$j,$i];
}
-
- # $counter = 0;
- # $infoline = "New package order: \n";
- # push( @installer::globals::logfileinfo, $infoline);
- # foreach my $onepackage ( @{$arrayref} )
- # {
- # $counter++;
- # $infoline = "$counter: $onepackage->{'module'}\n";
- # push( @installer::globals::logfileinfo, $infoline);
- # }
}
################################################
@@ -3427,7 +3369,6 @@ sub collectpackagemaps
# Create a tar gz file with all package maps
my $tarfilename = $subdirname . ".tar";
my $targzname = $tarfilename . ".gz";
- # my $systemcall = "cd $pkgmapdir; tar -cf - $subdirname > $tarfilename";
$systemcall = "cd $pkgmapdir; tar -cf - $subdirname | gzip > $targzname";
make_systemcall($systemcall);
installer::systemactions::remove_complete_directory($pkgmapsubdir, 1);
diff --git a/solenv/bin/modules/installer/xpdinstaller.pm b/solenv/bin/modules/installer/xpdinstaller.pm
index c6938292b313..3b72889d2bc1 100644
--- a/solenv/bin/modules/installer/xpdinstaller.pm
+++ b/solenv/bin/modules/installer/xpdinstaller.pm
@@ -109,8 +109,6 @@ sub get_module
$found = 1;
last;
}
-
- # if ( ! $found ) { installer::exiter::exit_program("ERROR: Could not find module belonging to gid $modulegid!", "get_module (xpdinstaller)"); }
}
return $searchmodule;
@@ -445,8 +443,8 @@ sub get_forceintoupdate_value
}
###################################################
-# Substituting all occurences of "<" by "&lt;"
-# and all occurences of ">" by "&gt;"
+# Substituting all occurrences of "<" by "&lt;"
+# and all occurrences of ">" by "&gt;"
###################################################
sub replace_brackets_in_string
@@ -460,7 +458,7 @@ sub replace_brackets_in_string
}
###################################################
-# Substituting all occurences of "\uUXYZ" by
+# Substituting all occurrences of "\uUXYZ" by
# "&#xUXYZ;", because the use xml saxparser does
# not know anything about this encoding. Therfore
# the xml file can keep standard encoding "UTF-8"
@@ -579,9 +577,8 @@ sub get_size_value
my $isrpmfile = 0;
if ( $packagename =~ /\.rpm\s*$/ ) { $isrpmfile = 1; }
- if (( $installer::globals::islinuxrpmbuild ) && ( $isrpmfile ))
+ if (( $installer::globals::isrpmbuild ) && ( $isrpmfile ))
{
- # if ( ! $installer::globals::rpmquerycommand ) { installer::exiter::exit_program("ERROR: rpm not found for querying packages!", "get_size_value"); }
if ( ! $installer::globals::rpmquerycommand ) { $installer::globals::rpmquerycommand = "rpm"; }
my $systemcall = "$installer::globals::rpmquerycommand -qp --queryformat \"\[\%\{FILESIZES\}\\n\]\" $packagename 2\>\&1 |";
@@ -658,7 +655,7 @@ sub get_md5_value
return $value;
}
- if ( $installer::globals::islinuxrpmbuild )
+ if ( $installer::globals::isrpmbuild )
{
my $md5file = "/usr/bin/md5sum";
@@ -712,7 +709,7 @@ sub get_fullpkgname_value
my $isrpmfile = 0;
if ( $packagename =~ /\.rpm\s*$/ ) { $isrpmfile = 1; }
- if (( $installer::globals::islinuxrpmbuild ) && ( $isrpmfile ))
+ if (( $installer::globals::isrpmbuild ) && ( $isrpmfile ))
{
if ( $xpdinfo->{'FullPackageName'} )
{
@@ -720,7 +717,6 @@ sub get_fullpkgname_value
return $value;
}
- # if ( ! $installer::globals::rpmquerycommand ) { installer::exiter::exit_program("ERROR: rpm not found for querying packages!", "get_fullpkgname_value"); }
if ( ! $installer::globals::rpmquerycommand ) { $installer::globals::rpmquerycommand = "rpm"; }
my $systemcall = "$installer::globals::rpmquerycommand -qp $packagename |";
my $ld_library_backup = $ENV{LD_LIBRARY_PATH};
@@ -888,7 +884,7 @@ sub make_systemcall
{
$infoline = "ERROR: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
- $error_occured = 1;
+ $error_occurred = 1;
}
else
{
@@ -931,13 +927,13 @@ sub make_systemcall_allowing_error
{
$infoline = "WARNING: Failed system call: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
- $error_occured = 1;
+ $error_occurred = 1;
}
else
{
$infoline = "ERROR: $systemcall\n";
push( @installer::globals::logfileinfo, $infoline);
- $error_occured = 1;
+ $error_occurred = 1;
}
}
else
@@ -1076,7 +1072,6 @@ sub set_productdir_tag
if ( $allvariables->{"BRANDPACKAGEVERSION"} )
{
$productdir = $productdir . $allvariables->{"BRANDPACKAGEVERSION"};
-# if ( $allvariables->{"LCPRODUCTEXTENSION"} ) { $productdir = $productdir . $allvariables->{"LCPRODUCTEXTENSION"}; }
}
else
{
@@ -1487,7 +1482,6 @@ sub create_emptyparents_xpd_file
push(@installer::globals::logfileinfo, $infoline);
}
- # push(@installer::globals::emptyxpdparents, $parentgid);
push( @installer::globals::createdxpdfiles, $parentgid);
return $grandpagid;
@@ -1558,7 +1552,6 @@ sub create_xpd_file
my $xpddir = installer::systemactions::create_directories("xpdinstaller", $languagestringref);
$xpddir =~ s/\/\s*$//;
$installer::globals::xpddir = $xpddir;
- # push(@installer::globals::removedirs, $xpddir);
my $modulegid = $onepackage->{'module'};
@@ -1616,7 +1609,6 @@ sub create_xpd_file
{
my $create_missing_parent = is_empty_parent($parentgid, $allpackages);
- # if (( $create_missing_parent ) && ( ! installer::existence::exists_in_array($parentgid, \@installer::globals::emptyxpdparents) ))
if (( $create_missing_parent ) && ( ! installer::existence::exists_in_array($parentgid, \@installer::globals::createdxpdfiles) ))
{
$grandpagid = create_emptyparents_xpd_file($parentgid, $modulesarrayref, $xpddir);
@@ -1627,7 +1619,6 @@ sub create_xpd_file
{
my $create_missing_parent = is_empty_parent($grandpagid, $allpackages);
- # if (( $create_missing_parent ) && ( ! installer::existence::exists_in_array($parentgid, \@installer::globals::emptyxpdparents) ))
if (( $create_missing_parent ) && ( ! installer::existence::exists_in_array($grandpagid, \@installer::globals::createdxpdfiles) ))
{
create_emptyparents_xpd_file($grandpagid, $modulesarrayref, $xpddir);
@@ -1671,7 +1662,6 @@ sub create_xpd_file_for_childproject
if ( $parentgid ne "root" )
{
- # my $create_missing_parent = is_empty_parent($parentgid, $allpackages);
my $create_missing_parent = 1; # -> Always missing parent by child projects!
# Parent is now created, if it was not created before. Attention: Parent module must not come later.
if (( $create_missing_parent ) && ( ! installer::existence::exists_in_array($parentgid, \@installer::globals::createdxpdfiles) ))
@@ -1698,12 +1688,10 @@ sub create_xpd_file_for_systemintegration
{
my $newpackagename = ${$newcontent}[$i];
- # installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newpackagename);
-
my $infoline = "Creating xpd file for package: $newpackagename\n";
push( @installer::globals::logfileinfo, $infoline);
- my $childmodule = installer::worker::copy_hash_from_references($module);
+ my $childmodule = {%{$module}};
$childmodule->{'ParentID'} = $module->{'gid'}; # the module gid is the new parent
$childmodule->{'InstallOrder'} = $installer::globals::defaultsystemintinstallorder;
my $number = $i + 1;
diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm
index 9a5460cacb3c..d52e97bf4e87 100644
--- a/solenv/bin/modules/installer/ziplist.pm
+++ b/solenv/bin/modules/installer/ziplist.pm
@@ -464,7 +464,7 @@ sub replace_all_variables_in_pathes
my $key;
- foreach $key (keys %{$variableshashref})
+ foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
{
my $value = $variableshashref->{$key};
@@ -489,18 +489,8 @@ sub replace_minor_in_pathes
{
my $line = ${$patharrayref}[$i];
- if ( ! defined $ENV{CWS_WORK_STAMP} and defined $ENV{UPDMINOR} )
-# if ( $installer::globals::minor )
- {
- $line =~ s/\{minor\}/$installer::globals::minor/g;
- # no difference for minor and minornonpre (ToDo ?)
- $line =~ s/\{minornonpre\}/$installer::globals::minor/g;
- }
- else # building without a minor
- {
- $line =~ s/\.\{minor\}//g;
- $line =~ s/\.\{minornonpre\}//g;
- }
+ $line =~ s/\.\{minor\}//g;
+ $line =~ s/\.\{minornonpre\}//g;
${$patharrayref}[$i] = $line;
}
@@ -643,7 +633,7 @@ sub set_manufacturer
{
my ($allvariables) = @_;
- my $openofficeproductname = "OpenOffice.org";
+ my $openofficeproductname = "LibreOffice";
my $sunname = "";
@@ -793,6 +783,7 @@ sub add_variables_to_allvariableshashref
if ( $installer::globals::patch ) { $variableshashref->{'PRODUCTADDON'} = $installer::globals::patchaddon; }
elsif ( $installer::globals::languagepack ) { $variableshashref->{'PRODUCTADDON'} = $installer::globals::languagepackaddon; }
+ elsif ( $installer::globals::helppack ) { $variableshashref->{'PRODUCTADDON'} = $installer::globals::helppackpackaddon; }
else { $variableshashref->{'PRODUCTADDON'} = ""; }
my $localbuild = $installer::globals::build;