solenv/bin/modules/installer/globals.pm | 1 solenv/bin/modules/installer/windows/media.pm | 29 ----- solenv/bin/modules/installer/windows/msiglobal.pm | 122 ---------------------- 3 files changed, 152 deletions(-)
New commits: commit 272e59094ac1390d5fde34947c724f36d2809ce4 Author: Andras Timar <ati...@suse.com> Date: Thu Sep 20 20:51:03 2012 +0200 reduce complexity of installer maker script $one_cab_file variable was always 0, so I deleted the code dealing with the non-zero case. Change-Id: I17288070eb94dec00ce970585046da11136b78eb diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 48e377b..ab570e5 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -230,7 +230,6 @@ BEGIN %usedtreeconditions = (); %moduledestination = (); - $one_cab_file = 0; $fix_number_of_cab_files = 1; $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 diff --git a/solenv/bin/modules/installer/windows/media.pm b/solenv/bin/modules/installer/windows/media.pm index 13154c6..ad560b8 100644 --- a/solenv/bin/modules/installer/windows/media.pm +++ b/solenv/bin/modules/installer/windows/media.pm @@ -311,35 +311,6 @@ sub create_media_table } } } - elsif ( $installer::globals::one_cab_file ) - { - my %media = (); - $diskid++; - - my $maximumfile = $#{$filesref}; - - $media{'DiskId'} = get_media_diskid($diskid); - $media{'LastSequence'} = $maximumfile + 1; # This works also for unsorted file collector - $media{'DiskPrompt'} = get_media_diskprompt(); - $media{'Cabinet'} = generate_cab_filename($allvariables); - $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); - - # Saving the cabinet file name in the file collector - - $media{'Cabinet'} =~ s/^\s*\#//; # removing leading hash - - for ( my $i = 0; $i <= $#{$filesref}; $i++ ) - { - my $onefile = ${$filesref}[$i]; - $onefile->{'cabinet'} = $media{'Cabinet'}; - } - } else { installer::exiter::exit_program("ERROR: No cab file specification in globals.pm !", "create_media_table"); diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm index 1b6223d..c7bbf55 100644 --- a/solenv/bin/modules/installer/windows/msiglobal.pm +++ b/solenv/bin/modules/installer/windows/msiglobal.pm @@ -350,128 +350,6 @@ sub generate_cab_file_list push(@installer::globals::allddffiles, $ddffilename); } } - elsif (( $installer::globals::one_cab_file ) && ( $installer::globals::updatedatabase )) - { - 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; - } - - my $onefile = ${$filesref}[$sequenceorder->{$counter}]; - - $cabinetfile = $onefile->{'cabinet'}; - my $sourcepath = $onefile->{'sourcepath'}; - if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; } - my $uniquename = $onefile->{'uniquename'}; - - # to avoid lines with more than 256 characters, it can be useful to use relative paths - $sourcepath = make_relative_ddf_path($sourcepath); - - if ( $counter == 1 ) { write_ddf_file_header(\@ddffile, $cabinetfile, $installdir); } - - my $styles = ""; - my $doinclude = 1; - if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }; - if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; } - - my $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n"; - if ( $doinclude ) { push(@ddffile, $ddfline); } - - $counter++; # increasing the counter - } - - # creating the DDF file - - my $ddffilename = $cabinetfile; - $ddffilename =~ s/.cab/.ddf/; - $ddfdir =~ s/[\/\\]\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 /F " . $ddffilename . "\n"; - 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::one_cab_file ) - { - my @ddffile = (); - - my $cabinetfile = ""; - - for ( my $i = 0; $i <= $#{$filesref}; $i++ ) - { - my $onefile = ${$filesref}[$i]; - $cabinetfile = $onefile->{'cabinet'}; - my $sourcepath = $onefile->{'sourcepath'}; - if ( $^O =~ /cygwin/i ) { $sourcepath = $onefile->{'cyg_sourcepath'}; } - my $uniquename = $onefile->{'uniquename'}; - - # to avoid lines with more than 256 characters, it can be useful to use relative paths - $sourcepath = make_relative_ddf_path($sourcepath); - - if ( $i == 0 ) { write_ddf_file_header(\@ddffile, $cabinetfile, $installdir); } - - my $styles = ""; - my $doinclude = 1; - if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }; - if ( $styles =~ /\bDONT_PACK\b/ ) { $doinclude = 0; } - - my $ddfline = "\"" . $sourcepath . "\" \"" . $uniquename . "\"\n"; - if ( $doinclude ) { push(@ddffile, $ddfline); } - } - - # creating the DDF file - - my $ddffilename = $cabinetfile; - $ddffilename =~ s/.cab/.ddf/; - $ddfdir =~ s/[\/\\]\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 /F " . $ddffilename . "\n"; - if ( $installer::globals::isunix ) - { - $oneline = "$ENV{'OUTDIR_FOR_BUILD'}/bin/makecab.exe /F " . $ddffilename . "\n"; - } - - push(@cabfilelist, $oneline); - - # collecting all ddf files - push(@installer::globals::allddffiles, $ddffilename); - } else { installer::exiter::exit_program("ERROR: No cab file specification in globals.pm !", "generate_cab_file_list"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits