[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - solenv/bin

Norbert Thiebaud nthiebaud at gmail.com
Thu Jan 16 17:38:06 PST 2014


 solenv/bin/modules/installer/simplepackage.pm |   30 +++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

New commits:
commit d77f6160afc213cd1cb8c658ece4e074f4e60bce
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Jan 10 16:52:28 2014 -0600

    sign language pack on Mac, and add the locale name to the App name
    
    Change-Id: Ie05a03e1edc02527b6895da07cfede69df7ec157
    Reviewed-on: https://gerrit.libreoffice.org/7386
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index 118d420..2281a8d 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -294,9 +294,9 @@ sub create_package
             $localtempdir = "$tempdir/$packagename";
             my $srcfolder = $localtempdir . "/" . $volume_name_classic_app . "\.app";
 
-            $volume_name             .= " Language Pack";
-            $volume_name_classic     .= " Language Pack";
-            $volume_name_classic_app .= " Language Pack";
+            $volume_name             .= "_".$$languagestringref."_Language_Pack";
+            $volume_name_classic     .= "_".$$languagestringref."_Language_Pack";
+            $volume_name_classic_app .= "_".$$languagestringref."_Language_Pack";
 
             my $appfolder = $localtempdir . "/" . $volume_name_classic_app . "\.app";
             my $contentsfolder = $appfolder . "/Contents";
@@ -342,7 +342,6 @@ sub create_package
             if ( $installer::globals::languagepack ) { $scriptfilename = "osx_install_languagepack.applescript"; }
             if ( $installer::globals::helppack ) { $scriptfilename = "osx_install_helppack.applescript"; }
             my $scripthelperfilename = $ENV{'SRCDIR'} . "/setup_native/scripts/mac_install.script";
-            # my $scripthelperrealfilename = $volume_name;
             my $scripthelperrealfilename = $volume_name_classic_app;
 
             # Finding both files in source tree
@@ -362,7 +361,6 @@ sub create_package
             my $scriptfilecontent = installer::files::read_file($scriptfilename);
             my $translationfilecontent = installer::files::read_file($installer::globals::macinstallfilename);
             localize_scriptfile($scriptfilecontent, $translationfilecontent, $languagestringref);
-            # replace_variables_in_scriptfile($scriptfilecontent, $volume_name, $allvariables);
             replace_variables_in_scriptfile($scriptfilecontent, $volume_name_classic, $volume_name_classic_app, $allvariables);
             installer::files::save_file($scriptfilename, $scriptfilecontent);
 
@@ -387,11 +385,29 @@ sub create_package
 
             # Replacing variables in Info.plist
             $scriptfilecontent = installer::files::read_file($destfile);
-            # replace_one_variable_in_shellscript($scriptfilecontent, $volume_name, "FULLPRODUCTNAME" );
             replace_one_variable_in_shellscript($scriptfilecontent, $volume_name_classic_app, "FULLAPPPRODUCTNAME" ); # OpenOffice.org Language Pack
             installer::files::save_file($destfile, $scriptfilecontent);
-
             chdir $localfrom;
+            if ( defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}) && $ENV{'MACOSX_CODESIGNING_IDENTITY'} ne "" )
+            {
+                $systemcall = "$ENV{'SRCDIR'}/solenv/bin/macosx-codesign-app-bundle \"$appfolder\"";
+                print "... $systemcall ...\n";
+                my $returnvalue = system($systemcall);
+                $infoline = "Systemcall: $systemcall\n";
+                push( @installer::globals::logfileinfo, $infoline);
+
+                if ($returnvalue)
+                {
+                    $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+                    push( @installer::globals::logfileinfo, $infoline);
+                }
+                else
+                {
+                    $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+                    push( @installer::globals::logfileinfo, $infoline);
+                }
+            }
+
         }
         else
         {


More information about the Libreoffice-commits mailing list