Prettify macOS installer with dmgbuild

This commit is contained in:
Konstantinos Sideris 2018-04-28 17:28:26 +03:00
parent 4a7b62e8fa
commit ca80fb24ab
3 changed files with 39 additions and 3 deletions

View File

@ -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

View File

@ -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

30
.ci/macos/settings.json Normal file
View File

@ -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
}
}
}