diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-06-07 10:13:44 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-06-07 10:13:44 +0200 |
commit | 0b12767776118542325ed6b220d30d3a1b51cae1 (patch) | |
tree | 44ece782ab5971df4de72f2a0128ef5388742a31 /solenv/bin/modules/installer | |
parent | 9170a5e1d600487f21eb54482c244fbf9590aedd (diff) | |
parent | 0770b2664645eca8a6669bb134ab9a59349ff0b6 (diff) |
jl152 merge with DEV300_m80
Diffstat (limited to 'solenv/bin/modules/installer')
-rw-r--r-- | solenv/bin/modules/installer/archivefiles.pm | 24 | ||||
-rw-r--r-- | solenv/bin/modules/installer/environment.pm | 2 | ||||
-rw-r--r-- | solenv/bin/modules/installer/epmfile.pm | 19 | ||||
-rw-r--r-- | solenv/bin/modules/installer/globals.pm | 3 | ||||
-rw-r--r-- | solenv/bin/modules/installer/scriptitems.pm | 22 | ||||
-rw-r--r-- | solenv/bin/modules/installer/setupscript.pm | 6 | ||||
-rw-r--r-- | solenv/bin/modules/installer/simplepackage.pm | 16 | ||||
-rw-r--r-- | solenv/bin/modules/installer/systemactions.pm | 7 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/idtglobal.pm | 8 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/property.pm | 18 | ||||
-rw-r--r-- | solenv/bin/modules/installer/worker.pm | 14 | ||||
-rw-r--r-- | solenv/bin/modules/installer/ziplist.pm | 8 |
12 files changed, 120 insertions, 27 deletions
diff --git a/solenv/bin/modules/installer/archivefiles.pm b/solenv/bin/modules/installer/archivefiles.pm index 6398494b8fdb..e85903c699aa 100644 --- a/solenv/bin/modules/installer/archivefiles.pm +++ b/solenv/bin/modules/installer/archivefiles.pm @@ -50,18 +50,26 @@ sub put_language_into_name my $filename = ""; my $extension = ""; - if ( $oldname =~ /^\s*(.*)(\..*?)\s*$/ ) # files with extension + if ( $oldname =~ /en-US/ ) # files, that contain the language in the file name { - $filename = $1; - $extension = $2; + $newname = $oldname; + $newname =~ s/en-US/$onelanguage/; } - else + else # files, that do not contain the language in the file name { - $filename = $oldname; - $extension = ""; - } + if ( $oldname =~ /^\s*(.*)(\..*?)\s*$/ ) # files with extension + { + $filename = $1; + $extension = $2; + } + else + { + $filename = $oldname; + $extension = ""; + } - $newname = $1 . "_" . $onelanguage . $2; + $newname = $1 . "_" . $onelanguage . $2; + } return $newname; } diff --git a/solenv/bin/modules/installer/environment.pm b/solenv/bin/modules/installer/environment.pm index 2ee6fd41af47..b54912b72616 100644 --- a/solenv/bin/modules/installer/environment.pm +++ b/solenv/bin/modules/installer/environment.pm @@ -131,7 +131,9 @@ sub set_global_environment_variables if ( $ENV{'SOLAR_JAVA'} ) { $installer::globals::solarjavaset = 1; } if ( $ENV{'RPM'} ) { $installer::globals::rpm = $ENV{'RPM'}; } if ( $ENV{'DONTCOMPRESS'} ) { $installer::globals::solarisdontcompress = 1; } + if (( $ENV{'DISABLE_STRIP'} ) && ( $ENV{'DISABLE_STRIP'} ne '' )) { $installer::globals::strip = 0; } + if ( $installer::globals::localinstalldir ) { $installer::globals::localinstalldirset = 1; } # Special handling, if LOCALINSTALLDIR contains "~" in the path if ( $installer::globals::localinstalldir =~ /^\s*\~/ ) { check_tilde_in_directory(); } } diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm index ffe79136b57e..136eca913dd9 100644 --- a/solenv/bin/modules/installer/epmfile.pm +++ b/solenv/bin/modules/installer/epmfile.pm @@ -426,6 +426,17 @@ sub create_epm_header } } + # Process for Linux packages, in which only a very basic license file is + # included into the package. + + if ( $installer::globals::islinuxbuild ) + { + if ( $variableshashref->{'COPYRIGHT_INTO_LINUXPACKAGE'} ) + { + $licensefilename = "linuxcopyrightfile"; + $license_in_package_defined = 1; + } + } # searching for and readme file for ( my $i = 0; $i <= $#{$filesinproduct}; $i++ ) @@ -447,7 +458,7 @@ sub create_epm_header { my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$licensefilename, "" , 0); - if ( $$fileref eq "" ) { installer::exiter::exit_program("ERROR: Could not find license file $licensefilename!", "create_epm_header"); } + if ( $$fileref eq "" ) { installer::exiter::exit_program("ERROR: Could not find license file $licensefilename (A)!", "create_epm_header"); } # Special handling to add the content of the file "license_en-US" to the solaris copyrightfile. But not for all products @@ -500,12 +511,12 @@ sub create_epm_header if (!($foundlicensefile)) { - installer::exiter::exit_program("ERROR: Could not find license file $licensefilename", "create_epm_header"); + installer::exiter::exit_program("ERROR: Could not find license file $licensefilename (B)", "create_epm_header"); } if (!($foundreadmefile)) { - installer::exiter::exit_program("ERROR: Could not find readme file $readmefilename", "create_epm_header"); + installer::exiter::exit_program("ERROR: Could not find readme file $readmefilename (C)", "create_epm_header"); } # including %replaces @@ -1436,6 +1447,8 @@ sub set_autoprovreq_in_specfile $autoreqprovline = "AutoReqProv\: no\n"; } + $autoreqprovline .= "%define _binary_filedigest_algorithm 1\n%define _binary_payload w9.gzdio\n"; + for ( my $i = 0; $i <= $#{$changefile}; $i++ ) { # Adding "autoreqprov" behind the line beginning with: Group: diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 72ab0215dbcf..5e26b604ad41 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -78,6 +78,7 @@ BEGIN "dgo", "kok", "mni", + "ca-XV", "sat", "ug", "om", @@ -235,7 +236,7 @@ BEGIN $mergefiles_added_into_collector = 0; $creating_windows_installer_patch = 0; - $strip = $ENV{DISABLE_STRIP} eq ''; + $strip = 1; $solarjava = 0; $jdklib = ""; $jrepath = ""; diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm index 778ca23e740a..cee8b1e0cfe8 100644 --- a/solenv/bin/modules/installer/scriptitems.pm +++ b/solenv/bin/modules/installer/scriptitems.pm @@ -1507,6 +1507,20 @@ sub add_License_Files_into_Installdir $newfile->{'specificlanguage'} = ""; $newfile->{'haslanguagemodule'} = "0"; + if ( defined $newfile->{'InstallName'} ) + { + if ( $newfile->{'InstallName'} =~ /^\s*(.*?)_$defaultlanguage\.?(\w*?)\s*$/ ) + { + my $localfilename = $1; + my $localextension = $2; + + if ( $localextension eq "" ) { $newfile->{'InstallName'} = $localfilename; } + else { $newfile->{'InstallName'} = $localfilename . "\." . $localextension; } + } + } + + $newfile->{'removelangfromfile'} = "1"; # Important for files with an InstallName, because language also has to be removed there. + if ( $foundofficedir ) { $newfile->{'Dir'} = $officedirectorygid; @@ -1529,6 +1543,12 @@ sub add_License_Files_into_Installdir $infoline = "New files: Adding file $newfilename for the installation root to the file list. Language: $defaultlanguage\n"; push( @installer::globals::logfileinfo, $infoline); + if ( defined $newfile->{'InstallName'} ) + { + $infoline = "New files: Using installation name: $newfile->{'InstallName'}\n"; + push( @installer::globals::logfileinfo, $infoline); + } + # Collecting license and readme file for the installation set push(@installer::globals::installsetfiles, $newfile); @@ -1860,7 +1880,7 @@ sub remove_Languagepacklibraries_from_Installset } $infoline = "\n"; - push( @installer::globals::globallogfileinfo, $infoline); + push( @installer::globals::logfileinfo, $infoline); return \@newitemsarray; } diff --git a/solenv/bin/modules/installer/setupscript.pm b/solenv/bin/modules/installer/setupscript.pm index 9da5340f915f..a3bf5abf50a9 100644 --- a/solenv/bin/modules/installer/setupscript.pm +++ b/solenv/bin/modules/installer/setupscript.pm @@ -155,6 +155,12 @@ sub add_lowercase_productname_setupscriptvariable $newline = "\%LCONEWORDPRODUCTNAME " . lc($value) . "\n"; push(@{$variablesref} ,$newline); $value = $original; + $value =~ s/\s*$//g; + $value =~ s/^\s*//g; + $value =~ s/ /\%20/g; + $newline = "\%MASKEDPRODUCTNAME " . $value . "\n"; + push(@{$variablesref} ,$newline); + $value = $original; $value =~ s/\s/\_/g; # if ( $value =~ /^\s*(.*?)\_(\w)(.*?)\_(\w)(.*)\s*$/ ) { $value = $1 . $2 . $4; } $newline = "\%UNIXPRODUCTNAME " . lc($value) . "\n"; diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm index 5c2e4b62405e..fdf9fc6fa4c3 100644 --- a/solenv/bin/modules/installer/simplepackage.pm +++ b/solenv/bin/modules/installer/simplepackage.pm @@ -163,12 +163,15 @@ sub register_extensions } close (UNOPKG); - for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); } - my $returnvalue = $?; # $? contains the return value of the systemcall if ($returnvalue) { + # Writing content of @unopkgoutput only in the error case into the log file. Sometimes it + # contains strings like "Error" even in the case of success. This causes a packaging error + # when the log file is analyzed at the end, even if there is no real error. + for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); } + $infoline = "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n"; push( @installer::globals::logfileinfo, $infoline); installer::exiter::exit_program("ERROR: $systemcall failed!", "register_extensions"); @@ -422,7 +425,12 @@ sub create_package } my $sla = 'sla.r'; - my $ref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0); + my $ref = ""; + + if ( ! $allvariables->{'HIDELICENSEDIALOG'} ) + { + installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0); + } my $localtempdir = $tempdir; @@ -533,7 +541,7 @@ sub create_package } $systemcall = "cd $localtempdir && hdiutil makehybrid -hfs -hfs-openfolder $folder $folder -hfs-volume-name \"$volume_name\" -ov -o $installdir/tmp && hdiutil convert -ov -format UDZO $installdir/tmp.dmg -o $archive && "; - if ($$ref ne "") { + if (( $ref ne "" ) && ( $$ref ne "" )) { $systemcall .= "hdiutil unflatten $archive && Rez -a $$ref -o $archive && hdiutil flatten $archive &&"; } $systemcall .= "rm -f $installdir/tmp.dmg"; diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm index 4ec75f37ce02..981dc40f3209 100644 --- a/solenv/bin/modules/installer/systemactions.pm +++ b/solenv/bin/modules/installer/systemactions.pm @@ -321,6 +321,13 @@ sub create_directories else { $path = $installer::globals::unpackpath . $installer::globals::separator; + + # special handling, if LOCALINSTALLDIR is set + if (( $installer::globals::localinstalldirset ) && ( $newdirectory eq "install" )) + { + $installer::globals::localinstalldir =~ s/\Q$installer::globals::separator\E\s*$//; + $path = $installer::globals::localinstalldir . $installer::globals::separator; + } } $infoline = "create_directories: Using $path for $newdirectory !\n"; diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm index 6f03228ca10a..b82f5175250b 100644 --- a/solenv/bin/modules/installer/windows/idtglobal.pm +++ b/solenv/bin/modules/installer/windows/idtglobal.pm @@ -769,9 +769,13 @@ sub prepare_language_idt_directory installer::systemactions::create_directory($destinationdir . $installer::globals::separator . "Binary"); installer::systemactions::copy_directory($installer::globals::idttemplatepath . $installer::globals::separator . "Binary", $destinationdir . $installer::globals::separator . "Binary"); - if (( $installer::globals::patch ) && ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} )) + if ((( $installer::globals::patch ) && ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} )) || ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} )) { - my $newsourcedir = $installer::globals::unpackpath . $installer::globals::separator . $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'}; # path setting in list file dependent from unpackpath !? + my $bitmapdir = ""; + if ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} ) { $bitmapdir = $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'}; } + if ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} ) { $bitmapdir = $allvariables->{'WINDOWSBITMAPDIRECTORY'}; } + + my $newsourcedir = $installer::globals::unpackpath . $installer::globals::separator . $bitmapdir; # path setting in list file dependent from unpackpath !? $infoline = "\nOverwriting files in directory \"" . $destinationdir . $installer::globals::separator . "Binary" . "\" with files from directory \"" . $newsourcedir . "\".\n"; push( @installer::globals::logfileinfo, $infoline); if ( ! -d $newsourcedir ) diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm index 7b890d06d58f..2ef083178122 100644 --- a/solenv/bin/modules/installer/windows/property.pm +++ b/solenv/bin/modules/installer/windows/property.pm @@ -393,7 +393,23 @@ sub set_important_properties if ( $allvariables->{'HIDELICENSEDIALOG'} ) { my $onepropertyline = "HIDEEULA" . "\t" . "1" . "\n"; - push(@{$propertyfile}, $onepropertyline); + + my $already_defined = 0; + + for ( my $i = 0; $i <= $#{$propertyfile}; $i++ ) + { + if ( ${$propertyfile}[$i] =~ /^\s*HIDEEULA\t/ ) + { + ${$propertyfile}[$i] = $onepropertyline; + $already_defined = 1; + last; + } + } + + if ( ! $already_defined ) + { + push(@{$propertyfile}, $onepropertyline); + } } # Setting .NET requirements diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm index ff1d172c9b8f..e8a8f922bc41 100644 --- a/solenv/bin/modules/installer/worker.pm +++ b/solenv/bin/modules/installer/worker.pm @@ -402,11 +402,6 @@ sub create_installation_directory else { $installdir = installer::systemactions::create_directories("install", $languageref); - if ( $installer::globals::localinstalldir ) - { - $installdir = $installer::globals::localinstalldir; - $installer::globals::localinstalldirset = 1; - } installer::logger::print_message( "... creating installation set in $installdir ...\n" ); remove_old_installation_sets($installdir); my $inprogressinstalldir = $installdir . "_inprogress"; @@ -491,6 +486,12 @@ sub analyze_and_save_logfile if ( $installer::globals::creating_windows_installer_patch ) { $installer::globals::creating_windows_installer_patch = 0; } + # Exiting the packaging process, if an error occured. + # This is important, to get an error code "-1", if an error was found in the log file, + # that did not break the packaging process + + if ( ! $is_success) { installer::exiter::exit_program("ERROR: Found an error in the logfile. Packaging failed.", "analyze_and_save_logfile"); } + return ($is_success, $finalinstalldir); } @@ -3132,7 +3133,8 @@ sub put_license_into_setup # find and read english license file my $licenselanguage = "en-US"; # always english ! - my $licensefilename = "LICENSE_" . $licenselanguage; + # my $licensefilename = "LICENSE_" . $licenselanguage; + my $licensefilename = "license_" . $licenselanguage . ".txt"; my $licenseincludepatharrayref = get_language_specific_include_pathes($includepatharrayref, $licenselanguage); my $licenseref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$licensefilename, $licenseincludepatharrayref, 0); diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm index 00de1709473b..09b7718e2992 100644 --- a/solenv/bin/modules/installer/ziplist.pm +++ b/solenv/bin/modules/installer/ziplist.pm @@ -659,7 +659,7 @@ sub set_manufacturer if (( $allvariables->{'DEFINEDMANUFACTURER'} ) && ( $allvariables->{'DEFINEDMANUFACTURER'} ne "" )) { $sunname = $allvariables->{'DEFINEDMANUFACTURER'}; } else { installer::exiter::exit_program("ERROR: Property DEFINEDMANUFACTURER has to be set for this product!", "set_manufacturer"); } $installer::globals::manufacturer = $sunname; - $installer::globals::longmanufacturer = $sunname . ", Inc."; + $installer::globals::longmanufacturer = $sunname; } $allvariables->{'MANUFACTURER'} = $installer::globals::manufacturer; @@ -742,6 +742,11 @@ sub replace_variables_in_ziplist_variables my $localminor = $installer::globals::lastminor; if ( $installer::globals::minor ) { $localminor = $installer::globals::minor; } + my $buildidstringcws = $installer::globals::build . $localminor . "(Build:" . $installer::globals::buildid . ")"; + + # the environment variable CWS_WORK_STAMP is set only in CWS + if ( $ENV{'CWS_WORK_STAMP'} ) { $buildidstringcws = $buildidstringcws . "\[CWS\:" . $ENV{'CWS_WORK_STAMP'} . "\]"; } + for ( my $i = 0; $i <= $#{$blockref}; $i++ ) { if ($installer::globals::lastminor) { ${$blockref}[$i] =~ s/\{milestone\}/$milestonevariable/; } @@ -752,6 +757,7 @@ sub replace_variables_in_ziplist_variables else { ${$blockref}[$i] =~ s/\{buildid\}//; } if ( $installer::globals::build ) { ${$blockref}[$i] =~ s/\{buildsource\}/$installer::globals::build/; } else { ${$blockref}[$i] =~ s/\{build\}//; } + ${$blockref}[$i] =~ s/\{buildidcws\}/$buildidstringcws/; } } |