diff options
author | Andras Timar <andras.timar@collabora.com> | 2015-11-01 22:14:50 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-03-06 16:42:30 +0100 |
commit | 376cd99ae4bf477ac1003a64facf361699cd43f7 (patch) | |
tree | 5bb7eb467a5dc9bdd297312f57e274c714d557c6 /solenv | |
parent | 1e81d4cc5dfdcb45c3e07e82ed5080d122d27d3d (diff) |
Collabora Office OS X packaging
- added EULA (sla.r) in special OS X resource fork format
- added volume icon which does not work ATM, TODO later
- new dmg background image and adjusted .DS_Store
- fixes to tolerate space in app bundle name
(cherry picked from commit 26d77ceefcb59a95fff71c730d798d6b59021fc0)
Change-Id: I3f341bfcd5bea88681e57b314f6069be107c5c2b
Diffstat (limited to 'solenv')
-rwxr-xr-x | solenv/bin/macosx-codesign-app-bundle | 6 | ||||
-rw-r--r-- | solenv/bin/modules/installer/simplepackage.pm | 14 |
2 files changed, 12 insertions, 8 deletions
diff --git a/solenv/bin/macosx-codesign-app-bundle b/solenv/bin/macosx-codesign-app-bundle index 1149e70ea6d1..1212803cf126 100755 --- a/solenv/bin/macosx-codesign-app-bundle +++ b/solenv/bin/macosx-codesign-app-bundle @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x # Exit on errors set -e @@ -73,7 +73,7 @@ while read app; do fn=`basename "$app"` fn=${fn%.*} # Assume the app has a XML (and not binary) Info.plist - id=`grep -A 1 '<key>CFBundleIdentifier</key>' $app/Contents/Info.plist | tail -1 | sed -e 's,.*<string>,,' -e 's,</string>.*,,'` + id=`grep -A 1 '<key>CFBundleIdentifier</key>' "$app/Contents/Info.plist" | tail -1 | sed -e 's,.*<string>,,' -e 's,</string>.*,,'` codesign --verbose --identifier=$id --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$app" || exit 1 done @@ -86,7 +86,7 @@ while read framework; do for version in "$framework"/Versions/*; do if test ! -L "$version" -a -d "$version"; then # Assume the framework has a XML (and not binary) Info.plist - id=`grep -A 1 '<key>CFBundleIdentifier</key>' $version/Resources/Info.plist | tail -1 | sed -e 's,.*<string>,,' -e 's,</string>.*,,'` + id=`grep -A 1 '<key>CFBundleIdentifier</key>' "$version/Resources/Info.plist" | tail -1 | sed -e 's,.*<string>,,' -e 's,</string>.*,,'` codesign --verbose --identifier=$id --sign "$MACOSX_CODESIGNING_IDENTITY" "$version" || exit 1 fi done diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm index 95ccfe75255f..c9e837c06216 100644 --- a/solenv/bin/modules/installer/simplepackage.pm +++ b/solenv/bin/modules/installer/simplepackage.pm @@ -282,7 +282,7 @@ sub create_package if ( ! $allvariables->{'HIDELICENSEDIALOG'} ) { - installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0); + $ref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0); } my $localtempdir = $tempdir; @@ -401,9 +401,12 @@ sub create_package push( @installer::globals::logfileinfo, $infoline); } } - elsif ($volume_name_classic_app eq 'LibreOffice' || $volume_name_classic_app eq 'LibreOfficeDev') + elsif ($volume_name_classic_app eq 'Collabora Office') { - my $subdir = "$tempdir/$packagename/$volume_name_classic_app.app/Contents/Resources"; + my $oldappdir = "$tempdir/$packagename/CollaboraOffice.app"; + my $newappdir = "$tempdir/$packagename/Collabora Office.app"; + installer::systemactions::rename_directory($oldappdir,$newappdir); + my $subdir = "$newappdir/Contents/Resources"; if ( ! -d $subdir ) { installer::systemactions::create_directory($subdir); } # iterate over OS X localizations foreach $lang ("ca", "cs", "da", "de", "el", "en", "es", "fi", "fr", "hr", "hu", "id", "it", "ja", "ko", "ms", "nl", "no", "pl", "pt", "pt_PT", "ro", "ru", "sk", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_TW") @@ -412,7 +415,8 @@ sub create_package } if ( defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}) && $ENV{'MACOSX_CODESIGNING_IDENTITY'} ne "" ) { - $systemcall = "$ENV{'SRCDIR'}/solenv/bin/macosx-codesign-app-bundle $localtempdir/$folder/$volume_name_classic_app.app"; + $newappdir =~ s/ /\\ /g; + $systemcall = "$ENV{'SRCDIR'}/solenv/bin/macosx-codesign-app-bundle $newappdir"; print "... $systemcall ...\n"; my $returnvalue = system($systemcall); $infoline = "Systemcall: $systemcall\n"; @@ -433,7 +437,7 @@ sub create_package $systemcall = "cd $localtempdir && hdiutil create -megabytes 1500 -srcfolder $folder $archive -ov -fs HFS+ -volname \"$volume_name\" -format UDBZ"; if (( $ref ne "" ) && ( $$ref ne "" )) { - $systemcall .= " && hdiutil unflatten $archive && Rez -a $$ref -o $archive && hdiutil flatten $archive &&"; + $systemcall .= " && hdiutil unflatten $archive && Rez -a $$ref -o $archive && hdiutil flatten $archive"; } } else |