Author: af
Date: Thu Nov 14 14:03:43 2013
New Revision: 1541908

URL: http://svn.apache.org/r1541908
Log:
123686: Removed support for building multiple languages in one run.

Modified:
    openoffice/trunk/main/solenv/bin/make_installer.pl
    openoffice/trunk/main/solenv/bin/modules/installer/control.pm
    openoffice/trunk/main/solenv/bin/modules/installer/globals.pm
    openoffice/trunk/main/solenv/bin/modules/installer/languages.pm
    openoffice/trunk/main/solenv/bin/modules/installer/parameter.pm
    openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm

Modified: openoffice/trunk/main/solenv/bin/make_installer.pl
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/make_installer.pl?rev=1541908&r1=1541907&r2=1541908&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/make_installer.pl (original)
+++ openoffice/trunk/main/solenv/bin/make_installer.pl Thu Nov 14 14:03:43 2013
@@ -612,10 +612,11 @@ if ( $installer::globals::debug ) { inst
 
 if ( $installer::globals::debug ) { installer::logger::debuginfo("\nPart 1b: 
The language dependent part\n"); }
 
-
-for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
+# Run the following code block exactly once.
+# This strange version of a do{}while(false) loop exists only to allow 
(legacy) next statements.
+for (;1;last) 
 {
-       my $languagesarrayref = 
installer::languages::get_all_languages_for_one_product($installer::globals::languageproducts[$n],
 $allvariableshashref);
+       my $languagesarrayref = 
installer::languages::get_all_languages_for_one_product($installer::globals::languageproduct,
 $allvariableshashref);
        if ( $installer::globals::globallogging ) { 
installer::files::save_file($loggingdir . "languages.log" ,$languagesarrayref); 
}
 
        $installer::globals::alllanguagesinproductarrayref = $languagesarrayref;
@@ -2259,8 +2260,7 @@ for ( my $n = 0; $n <= $#installer::glob
        # saving file_info file for later analysis
        my $speciallogfilename = "fileinfo_" . $installer::globals::product . 
"\.log";
        installer::files::save_array_of_hashes($loggingdir . 
$speciallogfilename, $filesinproductlanguageresolvedarrayref);
-
-}      # end of iteration for one language group
+}
 
 # saving debug info at end
 if ( $installer::globals::debug ) { 
installer::logger::savedebug($installer::globals::exitlog); }

Modified: openoffice/trunk/main/solenv/bin/modules/installer/control.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/control.pm?rev=1541908&r1=1541907&r2=1541908&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/control.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/control.pm Thu Nov 14 
14:03:43 2013
@@ -497,7 +497,7 @@ sub check_updatepack
 
                                        # try to write into $shipdrive
 
-                                       my $directory = 
$installer::globals::product . "_" . $installer::globals::compiler . "_" . 
$installer::globals::buildid . "_" . $installer::globals::languageproducts[0] . 
"_test_$$";
+                                       my $directory = 
$installer::globals::product . "_" . $installer::globals::compiler . "_" . 
$installer::globals::buildid . "_" . $installer::globals::languageproduct . 
"_test_$$";
                                        $directory =~ s/\,/\_/g;        # for 
the list of languages
                                        $directory =~ s/\-/\_/g;        # for 
en-US, pt-BR, ...
                                        $directory = $shipdrive . 
$installer::globals::separator . $directory;

Modified: openoffice/trunk/main/solenv/bin/modules/installer/globals.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/globals.pm?rev=1541908&r1=1541907&r2=1541908&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/globals.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/globals.pm Thu Nov 14 
14:03:43 2013
@@ -113,7 +113,7 @@ BEGIN
        
        $required_dotnet_version = "2.0.0.0";
        $productextension = "";
-       @languageproducts = ();
+       $languageproduct = undef;
        $build = "";
        $minor = "";
        $lastminor = "";

Modified: openoffice/trunk/main/solenv/bin/modules/installer/languages.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/languages.pm?rev=1541908&r1=1541907&r2=1541908&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/languages.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/languages.pm Thu Nov 14 
14:03:43 2013
@@ -30,31 +30,46 @@ use installer::globals;
 use installer::remover;
 use installer::ziplist;
 
-#############################################################################
-# Analyzing the laguage list parameter and language list from zip list file
-#############################################################################
+=head2 analyze_languagelist()
 
-sub analyze_languagelist
-{      
-       my $first = $installer::globals::languagelist;
-       
-       $first =~ s/\_/\,/g;    # substituting "_" by ",", in case of dmake 
definition 01_49
+    Convert $installer::globals::languagelist into 
$installer::globals::languageproduct.
 
-       # Products are separated by a "#", if defined in zip-list by a "|". But 
"get_info_about_languages" 
-       # substitutes already "|" to "#". This procedure only knows "#" as 
product separator.
-       # Different languages for one product are separated by ",". But on the 
command line the "_" is used.
-       # Therefore "_" is replaced by "," at the beginning of this procedure.
-       
-       while ($first =~ /^(\S+)\#(\S+?)$/)     # Minimal matching, to keep the 
order of languages
-       {
-               $first = $1;
-               my $last = $2;  
-               unshift(@installer::globals::languageproducts, $last);
-       }       
+    That is now just a replacement of '_' with ','.
+
+    $installer::globals::languageproduct (specified by the -l option
+    on the command line) can contain multiple languages separated by
+    '_' to specify multilingual builds.
+
+    Separation by '#' to build multiple languages (single or
+    multilingual) in one make_installer.pl run is not supported
+    anymore.  Call make_installer.pl with all languages separately instead:
+    make_installer.pl -l L1#L2
+    ->
+    make_installer.pl -l L1
+    make_installer.pl -l L2
+
+=cut
+sub analyze_languagelist()
+{   
+    my $languageproduct = $installer::globals::languagelist;
+
+    $languageproduct =~ s/\_/\,/g;  # substituting "_" by ",", in case of 
dmake definition 01_49
+
+    if ($languageproduct =~ /\#/)
+    {
+        installer::exiter::exit_program(
+            "building more than one language (or language set) is not 
supported anymore\n"
+            ."please replace one call of 'make_installer.pl -l 
language1#language2'\n"
+            ."with two calls 'make_installer.pl -l language1' and 
'make_installer.pl -l language2'",
+            "installer::language::analyze_languagelist");
+    }
 
-       unshift(@installer::globals::languageproducts, $first);
+    $installer::globals::languageproduct = $languageproduct;
 }
 
+
+
+
 ####################################################
 # Reading languages from zip list file
 ####################################################

Modified: openoffice/trunk/main/solenv/bin/modules/installer/parameter.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/parameter.pm?rev=1541908&r1=1541907&r2=1541908&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/parameter.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/parameter.pm Thu Nov 14 
14:03:43 2013
@@ -618,8 +618,7 @@ sub outputparameter ()
        else  { push(@output, "Not unzipping ARCHIVE files\n"); }
        if (!($installer::globals::languages_defined_in_productlist))
        {
-               push(@output, "Languages:\n");
-               foreach my $element (@installer::globals::languageproducts) { 
push(@output, "\t$element\n"); }
+               push(@output, sprintf("Languages: %s\n", 
$installer::globals::languageproduct));
        }
        else
        {

Modified: openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm?rev=1541908&r1=1541907&r2=1541908&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm Thu Nov 
14 14:03:43 2013
@@ -534,7 +534,7 @@ sub add_bundled_extension_blobs
     {
         # Add the default extensions for the current language set.
         # http:// extensions are taken from ext_sources/.
-        for my $name (ExtensionsLst::GetExtensionList("http|https", 
@installer::globals::languageproducts))
+        for my $name (ExtensionsLst::GetExtensionList("http|https", 
($installer::globals::languageproduct)))
         {
             push @bundle_files, $bundlehttpsrc . $name;
         }
@@ -542,11 +542,10 @@ sub add_bundled_extension_blobs
     }
 
     $installer::logger::Info->printf(
-        "preparing %d extension blob%s for language%s %s:\n",
+        "preparing %d extension blob%s for language %s:\n",
         $#bundle_files + 1,
         $#bundle_files!=0 ? "s" : "",
-        $#installer::globals::languageproducts!=0 ? "s" : "",
-        join(" ", @installer::globals::languageproducts));
+        $installer::globals::languageproduct);
 
     foreach my $filename ( @bundle_files)
     {
@@ -602,18 +601,17 @@ sub add_bundled_prereg_extensions
     else
     {
         # Add extensions from file:// URLs.
-        for my $name (ExtensionsLst::GetExtensionList("file", 
@installer::globals::languageproducts))
+        for my $name (ExtensionsLst::GetExtensionList("file", 
($installer::globals::languageproduct)))
         {
             push @bundle_files, $name;
         }
     }
 
     $installer::logger::Info->printf(
-        "preparing %d bundled extension%s for language%s %s:\n",
+        "preparing %d bundled extension%s for language %s:\n",
         $#bundle_files + 1,
         $#bundle_files!=0 ? "s" : "",
-        $#installer::globals::languageproducts!=0 ? "s" : "",
-        join(" ", @installer::globals::languageproducts));
+        $installer::globals::languageproduct);
     foreach my $filename (@bundle_files)
     {
         $installer::logger::Info->printf("    %s\n", $filename);


Reply via email to