diff options
author | Andras Timar <atimar@suse.com> | 2012-05-09 13:41:19 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-05-09 14:54:45 +0200 |
commit | 949e9a5c55c6ddc63e53a5e5959773ec39bd7331 (patch) | |
tree | 21bb39633a61937ffb34d2499e739279105d6b0a /solenv/bin | |
parent | Incorrect character written out when saved in HTML format (diff) | |
download | core-949e9a5c55c6ddc63e53a5e5959773ec39bd7331.tar.gz core-949e9a5c55c6ddc63e53a5e5959773ec39bd7331.zip |
partially revert 6d1f7fadc06bb57b175d5f4b94147373fc07f8a8
Change-Id: I I I0bfc367a3b2c551509b383fc4f6dcaa3cb8661f8
Diffstat (limited to 'solenv/bin')
-rw-r--r-- | solenv/bin/make_installer.pl | 16 | ||||
-rwxr-xr-x | solenv/bin/modules/installer/simplepackage.pm | 5 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/idtglobal.pm | 69 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/property.pm | 23 |
4 files changed, 113 insertions, 0 deletions
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl index baf4b08c6ae6..1413b5fb02ba 100644 --- a/solenv/bin/make_installer.pl +++ b/solenv/bin/make_installer.pl @@ -1719,6 +1719,22 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) # setting the encoding in every table (replacing WINDOWSENCODINGTEMPLATE) installer::windows::idtglobal::set_multilanguageonly_condition($languageidtdir); + # include the license text into the table Control.idt + + if ( ! $allvariableshashref->{'HIDELICENSEDIALOG'} ) + { + my $licensefilesource = installer::windows::idtglobal::get_rtflicensefilesource($onelanguage, $includepatharrayref_lang); + my $licensefile = installer::files::read_file($licensefilesource); + installer::scpzipfiles::replace_all_ziplistvariables_in_rtffile($licensefile, $allvariablesarrayref, $onelanguage, $loggingdir); + my $controltablename = $languageidtdir . $installer::globals::separator . "Control.idt"; + my $controltable = installer::files::read_file($controltablename); + installer::windows::idtglobal::add_licensefile_to_database($licensefile, $controltable); + installer::files::save_file($controltablename, $controltable); + + $infoline = "Added licensefile $licensefilesource into database $controltablename\n"; + push(@installer::globals::logfileinfo, $infoline); + } + # include a component into environment table if required installer::windows::component::set_component_in_environment_table($languageidtdir, $filesinproductlanguageresolvedarrayref); diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm index 29a98b0c1820..5f477a5c8924 100755 --- a/solenv/bin/modules/installer/simplepackage.pm +++ b/solenv/bin/modules/installer/simplepackage.pm @@ -408,6 +408,11 @@ sub create_package my $sla = 'sla.r'; my $ref = ""; + if ( ! $allvariables->{'HIDELICENSEDIALOG'} ) + { + installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0); + } + my $localtempdir = $tempdir; if (( $installer::globals::languagepack ) || ( $installer::globals::helppack ) || ( $installer::globals::patch )) diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm index cb5fa18fb4c5..176e8352e7f1 100644 --- a/solenv/bin/modules/installer/windows/idtglobal.pm +++ b/solenv/bin/modules/installer/windows/idtglobal.pm @@ -1037,6 +1037,75 @@ sub add_officedir_to_database } +############################################################## +# Including the license text into the table control.idt +############################################################## + +sub add_licensefile_to_database +{ + my ($licensefile, $controltable) = @_; + + # Nine tabs before the license text and two tabs after it + # The license text has to be included into the dialog + # LicenseAgreement into the control Memo. + + my $foundlicenseline = 0; + my ($number, $line); + + for ( my $i = 0; $i <= $#{$controltable}; $i++ ) + { + $line = ${$controltable}[$i]; + + if ( $line =~ /^\s*\bLicenseAgreement\b\t\bMemo\t/ ) + { + $foundlicenseline = 1; + $number = $i; + last; + } + } + + if (!($foundlicenseline)) + { + installer::exiter::exit_program("ERROR: Line for license file in Control.idt not found!", "add_licensefile_to_database"); + } + else + { + my %control = (); + + if ( $line =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\s*$/ ) + { + $control{'Dialog_'} = $1; + $control{'Control'} = $2; + $control{'Type'} = $3; + $control{'X'} = $4; + $control{'Y'} = $5; + $control{'Width'} = $6; + $control{'Height'} = $7; + $control{'Attributes'} = $8; + $control{'Property'} = $9; + $control{'Text'} = $10; + $control{'Control_Next'} = $11; + $control{'Help'} = $12; + } + else + { + installer::exiter::exit_program("ERROR: Could not split line correctly!", "add_licensefile_to_database"); + } + + # my $licensetext = get_rtf_licensetext($licensefile); + my $licensetext = make_string_licensetext($licensefile); + + $control{'Text'} = $licensetext; + + my $newline = $control{'Dialog_'} . "\t" . $control{'Control'} . "\t" . $control{'Type'} . "\t" . + $control{'X'} . "\t" . $control{'Y'} . "\t" . $control{'Width'} . "\t" . + $control{'Height'} . "\t" . $control{'Attributes'} . "\t" . $control{'Property'} . "\t" . + $control{'Text'} . "\t" . $control{'Control_Next'} . "\t" . $control{'Help'} . "\n"; + + ${$controltable}[$number] = $newline + } +} + ################################################################### # Determining the last position in a sequencetable # into the tables CustomAc.idt and InstallE.idt. diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm index c402de97ccb4..934802d51350 100644 --- a/solenv/bin/modules/installer/windows/property.pm +++ b/solenv/bin/modules/installer/windows/property.pm @@ -378,6 +378,29 @@ sub set_important_properties push(@{$propertyfile}, $onepropertyline); } + # No more license dialog for selected products + if ( $allvariables->{'HIDELICENSEDIALOG'} ) + { + my $onepropertyline = "HIDEEULA" . "\t" . "1" . "\n"; + + 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 if ( $installer::globals::required_dotnet_version ne "" ) { |