- Updated `make-app-release` script to use `macdeployqt` with proper verbosity and bundle fixup. - Introduced post-build fixup using CMake's `BundleUtilities` to internalize non-Qt dylibs. - Enhanced macOS bundle RPATH settings for accurate Framework resolution. - Added optional `kge_fixup_bundle` CMake target for post-build handling. - Refined `default.nix` to load Nixpkgs in a default argument.
35 lines
912 B
Bash
Executable File
35 lines
912 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
mkdir -p cmake-build-release
|
|
cmake -S . -B cmake-build-release -DBUILD_GUI=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_ASAN=OFF
|
|
|
|
cd cmake-build-release
|
|
make clean
|
|
rm -fr kge.app*
|
|
make
|
|
zip -r kge.app.zip kge.app
|
|
sha256sum kge.app.zip
|
|
open .
|
|
cd ..
|
|
|
|
mkdir -p cmake-build-release-qt
|
|
cmake -S . -B cmake-build-release-qt -DBUILD_GUI=ON -DKTE_USE_QT=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_ASAN=OFF
|
|
|
|
cd cmake-build-release-qt
|
|
make clean
|
|
rm -fr kge.app* kge-qt.app*
|
|
make
|
|
mv -f kge.app kge-qt.app
|
|
# Use the same Qt's macdeployqt as used for building; ensure it overwrites in-bundle paths
|
|
macdeployqt kge-qt.app -always-overwrite -verbose=3
|
|
|
|
# Run CMake BundleUtilities fixup to internalize non-Qt dylibs and rewrite install names
|
|
cmake -DAPP_BUNDLE="$(pwd)/kge-qt.app" -P "${PWD%/*}/cmake/fix_bundle.cmake"
|
|
zip -r kge-qt.app.zip kge-qt.app
|
|
sha256sum kge-qt.app.zip
|
|
open .
|
|
cd ..
|