tsMuxer/build_macos_native.sh
Daniel Kamil Kozar 88316ec3e9
Cleanup CMakeLists.txt a bit and add coverage builds (#493)
Add TSMUXER_COVERAGE which will result in building binaries with coverage information when set to true.
Move MSVC flag utf-8 from tsMuxerGUI to the general CMakeLists.txt as there is no reason not to enable it globally.
Replace NOT MSVC with checking if the build is for Linux : the effect is the same, but the intent is clearer.
Restructure the platform-specific conditions for building tsMuxerGUI.
Bind the XP build to windows-2019 hosts as windows-2022 includes Visual Studio 2022 which dropped XP support.
Don't install zlib via homebrew in macos in order to avoid conflicts with the system-provided one.
2021-11-14 02:06:30 +01:00

41 lines
741 B
Bash
Executable File

#!/usr/bin/env bash
set -x
set -e
export MACOSX_DEPLOYMENT_TARGET=10.15
brew install pkg-config
brew install freetype
builddir=$PWD
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Release -DTSMUXER_GUI=TRUE ..
if ! num_cores=$(sysctl -n hw.logicalcpu); then
num_cores=1
fi
make -j${num_cores}
pushd tsMuxerGUI
pushd tsMuxerGUI.app/Contents
defaults write "$PWD/Info.plist" NSPrincipalClass -string NSApplication
defaults write "$PWD/Info.plist" NSHighResolutionCapable -string True
plutil -convert xml1 Info.plist
popd
macdeployqt tsMuxerGUI.app
popd
mkdir bin
pushd bin
mv ../tsMuxer/tsmuxer tsMuxeR
mv ../tsMuxerGUI/tsMuxerGUI.app .
cp tsMuxeR tsMuxerGUI.app/Contents/MacOS/
zip -9 -r mac.zip tsMuxeR tsMuxerGUI.app
popd
popd