[Libreoffice-commits] .: 7 commits - i18npool/source solenv/bin

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Sep 1 11:45:59 PDT 2012


 i18npool/source/isolang/langid.pl           |    4 -
 solenv/bin/modules/installer.pm             |    3 -
 solenv/bin/modules/installer/globals.pm     |   75 ----------------------------
 solenv/bin/modules/installer/languages.pm   |   69 +++++++++++++++++++++++++
 solenv/bin/modules/installer/parameter.pm   |    4 -
 solenv/bin/modules/installer/profiles.pm    |    2 
 solenv/bin/modules/installer/scriptitems.pm |    4 -
 solenv/bin/modules/installer/setupscript.pm |   16 ++++-
 8 files changed, 88 insertions(+), 89 deletions(-)

New commits:
commit bd52c601fbc3b68b17ececfe62df15630a90ddbe
Author: Tim Retout <tim at retout.co.uk>
Date:   Sat Sep 1 11:26:35 2012 +0100

    installer: Replace $installer::globals::plat
    
    Change-Id: I81076008a619063acadc328a4ae8caf27eb8fe50

diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 2c63ab4..1cd549e 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -292,9 +292,7 @@ BEGIN
     @removedirs = ();
     @removefiletable = ();
 
-    $plat = $^O;
-
-    if ( $plat =~ /cygwin/i )
+    if ( $^O =~ /cygwin/i )
     {
         $zippath = "zip";                   # Has to be in the path: /usr/bin/zip
         $separator = "/";
diff --git a/solenv/bin/modules/installer/profiles.pm b/solenv/bin/modules/installer/profiles.pm
index fba586b..ef0ce7d 100644
--- a/solenv/bin/modules/installer/profiles.pm
+++ b/solenv/bin/modules/installer/profiles.pm
@@ -207,7 +207,7 @@ sub create_profiles
         # Sorting the array @onefile
         my $onefileref = sorting_profile(\@onefile);
 
-        if ( $installer::globals::iswin && $installer::globals::plat =~ /cygwin/i)      # Windows line ends only for Cygwin
+        if ( $installer::globals::iswin && $^O =~ /cygwin/i)      # Windows line ends only for Cygwin
         {
             include_windows_lineends($onefileref);
         }
commit e0aa5e6f3a6d6702a2c6b8cd1d807bfc4a48d8df
Author: Tim Retout <tim at retout.co.uk>
Date:   Thu Aug 30 18:37:16 2012 +0100

    installer: Make @forced_properties non-global.
    
    Change-Id: I42f1511126bcbda466cb956cbcac722b449bd9a5

diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 49f380c..2c63ab4 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -289,8 +289,6 @@ BEGIN
     %all_english_languagestrings = ();
     %all_required_english_languagestrings = ();
 
-    @forced_properties = ("SERVICETAG_PRODUCTNAME", "SERVICETAG_PRODUCTVERSION", "SERVICETAG_PARENTNAME", "SERVICETAG_SOURCE", "SERVICETAG_URN");
-
     @removedirs = ();
     @removefiletable = ();
 
diff --git a/solenv/bin/modules/installer/setupscript.pm b/solenv/bin/modules/installer/setupscript.pm
index 2275cd1..53590d3 100644
--- a/solenv/bin/modules/installer/setupscript.pm
+++ b/solenv/bin/modules/installer/setupscript.pm
@@ -464,17 +464,25 @@ sub add_installationobject_to_variables
 
 #####################################################################################
 # Adding all variables, that must be defined, but are not defined until now.
-# List of this varibles: @installer::globals::forced_properties
 #####################################################################################
 
 sub add_forced_properties
 {
     my ($allvariables) = @_;
 
-    my $property;
-    foreach $property ( @installer::globals::forced_properties )
+    my @forced_properties = qw(
+        SERVICETAG_PRODUCTNAME
+        SERVICETAG_PRODUCTVERSION
+        SERVICETAG_PARENTNAME
+        SERVICETAG_SOURCE
+        SERVICETAG_URN
+    );
+
+    for my $property (@forced_properties)
     {
-        if ( ! exists($allvariables->{$property}) ) { $allvariables->{$property} = ""; }
+        if ( ! exists($allvariables->{$property}) ) {
+            $allvariables->{$property} = "";
+        }
     }
 }
 
commit 212847783dfc7b3c0a81c86f3f89247c98bb94ae
Author: Tim Retout <tim at retout.co.uk>
Date:   Sat Sep 1 11:13:53 2012 +0100

    installer: Inline $installer::globals::globaltempdirname
    
    Change-Id: I4174f61e45e71720d0679f798f440096d0ce4583

diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index fd825c1..49f380c 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -93,7 +93,6 @@ BEGIN
     $msilanguage = "";  # hash reference for msi languages LCID
     $sofficeiconadded = 0;
     $temppath = "";
-    $globaltempdirname = "ooopackaging";
     $cyg_temppath = "";
     $temppathdefined = 0;
     $packageversion = 1;
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm
index 07d7fe4..609f7b4 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -376,7 +376,7 @@ sub setglobalvariables
         elsif ( $ENV{'TEMP'} )  { $installer::globals::temppath = $ENV{'TEMP'}; }
         elsif ( $ENV{'TMPDIR'} )  { $installer::globals::temppath = $ENV{'TMPDIR'}; }
         $installer::globals::temppath =~ s/\Q$installer::globals::separator\E\s*$//;    # removing ending slashes and backslashes
-        $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . $installer::globals::globaltempdirname;
+        $installer::globals::temppath .= $installer::globals::separator . 'ooopackaging';
         installer::systemactions::create_directory_with_privileges($installer::globals::temppath, "777");
         my $dirsave = $installer::globals::temppath;
 
commit a3f8156e0dfeff671a6e200075e727b1f037382c
Author: Tim Retout <tim at retout.co.uk>
Date:   Sat Sep 1 10:58:25 2012 +0100

    installer: Make @noMSLocaleLangs non-global.
    
    Change-Id: Iae7afa53966a4f5fe3b09ce75dcefc78fd75b279

diff --git a/i18npool/source/isolang/langid.pl b/i18npool/source/isolang/langid.pl
index 0e1c323..fcccd53 100755
--- a/i18npool/source/isolang/langid.pl
+++ b/i18npool/source/isolang/langid.pl
@@ -30,7 +30,7 @@ sub Usage()
         "\n",
         "langid - a hackish utility to lookup lang.h language defines and LangIDs,\n",
         "isolang.cxx ISO639/ISO3166 mapping, locale data files, langtab.src language\n",
-        "listbox entries, langlist.mk, file_ooo.scp registry name, globals.pm and\n",
+        "listbox entries, langlist.mk, file_ooo.scp registry name, languages.pm and\n",
         "msi-encodinglist.txt\n\n",
 
         "Usage: $0 [--single] {language string} | {LangID} | {primarylanguage sublanguage} | {language-country}\n\n",
@@ -400,7 +400,7 @@ sub main()
             # @noMSLocaleLangs = ( "br", "bs", ... )
             grepFile(
                 '^\s*@noMSLocaleLangs\s*=\s*\(\s*(\s*"([a-z]{2,3})(-[A-Z][A-Z])?"\s*,?)*' . $langcoun . '',
-                "$SRC_ROOT", "solenv", "bin/modules/installer/globals.pm",
+                "$SRC_ROOT", "solenv", "bin/modules/installer/languages.pm",
                 ('^\s*@noMSLocaleLangs\s*=', '\)\s*$', '"' . $langcoun . '"'));
 
             # af    1252  1078   # Afrikaans
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 1f88168..fd825c1 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -33,70 +33,6 @@ package installer::globals;
 
 BEGIN
 {
-    @noMSLocaleLangs = (
-        "br",
-        "bs",
-        "dz",
-        "gu",
-        "km",
-        "nr",
-        "ns",
-        "nso",
-        "rw",
-        "ss",
-        "st",
-        "tg",
-        "ts",
-        "tn",
-        "ve",
-        "xh",
-        "zu",
-        "ne",
-        "bn",
-        "bn-BD",
-        "bn-IN",
-        "lo",
-        "cy",
-        "ku",
-        "as-IN",
-        "te-IN",
-        "ml-IN",
-        "mr-IN",
-        "ur-IN",
-        "ta-IN",
-        "or-IN",
-        "ti-ER",
-        "eo",
-        "ka",
-        "ga",
-        "uk",
-        "gd",
-        "my",
-        "mai",
-        "brx",
-        "dgo",
-        "kok",
-        "mni",
-        "ca-XV",
-        "sat",
-        "ug",
-        "om",
-        "si",
-        "or",
-        "oc",
-        "ml",
-        "as",
-        "ast",
-        "ht",
-        "jbo",
-        "fur",
-        "ny",
-        "so",
-        "kab",
-        "tk",
-        "ky-CN"
-    );
-
     $ziplistname = "";
     $pathfilename = "";
     $setupscriptname = "";
diff --git a/solenv/bin/modules/installer/languages.pm b/solenv/bin/modules/installer/languages.pm
index b7826ee..db5ce85 100644
--- a/solenv/bin/modules/installer/languages.pm
+++ b/solenv/bin/modules/installer/languages.pm
@@ -138,9 +138,74 @@ sub get_all_languages_for_one_product
         my $furthercheck = 1;
 
         # For some languages (that are not supported by Windows, english needs to be added to the installation set
-        # Languages saved in "@installer::globals::noMSLocaleLangs"
 
-        if ( all_elements_of_array1_in_array2(\@languagearray, \@installer::globals::noMSLocaleLangs) )
+        # FIXME The script i18npool/source/isolang/langid.pl greps this very
+        # source file to read this array.  Be careful!
+        my @noMSLocaleLangs = (
+            "br",
+            "bs",
+            "dz",
+            "gu",
+            "km",
+            "nr",
+            "ns",
+            "nso",
+            "rw",
+            "ss",
+            "st",
+            "tg",
+            "ts",
+            "tn",
+            "ve",
+            "xh",
+            "zu",
+            "ne",
+            "bn",
+            "bn-BD",
+            "bn-IN",
+            "lo",
+            "cy",
+            "ku",
+            "as-IN",
+            "te-IN",
+            "ml-IN",
+            "mr-IN",
+            "ur-IN",
+            "ta-IN",
+            "or-IN",
+            "ti-ER",
+            "eo",
+            "ka",
+            "ga",
+            "uk",
+            "gd",
+            "my",
+            "mai",
+            "brx",
+            "dgo",
+            "kok",
+            "mni",
+            "ca-XV",
+            "sat",
+            "ug",
+            "om",
+            "si",
+            "or",
+            "oc",
+            "ml",
+            "as",
+            "ast",
+            "ht",
+            "jbo",
+            "fur",
+            "ny",
+            "so",
+            "kab",
+            "tk",
+            "ky-CN",
+        );
+
+        if ( all_elements_of_array1_in_array2(\@languagearray, \@noMSLocaleLangs) )
         {
             my $officestartlanguage = $languagearray[0];
             unshift(@languagearray, "en-US");   # am Anfang einfügen!
commit 4e38a1c87054ad5eba329681741bf91efe8b1d37
Author: Tim Retout <tim at retout.co.uk>
Date:   Sat Sep 1 10:49:55 2012 +0100

    installer: Make @rtllanguages non-global.
    
    Change-Id: I20c3e2482e9bc1c1f2b32f517b1ced9037454544

diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 1e69b4a..656bfb9 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -1563,7 +1563,8 @@ sub main {
                 my $onelanguage = ${$languagesarrayref}[$m];
 
                 my $is_rtl = 0;
-                if ( grep {$_ eq $onelanguage} @installer::globals::rtllanguages ) { $is_rtl = 1; }
+                my @rtllanguages = ("ar", "fa", "he", "ug", "ky-CN");
+                if ( grep {$_ eq $onelanguage} @rtllanguages ) { $is_rtl = 1; }
 
                 my $languageidtdir = $idtdirbase . $installer::globals::separator . $onelanguage;
                 if ( -d $languageidtdir ) { installer::systemactions::remove_complete_directory($languageidtdir, 1); }
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index e824acb..1f88168 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -96,7 +96,6 @@ BEGIN
         "tk",
         "ky-CN"
     );
-    @rtllanguages = ("ar", "fa", "he", "ug", "ky-CN");
 
     $ziplistname = "";
     $pathfilename = "";
commit f9a2a438be6dfa0c28dc81fdea604d5da8824cc9
Author: Tim Retout <tim at retout.co.uk>
Date:   Sat Sep 1 10:48:10 2012 +0100

    installer: Make @items_at_modules non-global.
    
    Change-Id: I869b521034f75b0146ee5aa0fdd5014f674bfa4c

diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index c589a5d..e824acb 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -96,7 +96,6 @@ BEGIN
         "tk",
         "ky-CN"
     );
-    @items_at_modules = ("Files", "Dirs", "Unixlinks");
     @rtllanguages = ("ar", "fa", "he", "ug", "ky-CN");
 
     $ziplistname = "";
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 2d7bd51..42ee98d 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -2406,8 +2406,8 @@ sub resolve_assigned_modules
 
             # Currently no merging of Files, Dirs, ...
             # This has to be included here, if it is required
-            my $item;
-            foreach $item (@installer::globals::items_at_modules)
+            my @items_at_modules = ("Files", "Dirs", "Unixlinks");
+            for my $item (@items_at_modules)
             {
                 if ( exists($directaccess{$templategid}->{$item}) ) { $onefeature->{$item} = $directaccess{$templategid}->{$item}; }
             }
commit 62a9b1727878de6225ebc90514ce3de6a539d642
Author: Tim Retout <tim at retout.co.uk>
Date:   Sat Sep 1 10:35:46 2012 +0100

    installer: Remove $installer::globals::prog
    
    Change-Id: I71b8950e1d0e8755159631a83a4e57c23e6cd100

diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index d8d5273..c589a5d 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -33,8 +33,6 @@ package installer::globals;
 
 BEGIN
 {
-    $prog="make_installer.pl";
-
     @noMSLocaleLangs = (
         "br",
         "bs",
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm
index c749af7..07d7fe4 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -43,7 +43,6 @@ sub usage
 {
     print <<Ende;
 --------------------------------------------------------------------------------
-$installer::globals::prog
 The following parameter are needed:
 -f: Path to the product list (required)
 -s: Path to the setup script (optional, if defined in product list)
@@ -534,7 +533,6 @@ sub outputparameter
     my @output = ();
 
     push(@output, "\n########################################################\n");
-    push(@output, "$installer::globals::prog, version 1.0\n");
     push(@output, "Product list file: $installer::globals::ziplistname\n");
     if (!($installer::globals::setupscript_defined_in_productlist))
     {


More information about the Libreoffice-commits mailing list