2020-04-07 02:53:23 +00:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
2022-01-04 19:55:42 +00:00
|
|
|
brew update
|
|
|
|
brew install llvm@13 molten-vk vulkan-headers sdl2 nasm qt@5 ninja cmake glew git p7zip create-dmg ccache
|
2018-07-16 01:12:43 +00:00
|
|
|
|
2022-03-05 18:03:47 +00:00
|
|
|
export MACOSX_DEPLOYMENT_TARGET=11.6
|
2022-01-04 19:55:42 +00:00
|
|
|
export CXX=clang++
|
|
|
|
export CC=clang
|
2022-03-05 11:44:16 +00:00
|
|
|
export Qt5_DIR="/usr/local/opt/qt@5/lib/cmake/Qt5"
|
2022-01-04 19:55:42 +00:00
|
|
|
export PATH="/usr/local/opt/llvm/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin"
|
|
|
|
export LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
|
|
|
|
export CPPFLAGS="-I/usr/local/opt/llvm/include -msse -msse2 -mcx16 -no-pie"
|
2022-02-17 23:19:11 +00:00
|
|
|
export CPLUS_INCLUDE_PATH="/usr/local/opt/molten-vk/include"
|
2022-01-22 17:16:34 +00:00
|
|
|
export VULKAN_SDK="/usr/local/opt/molten-vk"
|
2022-01-04 19:55:42 +00:00
|
|
|
export VK_ICD_FILENAMES="$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json"
|
|
|
|
|
|
|
|
git submodule update --init --recursive --depth 1
|
|
|
|
|
|
|
|
# 3rdparty fixes
|
|
|
|
ln -s "$VULKAN_SDK/lib/libMoltenVK.dylib" "$VULKAN_SDK/lib/libvulkan.dylib"
|
|
|
|
sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVersionNumber = 1343;/g" 3rdparty/hidapi/hidapi/mac/hid.c
|
|
|
|
|
2020-04-07 02:53:23 +00:00
|
|
|
mkdir build && cd build || exit 1
|
2022-01-04 19:55:42 +00:00
|
|
|
|
2022-01-05 08:32:13 +00:00
|
|
|
cmake .. \
|
|
|
|
-DUSE_DISCORD_RPC=OFF -DUSE_VULKAN=ON -DUSE_ALSA=OFF -DUSE_PULSE=OFF -DUSE_AUDIOUNIT=ON \
|
|
|
|
-DLLVM_CCACHE_BUILD=OFF -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF \
|
|
|
|
-DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF \
|
|
|
|
-DLLVM_INCLUDE_UTILS=OFF -DLLVM_USE_PERF=OFF -DLLVM_ENABLE_Z3_SOLVER=OFF \
|
|
|
|
-DUSE_NATIVE_INSTRUCTIONS=OFF \
|
|
|
|
-G Ninja
|
2022-01-04 19:55:42 +00:00
|
|
|
|
2022-01-05 08:32:13 +00:00
|
|
|
ninja; build_status=$?;
|
2022-01-04 19:55:42 +00:00
|
|
|
|
2022-01-05 08:32:13 +00:00
|
|
|
cd ..
|
2022-01-04 19:55:42 +00:00
|
|
|
|
2022-01-05 08:32:13 +00:00
|
|
|
{ [ "$CI_HAS_ARTIFACTS" = "true" ];
|
|
|
|
} && SHOULD_DEPLOY="true" || SHOULD_DEPLOY="false"
|
2022-01-04 19:55:42 +00:00
|
|
|
|
2022-01-05 08:32:13 +00:00
|
|
|
if [ "$build_status" -eq 0 ] && [ "$SHOULD_DEPLOY" = "true" ]; then
|
|
|
|
.ci/deploy-mac.sh
|
|
|
|
fi
|