2017-11-05 20:14:52 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2018-01-13 15:59:48 +03:00
|
|
|
set -ex
|
2017-11-05 20:14:52 +03:00
|
|
|
|
2017-12-30 19:32:16 +03:00
|
|
|
TAG=`git tag -l --points-at HEAD`
|
|
|
|
|
2017-11-05 21:07:14 +03:00
|
|
|
# Add Qt binaries to path
|
|
|
|
PATH=/usr/local/opt/qt/bin/:${PATH}
|
|
|
|
|
2018-04-28 17:28:26 +03:00
|
|
|
pushd build
|
2019-02-05 03:35:03 +03:00
|
|
|
|
|
|
|
# macdeployqt does not copy symlinks over.
|
|
|
|
# this specifically addresses icu4c issues but nothing else.
|
|
|
|
export ICU_LIB="$(brew --prefix icu4c)/lib"
|
2019-02-05 05:16:15 +03:00
|
|
|
mkdir -p nheko.app/Contents/Frameworks
|
2019-02-05 15:06:59 +03:00
|
|
|
find ${ICU_LIB} -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true
|
2019-02-05 03:35:03 +03:00
|
|
|
|
2019-02-08 06:20:03 +03:00
|
|
|
sudo macdeployqt nheko.app -dmg -always-overwrite
|
2019-02-05 05:16:15 +03:00
|
|
|
|
2017-11-05 20:14:52 +03:00
|
|
|
user=$(id -nu)
|
2018-04-28 17:28:26 +03:00
|
|
|
sudo chown ${user} nheko.dmg
|
|
|
|
mv nheko.dmg ..
|
|
|
|
popd
|
|
|
|
|
|
|
|
dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg
|
2018-06-17 16:53:14 +03:00
|
|
|
|
2019-02-01 03:29:34 +03:00
|
|
|
if [ ! -z $VERSION ]; then
|
|
|
|
mv nheko.dmg nheko-${VERSION}.dmg
|
2018-06-17 16:53:14 +03:00
|
|
|
fi
|