diff -urN ooo-build-1.1.54.org/bin/package-lang ooo-build-1.1.54/bin/package-lang --- ooo-build-1.1.54.org/bin/package-lang 2004-04-30 02:50:20.000000000 +0200 +++ ooo-build-1.1.54/bin/package-lang 2004-05-03 15:29:28.605269720 +0200 @@ -27,6 +27,7 @@ } my $UnzipCommand = "/usr/bin/unzip"; +my $BuildDir = $setup_vars{'BUILDDIR'}; my $DestDir = $setup_vars{'OOINSTDIR'}; my $Xlate = $setup_vars{'TOOLSDIR'}. "/bin/openoffice-xlate-lang"; my @Langs = split (' ', `$Xlate -p all`); @@ -117,6 +118,9 @@ sub BuildLang { my $lang = shift; + my $lang_iso = `$Xlate -i $lang`; + chomp ($lang_iso); + $lang_iso =~ s/\r//; my $SetupDir = $setup_vars{'OOBUILDDIR'} . "/instsetoo/$Target/$lang/normal"; my $SolverDir = $setup_vars{'OOBUILDDIR'} . "/solver/$Id/$Target"; my $SetupConf = "$SetupDir/setup.ins"; @@ -135,6 +139,9 @@ die "$UnzipCommand not found, please set the full path to the unzip command\n" if ( ! -x "$UnzipCommand" ); + $langl_file = $BuildDir . '/lang_' . $lang_iso . '_list.txt'; + open(LANGL, ">>$langl_file"); + while (my ($key, $value) = each (%{$setup->{File}})) { if ($value->{PackedName}) { # Find language-specific candidates @@ -152,6 +159,8 @@ if( -f $destFile ) { unlink $destFile or die "Can't delete $destFile"; } + + print LANGL "$destFile\n"; # Try to link file first if(link($fileToCopy,$destFile)) { @@ -165,6 +174,16 @@ else { my $fileToUnzip = $SolverDir . '/pck/' . $value->{Name}; if( -r $fileToUnzip ) { + + open(UNZIP, "$UnzipCommand -qq -l $fileToUnzip |"); + while () { + # 907346 08-19-03 20:29 th_fr_FR.dat + if ($_ =~ m/\s+\d+\s+\d+-\d+-\d+\s+\d+:\d+\s+(\S+)/m) { + print LANGL "$outpath/$1\n"; + } + } + close(UNZIP); + $action = "Unzip"; system("$UnzipCommand -qq -o $fileToUnzip -d $outpath"); } @@ -176,12 +195,15 @@ } } } + close(LANGL); print "done"; return 0; } +system("rm -f $BuildDir/lang_*_list.txt"); + for $a (@Langs) { $a eq '01' && next; # English built-in