From ca80fb24ab77f0683c11499f7263e966678618e4 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sat, 28 Apr 2018 17:28:26 +0300 Subject: [PATCH] Prettify macOS installer with dmgbuild --- .ci/install.sh | 2 ++ .ci/macos/deploy.sh | 10 +++++++--- .ci/macos/settings.json | 30 ++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .ci/macos/settings.json diff --git a/.ci/install.sh b/.ci/install.sh index e7e99c1f..5735befb 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -6,6 +6,8 @@ if [ $TRAVIS_OS_NAME == osx ]; then brew update brew install qt5 lmdb clang-format ninja + pip install dmgbuild + export CMAKE_PREFIX_PATH=/usr/local/opt/qt5 fi diff --git a/.ci/macos/deploy.sh b/.ci/macos/deploy.sh index 39e2f439..133c7b0e 100755 --- a/.ci/macos/deploy.sh +++ b/.ci/macos/deploy.sh @@ -7,7 +7,11 @@ TAG=`git tag -l --points-at HEAD` # Add Qt binaries to path PATH=/usr/local/opt/qt/bin/:${PATH} -sudo macdeployqt build/nheko.app -dmg +pushd build +sudo macdeployqt nheko.app -dmg user=$(id -nu) -sudo chown ${user} build/nheko.dmg -mv build/nheko.dmg . +sudo chown ${user} nheko.dmg +mv nheko.dmg .. +popd + +dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg diff --git a/.ci/macos/settings.json b/.ci/macos/settings.json new file mode 100644 index 00000000..7747513e --- /dev/null +++ b/.ci/macos/settings.json @@ -0,0 +1,30 @@ +{ + "background": "builtin-arrow", + "compression-level": 9, + "contents": [ + { + "path": "/Applications/Nheko.app", + "type": "file", + "x": 140, + "y": 120 + }, + { + "path": "/Applications", + "type": "link", + "x": 500, + "y": 120 + } + ], + "format": "UDZO", + "title": "Nheko", + "window": { + "position": { + "x": 100, + "y": 100 + }, + "size": { + "height": 280, + "width": 640 + } + } +}