solenv/bin/modules/installer.pm | 1 solenv/bin/modules/installer/globals.pm | 2 solenv/bin/modules/installer/windows/file.pm | 4 solenv/bin/modules/installer/windows/media.pm | 101 --------------------- solenv/bin/modules/installer/windows/msiglobal.pm | 103 ---------------------- 5 files changed, 4 insertions(+), 207 deletions(-)
New commits: commit 1a2cd886786f52635136009ac4fd6f61e1b120bc Author: Andras Timar <ati...@suse.com> Date: Thu Sep 20 20:22:22 2012 +0200 reduce complexity of installer maker script $use_packages_for_cab and $cab_file_per_component variables were always 0, so I deleted the code dealing with the non-zero case. Change-Id: I0a678524cb308d834e4d61f2156a92400c02ae99 diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm index 71bc3c5..287291a 100644 --- a/solenv/bin/modules/installer.pm +++ b/solenv/bin/modules/installer.pm @@ -1685,7 +1685,6 @@ sub run { # if there are Merge Modules, they have to be integrated now $filesinproductlanguageresolvedarrayref = installer::windows::mergemodule::merge_mergemodules_into_msi_database($mergemodulesarrayref, $filesinproductlanguageresolvedarrayref, $msifilename, $languagestringref, $onelanguage, $languagefile, $allvariableshashref, $includepatharrayref, $allupdatesequences, $allupdatelastsequences, $allupdatediskids); - if ( $installer::globals::use_packages_for_cabs ) { installer::windows::media::create_media_table($filesinproductlanguageresolvedarrayref, $newidtdir, $allvariableshashref, $allupdatelastsequences, $allupdatediskids); } # copy msi database into installation directory diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index c99af76..48e377b 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -232,11 +232,9 @@ BEGIN $one_cab_file = 0; $fix_number_of_cab_files = 1; - $cab_file_per_component = 0; $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 = 1; - $use_packages_for_cabs = 0; $msidatabasename = ""; $prepare_winpatch = 0; $previous_idt_dir = ""; diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm index e0e4372..b62b9a5 100644 --- a/solenv/bin/modules/installer/windows/file.pm +++ b/solenv/bin/modules/installer/windows/file.pm @@ -634,10 +634,6 @@ sub get_sequence_for_file $installer::globals::newfilesexist = 1; } } - elsif (( $onefile->{'assignedsequencenumber'} ) && ( $installer::globals::use_packages_for_cabs )) - { - $sequence = $onefile->{'assignedsequencenumber'}; - } else { $sequence = $number; diff --git a/solenv/bin/modules/installer/windows/media.pm b/solenv/bin/modules/installer/windows/media.pm index 12da8a7..13154c6 100644 --- a/solenv/bin/modules/installer/windows/media.pm +++ b/solenv/bin/modules/installer/windows/media.pm @@ -245,106 +245,7 @@ sub create_media_table installer::windows::idtglobal::write_idt_header(\@mediatable, "media"); - if ( $allvariables->{'INCLUDE_CAB_IN_MSI'} ) { $installer::globals::include_cab_in_msi = 1; } - - if ( $installer::globals::use_packages_for_cabs ) - { - my $cabfile; - foreach $cabfile ( sort keys %installer::globals::lastsequence ) - { - my %media = (); - $diskid++; - - $media{'DiskId'} = get_media_diskid($diskid); - $media{'LastSequence'} = get_last_sequence($cabfile, $alludpatelastsequences); - $media{'DiskPrompt'} = get_media_diskprompt(); - $media{'Cabinet'} = get_cabfilename($cabfile); - $media{'VolumeLabel'} = get_media_volumelabel(); - $media{'Source'} = get_media_source(); - - my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t" - . $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n"; - - push(@mediatable, $oneline); - - # Comparing the disk id with the disk id from update database. Both have to be identical. New files have to be added - # to the new pff cabinet file. And existing cab files must not be removed. - if ( $installer::globals::updatedatabase ) - { - # Comparing lines in new media table with line from media table in udpate database. - if ( exists($allupdatediskids->{$media{'Cabinet'}}) ) - { - if ( $media{'DiskId'} != $allupdatediskids->{$media{'Cabinet'}} ) - { - installer::exiter::exit_program("ERROR: Different DiskIDs for cab file \"$media{'Cabinet'}\".\nCurrent installation set: \"$media{'DiskId'}\", but update database used \"$allupdatediskids->{$media{'Cabinet'}}\".\nWere cabinet files removed or added?", "create_media_table"); - } - } - else - { - my $localinfoline = "Warning: Could not find cabinet file \"$media{'Cabinet'}}\" in update database. This seems to be an new cabinet file!?\n"; - push(@installer::globals::logfileinfo, $localinfoline); - } - } - } - - # one new cabinet file for all files added after the final release - if (( $installer::globals::updatedatabase ) && ( $installer::globals::pfffileexists )) - { - my %media = (); - $diskid++; - - $media{'DiskId'} = get_media_diskid($diskid) + $installer::globals::mergemodulenumber; # Adding mergemodulenumber, because this files are included later - $media{'LastSequence'} = $installer::globals::updatesequencecounter; - $media{'DiskPrompt'} = get_media_diskprompt(); - $media{'Cabinet'} = get_cabfilename($installer::globals::pffcabfilename); - $media{'VolumeLabel'} = get_media_volumelabel(); - $media{'Source'} = get_media_source(); - - my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t" - . $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n"; - - push(@mediatable, $oneline); - } - - } - elsif ( $installer::globals::cab_file_per_component ) - { - for ( my $i = 0; $i <= $#{$filesref}; $i++ ) - { - my $onefile = ${$filesref}[$i]; - my $nextfile = ${$filesref}[$i+1]; - - my $filecomponent = ""; - my $nextcomponent = ""; - - if ( $onefile->{'componentname'} ) { $filecomponent = $onefile->{'componentname'}; } - if ( $nextfile->{'componentname'} ) { $nextcomponent = $nextfile->{'componentname'}; } - - if ( $filecomponent eq $nextcomponent ) - { - next; # nothing to do, this is not the last file of a component - } - - my %media = (); - $diskid++; - - $media{'DiskId'} = get_media_diskid($diskid); - $media{'LastSequence'} = get_media_lastsequence($onefile); - $media{'DiskPrompt'} = get_media_diskprompt(); - $media{'Cabinet'} = get_media_cabinet($diskid); - $media{'VolumeLabel'} = get_media_volumelabel(); - $media{'Source'} = get_media_source(); - - my $oneline = $media{'DiskId'} . "\t" . $media{'LastSequence'} . "\t" . $media{'DiskPrompt'} . "\t" - . $media{'Cabinet'} . "\t" . $media{'VolumeLabel'} . "\t" . $media{'Source'} . "\n"; - - push(@mediatable, $oneline); - - $media{'Cabinet'} =~ s/^\s*\#//; # removing leading hash - set_cabinetfilename_for_component_in_file_collector($media{'Cabinet'}, $filesref, $filecomponent, $i); - } - } - elsif ( $installer::globals::fix_number_of_cab_files ) + if ( $installer::globals::fix_number_of_cab_files ) { # number of cabfiles my $maxcabfilenumber = $installer::globals::number_of_cabfiles; diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm index 30af839..1b6223d 100644 --- a/solenv/bin/modules/installer/windows/msiglobal.pm +++ b/solenv/bin/modules/installer/windows/msiglobal.pm @@ -173,104 +173,7 @@ sub generate_cab_file_list if ( $^O =~ /cygwin/i ) { installer::worker::generate_cygwin_paths($filesref); } - if ( $installer::globals::use_packages_for_cabs ) - { - my $sequenceorder = get_sequenceorder($filesref); - - my $counter = 1; - my $currentcabfile = ""; - - while ( ( exists($sequenceorder->{$counter}) ) || ( exists($installer::globals::allmergemodulefilesequences{$counter}) ) ) # Taking care of files from merge modules - { - if ( exists($installer::globals::allmergemodulefilesequences{$counter}) ) - { - # Skipping this sequence, it is not included in $filesref, because it is assigned to a file from a merge module.\n"; - $counter++; - next; - } - - # Files with increasing sequencerorder are included in one cab file - my $onefile = ${$filesref}[$sequenceorder->{$counter}]; - my $cabinetfile = $onefile->{'assignedcabinetfile'}; - my $sourcepath = $onefile->{'sourcepath'}; - if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; } - my $uniquename = $onefile->{'uniquename'}; - - my $styles = ""; - my $doinclude = 1; - if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }; - if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; } - - # to avoid lines with more than 256 characters, it can be useful to use relative paths - $sourcepath = make_relative_ddf_path($sourcepath); - - # all files with the same cabinetfile have increasing sequencenumbers - - my @ddffile = (); - - write_ddf_file_header(\@ddffile, $cabinetfile, $installdir); - - my $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n"; - if ( $doinclude ) { push(@ddffile, $ddfline); } - - $counter++; # increasing the counter - my $nextfile = ""; - my $nextcabinetfile = ""; - if ( exists($sequenceorder->{$counter}) ) { $nextfile = ${$filesref}[$sequenceorder->{$counter}]; } - if ( $nextfile->{'assignedcabinetfile'} ) { $nextcabinetfile = $nextfile->{'assignedcabinetfile'}; } - - while ( $nextcabinetfile eq $cabinetfile ) - { - $sourcepath = $nextfile->{'sourcepath'}; - if ( $^O =~ /cygwin/i ) { $sourcepath = $nextfile->{'cyg_sourcepath'}; } - # to avoid lines with more than 256 characters, it can be useful to use relative paths - $sourcepath = make_relative_ddf_path($sourcepath); - $uniquename = $nextfile->{'uniquename'}; - my $localdoinclude = 1; - my $nextfilestyles = ""; - if ( $nextfile->{'Styles'} ) { $nextfilestyles = $nextfile->{'Styles'}; } - if ( $nextfilestyles =~ /\bDONT_PACK\b/ ) { $localdoinclude = 0; } - $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n"; - if ( $localdoinclude ) { push(@ddffile, $ddfline); } - - $counter++; # increasing the counter! - $nextcabinetfile = "_lastfile_"; - if ( exists($sequenceorder->{$counter}) ) - { - $nextfile = ${$filesref}[$sequenceorder->{$counter}]; - $nextcabinetfile = $nextfile->{'assignedcabinetfile'}; - } - } - - # creating the DDF file - - my $ddffilename = $cabinetfile; - $ddffilename =~ s/.cab/.ddf/; - $ddfdir =~ s/\Q$installer::globals::separator\E\s*$//; - $ddffilename = $ddfdir . $installer::globals::separator . $ddffilename; - - installer::files::save_file($ddffilename ,\@ddffile); - my $infoline = "Created ddf file: $ddffilename\n"; - push(@installer::globals::logfileinfo, $infoline); - - # lines in ddf files must not be longer than 256 characters - check_ddf_file(\@ddffile, $ddffilename); - - # Writing the makecab system call - - my $oneline = "makecab.exe /V3 /F " . $ddffilename . " 2\>\&1 |" . "\n"; - if ( $installer::globals::isunix ) - { - $oneline = "$ENV{'OUTDIR_FOR_BUILD'}/bin/makecab.exe /V3 /F " . $ddffilename . " 2\>\&1 |" . "\n"; - } - - push(@cabfilelist, $oneline); - - # collecting all ddf files - push(@installer::globals::allddffiles, $ddffilename); - } - } - elsif ((( $installer::globals::cab_file_per_component ) || ( $installer::globals::fix_number_of_cab_files )) && ( $installer::globals::updatedatabase )) + if (( $installer::globals::fix_number_of_cab_files ) && ( $installer::globals::updatedatabase )) { my $sequenceorder = get_sequenceorder($filesref); @@ -367,7 +270,7 @@ sub generate_cab_file_list push(@installer::globals::allddffiles, $ddffilename); } } - elsif (( $installer::globals::cab_file_per_component ) || ( $installer::globals::fix_number_of_cab_files )) + elsif ( $installer::globals::fix_number_of_cab_files ) { for ( my $i = 0; $i <= $#{$filesref}; $i++ ) { commit 8090b809e95d52fce2d59e7d1ec68b3869dd2d54 Author: Andras Timar <ati...@suse.com> Date: Thu Sep 20 19:09:18 2012 +0200 copy-paste error Change-Id: Ibcaf04447507926a97eed3d1cea400ac589023c2 diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm index 3583c3d..30af839 100644 --- a/solenv/bin/modules/installer/windows/msiglobal.pm +++ b/solenv/bin/modules/installer/windows/msiglobal.pm @@ -571,7 +571,7 @@ sub generate_cab_file_list } else { - installer::exiter::exit_program("ERROR: No cab file specification in globals.pm !", "create_media_table"); + installer::exiter::exit_program("ERROR: No cab file specification in globals.pm !", "generate_cab_file_list"); } installer::logger::include_timestamp_into_logfile("Performance Info: ddf file generation end"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits