matrixion/.ci/macos/build.sh

41 lines
1.2 KiB
Bash
Raw Normal View History

2023-11-06 22:49:54 +03:00
#!/usr/bin/env bash
2023-05-09 00:54:45 +03:00
set -ue
# unused
#TAG=$(git tag -l --points-at HEAD)
# Add Qt binaries to path
2023-11-06 22:49:54 +03:00
QT_BASEPATH=(${HOME}/Qt/6.*/macos/)
PATH="${QT_BASEPATH}/bin/:${PATH}"
export PATH
2023-11-06 22:49:54 +03:00
CMAKE_PREFIX_PATH="${QT_BASEPATH}/lib/cmake"
export CMAKE_PREFIX_PATH
cmake -GNinja -S. -Bbuild \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
2023-06-19 20:30:47 +03:00
-DCMAKE_INSTALL_PREFIX="nheko.temp" \
-DHUNTER_ROOT="../.hunter" \
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \
-DUSE_BUNDLED_OPENSSL=ON \
2023-11-20 04:38:58 +03:00
-DUSE_BUNDLED_KDSINGLEAPPLICATION=ON \
2023-11-06 22:49:54 +03:00
-DQt6_DIR=${QT_BASEPATH}/lib/cmake \
-DCI_BUILD=ON
cmake --build build
2023-06-19 04:12:50 +03:00
cmake --install build
2023-05-09 00:54:45 +03:00
( cd build
git clone https://github.com/Nheko-Reborn/qt-jdenticon.git
2023-05-09 00:54:45 +03:00
( cd qt-jdenticon
qmake
make -j 4
2023-06-19 20:30:47 +03:00
cp libqtjdenticon.dylib ../../nheko.temp/nheko.app/Contents/MacOS
)
# "$(brew --prefix qt6)/bin/macdeployqt" nheko.app -always-overwrite -qmldir=../resources/qml/
# # workaround for https://bugreports.qt.io/browse/QTBUG-100686
# cp "$(brew --prefix brotli)/lib/libbrotlicommon.1.dylib" nheko.app/Contents/Frameworks/libbrotlicommon.1.dylib
)
2023-06-19 20:30:47 +03:00
mv nheko.temp/nheko.app nheko.app