summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-22 12:11:50 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-22 12:11:50 +0000
commitab911f1e398d15435511f6c470a4a64919c97583 (patch)
tree95e2f523ee76b099204325f725214e2e3a87dfee
parent5533d41bcd7d845044a4d48e80f7b12c143eb81a (diff)
CWS-TOOLING: integrate CWS native236
2009-03-25 12:10:56 +0100 is r270014 : #159495# collection all pkgmap files 2009-03-25 12:10:24 +0100 is r270013 : #159495# collection all pkgmap files 2009-03-24 15:24:13 +0100 is r269960 : #i100519# fixing mac memory problem 2009-03-17 17:41:02 +0100 is r269622 : #i99316# new serbian windows encoding settings 2009-03-17 17:38:26 +0100 is r269621 : #i98906# preparing reading of font version (but not using it now) 2009-03-17 17:30:21 +0100 is r269620 : #i100251# no pool for format native
-rw-r--r--solenv/bin/make_installer.pl4
-rw-r--r--solenv/bin/modules/installer/windows/file.pm11
-rw-r--r--solenv/bin/modules/installer/windows/font.pm33
-rw-r--r--solenv/bin/modules/installer/worker.pm38
4 files changed, 82 insertions, 4 deletions
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 8d1dbed78b97..69fccd60e1a7 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -1359,7 +1359,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# try it again later.
####################################################
- if (( $installer::globals::patch ) || ( $installer::globals::languagepack )) { $allvariableshashref->{'POOLPRODUCT'} = 0; }
+ if (( $installer::globals::patch ) || ( $installer::globals::languagepack ) || ( $installer::globals::packageformat eq "native" )) { $allvariableshashref->{'POOLPRODUCT'} = 0; }
if ( $allvariableshashref->{'POOLPRODUCT'} )
{
@@ -1809,6 +1809,8 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
chdir($currentdir); # changing back into start directory
}
+ if (( $installer::globals::issolarispkgbuild ) && ( $allvariableshashref->{'COLLECT_PKGMAP'} )) { installer::worker::collectpackagemaps($installdir, $languagestringref, $allvariableshashref); }
+
#######################################################
# Analyzing the log file
#######################################################
diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm
index 505bd39979c7..e8d46c124317 100644
--- a/solenv/bin/modules/installer/windows/file.pm
+++ b/solenv/bin/modules/installer/windows/file.pm
@@ -39,6 +39,7 @@ use installer::globals;
use installer::logger;
use installer::pathanalyzer;
use installer::worker;
+use installer::windows::font;
use installer::windows::idtglobal;
use installer::windows::language;
@@ -453,7 +454,7 @@ sub get_filesize
sub get_fileversion
{
- my ($onefile, $allvariables) = @_;
+ my ($onefile, $allvariables, $styles) = @_;
my $fileversion = "";
@@ -473,6 +474,12 @@ sub get_fileversion
if ( $allvariables->{'VENDORPATCHVERSION'} ) { $vendornumber = $allvariables->{'VENDORPATCHVERSION'}; }
$fileversion = $libraryversion . "\." . $installer::globals::buildid . "\." . $vendornumber;
if ( $onefile->{'FileVersion'} ) { $fileversion = $onefile->{'FileVersion'}; } # overriding FileVersion in scp
+
+ # if ( $styles =~ /\bFONT\b/ )
+ # {
+ # my $newfileversion = installer::windows::font::get_font_version($onefile->{'sourcepath'});
+ # if ( $newfileversion != 0 ) { $fileversion = $newfileversion; }
+ # }
}
if ( $installer::globals::prepare_winpatch ) { $fileversion = ""; } # Windows patches do not allow this version # -> who says so?
@@ -803,7 +810,7 @@ sub create_files_table
$file{'FileSize'} = get_filesize($onefile);
- $file{'Version'} = get_fileversion($onefile, $allvariables);
+ $file{'Version'} = get_fileversion($onefile, $allvariables, $styles);
$file{'Language'} = get_language_for_file($onefile);
diff --git a/solenv/bin/modules/installer/windows/font.pm b/solenv/bin/modules/installer/windows/font.pm
index 86294771e56d..fec60e719150 100644
--- a/solenv/bin/modules/installer/windows/font.pm
+++ b/solenv/bin/modules/installer/windows/font.pm
@@ -80,4 +80,35 @@ sub create_font_table
}
-1; \ No newline at end of file
+#################################################################################
+# Reading the Font version from the ttf file, to avoid installation
+# of older files over newer files.
+#################################################################################
+
+sub get_font_version
+{
+ my ( $fontfile ) = @_;
+
+ if ( ! -f $fontfile ) { installer::exiter::exit_program("ERROR: Font file does not exist: \"$fontfile\"", "get_font_version"); }
+
+ my $fontversion = 0;
+ my $infoline = "";
+
+ my $onefile = installer::files::read_binary_file($fontfile);
+
+ if ( $onefile =~ /Version\s+(\d+\.\d+\.*\d*)/ )
+ {
+ $fontversion = $1;
+ $infoline = "FONT: Font \"$fontfile\" version: $fontversion\n";
+ push(@installer::globals::logfileinfo, $infoline);
+ }
+ else
+ {
+ $infoline = "FONT: Could not determine font version: \"$fontfile\"\n";
+ push(@installer::globals::logfileinfo, $infoline);
+ }
+
+ return $fontversion;
+}
+
+1;
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 1988302a1a78..5d9147409385 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -3275,4 +3275,42 @@ sub add_license_into_systemintegrationpackages
}
}
+#########################################################
+# Collecting all pkgmap files from an installation set
+#########################################################
+
+sub collectpackagemaps
+{
+ my ( $installdir, $languagestringref, $allvariables ) = @_;
+
+ installer::logger::include_header_into_logfile("Collecing all packagemaps (pkgmap):");
+
+ my $pkgmapdir = installer::systemactions::create_directories("pkgmap", $languagestringref);
+ my $subdirname = $allvariables->{'UNIXPRODUCTNAME'} . "_pkgmaps";
+ my $pkgmapsubdir = $pkgmapdir . $installer::globals::separator . $subdirname;
+ if ( -d $pkgmapsubdir ) { installer::systemactions::remove_complete_directory($pkgmapsubdir); }
+ if ( ! -d $pkgmapsubdir ) { installer::systemactions::create_directory($pkgmapsubdir); }
+
+ $installdir =~ s/\/\s*$//;
+ # Collecting all packages in $installdir and its sub package ("packages")
+ my $searchdir = $installdir . $installer::globals::separator . $installer::globals::epmoutpath;
+
+ my $allpackages = installer::systemactions::get_all_directories_without_path($searchdir);
+
+ for ( my $i = 0; $i <= $#{$allpackages}; $i++ )
+ {
+ my $pkgmapfile = $searchdir . $installer::globals::separator . ${$allpackages}[$i] . $installer::globals::separator . "pkgmap";
+ my $destfilename = $pkgmapsubdir . $installer::globals::separator . ${$allpackages}[$i] . "_pkgmap";
+ installer::systemactions::copy_one_file($pkgmapfile, $destfilename);
+ }
+
+ # 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);
+}
+
1;