From 5e82e8413fab5e8c2e219451ac84952147c7ad1b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 11 Aug 2018 14:52:44 -0700 Subject: [PATCH] Use create-dmg to get a much nicer looking DMG that's also code-signed --- app/Info.plist | 2 ++ scripts/generate-dmg.sh | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/Info.plist b/app/Info.plist index 6f816dae..d649b7ce 100644 --- a/app/Info.plist +++ b/app/Info.plist @@ -24,6 +24,8 @@ CFBundleVersion 0.1.0 + CFBundleShortVersionString + 0.1.0 CFBundleDisplayName Moonlight diff --git a/scripts/generate-dmg.sh b/scripts/generate-dmg.sh index 03ef568b..941a5a34 100755 --- a/scripts/generate-dmg.sh +++ b/scripts/generate-dmg.sh @@ -1,3 +1,4 @@ +# This script requires create-dmg to be installed from https://github.com/sindresorhus/create-dmg BUILD_CONFIG=$1 fail() @@ -40,12 +41,12 @@ echo Copying frameworks dependencies mkdir $BUILD_FOLDER/app/Moonlight.app/Contents/Frameworks cp -R $SOURCE_ROOT/libs/mac/Frameworks/ $BUILD_FOLDER/app/Moonlight.app/Contents/Frameworks/ || fail "Framework copy failed!" -echo Creating DMG +echo Creating app bundle EXTRA_ARGS= if [ "$BUILD_CONFIG" == "Debug" ]; then EXTRA_ARGS="$EXTRA_ARGS -use-debug-libs"; fi if [ "$SIGNING_KEY" != "" ]; then EXTRA_ARGS="$EXTRA_ARGS -codesign=$SIGNING_KEY"; fi echo Extra deployment arguments: $EXTRA_ARGS -macdeployqt $BUILD_FOLDER/app/Moonlight.app -dmg $EXTRA_ARGS -qmldir=$SOURCE_ROOT/app/gui -appstore-compliant || fail "macdeployqt failed!" +macdeployqt $BUILD_FOLDER/app/Moonlight.app $EXTRA_ARGS -qmldir=$SOURCE_ROOT/app/gui -appstore-compliant || fail "macdeployqt failed!" -echo Deploying DMG -mv $BUILD_FOLDER/app/Moonlight.dmg $INSTALLER_FOLDER/ +echo Creating DMG +create-dmg $BUILD_FOLDER/app/Moonlight.app $INSTALLER_FOLDER || fail "create-dmg failed!"