summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2018-03-15 23:01:27 +0100
committerAndras Timar <andras.timar@collabora.com>2020-05-13 16:56:27 +0200
commit797f7dde01dc687730aa1d70ee0e564f39bf3961 (patch)
tree5bc761156bd92e331ad1c67a29f370e6557aae86 /solenv
parent3252949d6eaa2d078bcecf2e4219f870913f4a6d (diff)
[cp] Collabora Office macOS 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 Change-Id: Ia855d7d677136de951c2b9b31ee8d5583475dd41
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/macosx-codesign-app-bundle4
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm14
2 files changed, 11 insertions, 7 deletions
diff --git a/solenv/bin/macosx-codesign-app-bundle b/solenv/bin/macosx-codesign-app-bundle
index db2f6ffc55d2..756ae3fd7705 100755
--- a/solenv/bin/macosx-codesign-app-bundle
+++ b/solenv/bin/macosx-codesign-app-bundle
@@ -82,7 +82,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 --options=runtime --force --identifier=$id --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$app" > "/tmp/codesign_${fn}.log" 2>&1
if [ "$?" != "0" ] ; then
exit 1
@@ -99,7 +99,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>.*,,'`
# files in bin are not covered by signing the framework...
for scriptorexecutable in $(find $version/bin/ -type f); do
codesign --verbose --options=runtime --force --identifier=$id --sign "$MACOSX_CODESIGNING_IDENTITY" "$scriptorexecutable" >> "/tmp/codesign_${fn}.log" 2>&1
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index b32f77d3bef6..e3682bafe736 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,13 +401,17 @@ 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); }
if ( $ENV{'MACOSX_CODESIGNING_IDENTITY'} )
{
- $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";
@@ -458,7 +462,7 @@ sub create_package
$megabytes = 2000 if $ENV{'ENABLE_DBGUTIL'};
$systemcall = "cd $localtempdir && hdiutil create -megabytes $megabytes -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