mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Support macOS: AMD64 and ARM64
This commit is contained in:
parent
2fa4f6c226
commit
a5c2ad45dc
@ -476,13 +476,7 @@ Ubuntu_GCC_integration_tests_asan:
|
||||
ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_leaks=0
|
||||
|
||||
.MacOS:
|
||||
image: macos-11-xcode-12
|
||||
tags:
|
||||
- shared-macos-amd64
|
||||
stage: build
|
||||
only:
|
||||
variables:
|
||||
- $CI_PROJECT_ID == "7107382"
|
||||
cache:
|
||||
paths:
|
||||
- ccache/
|
||||
@ -502,11 +496,24 @@ Ubuntu_GCC_integration_tests_asan:
|
||||
- build/OpenMW-*.dmg
|
||||
- "build/**/*.log"
|
||||
|
||||
macOS12_Xcode13:
|
||||
macOS12_Xcode14_amd64:
|
||||
extends: .MacOS
|
||||
image: macos-12-xcode-13
|
||||
image: macos-12-xcode-14
|
||||
tags:
|
||||
- shared-macos-amd64
|
||||
cache:
|
||||
key: macOS12_Xcode13.v1
|
||||
key: macOS12_Xcode14_amd64.v1
|
||||
variables:
|
||||
CCACHE_SIZE: 3G
|
||||
MACOS_AMD64: 1
|
||||
|
||||
macOS13_Xcode14_arm64:
|
||||
extends: .MacOS
|
||||
image: macos-12-xcode-14
|
||||
tags:
|
||||
- saas-macos-medium-m1
|
||||
cache:
|
||||
key: macOS12_Xcode14_arm64.v1
|
||||
variables:
|
||||
CCACHE_SIZE: 3G
|
||||
|
||||
|
@ -4,27 +4,36 @@ export HOMEBREW_NO_EMOJI=1
|
||||
|
||||
brew uninstall --ignore-dependencies python@3.8 || true
|
||||
brew uninstall --ignore-dependencies python@3.9 || true
|
||||
brew uninstall --ignore-dependencies qt@6 || true
|
||||
brew uninstall --ignore-dependencies qt@5 || true
|
||||
brew uninstall --ignore-dependencies jpeg || true
|
||||
|
||||
brew tap --repair
|
||||
brew update --quiet
|
||||
|
||||
# Some of these tools can come from places other than brew, so check before installing
|
||||
brew reinstall xquartz fontconfig
|
||||
brew reinstall xquartz fontconfig freetype harfbuzz brotli
|
||||
|
||||
# Fix: can't open file: @loader_path/libbrotlicommon.1.dylib (No such file or directory)
|
||||
BREW_LIB_PATH="$(brew --prefix)/lib"
|
||||
install_name_tool -change "@loader_path/libbrotlicommon.1.dylib" "${BREW_LIB_PATH}/libbrotlicommon.1.dylib" ${BREW_LIB_PATH}/libbrotlidec.1.dylib
|
||||
install_name_tool -change "@loader_path/libbrotlicommon.1.dylib" "${BREW_LIB_PATH}/libbrotlicommon.1.dylib" ${BREW_LIB_PATH}/libbrotlienc.1.dylib
|
||||
|
||||
command -v ccache >/dev/null 2>&1 || brew install ccache
|
||||
command -v cmake >/dev/null 2>&1 || brew install cmake
|
||||
command -v qmake >/dev/null 2>&1 || brew install qt@5
|
||||
command -v qmake >/dev/null 2>&1 || brew install qt@6
|
||||
|
||||
# Install deps
|
||||
brew install icu4c yaml-cpp sqlite
|
||||
export PATH="/usr/local/opt/qt@5/bin:$PATH" # needed to use qmake in none default path as qt now points to qt6
|
||||
|
||||
ccache --version
|
||||
cmake --version
|
||||
qmake --version
|
||||
|
||||
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20221113.zip -o ~/openmw-deps.zip
|
||||
unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null
|
||||
if [[ "${MACOS_AMD64}" ]]; then
|
||||
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20221113.zip -o ~/openmw-deps.zip
|
||||
else
|
||||
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20230223_arm64.zip -o ~/openmw-deps.zip
|
||||
fi
|
||||
|
||||
unzip -o ~/openmw-deps.zip -d /tmp > /dev/null
|
||||
|
||||
|
@ -6,8 +6,10 @@ export CC=clang
|
||||
# Silence a git warning
|
||||
git config --global advice.detachedHead false
|
||||
|
||||
DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps"
|
||||
QT_PATH=$(brew --prefix qt@5)
|
||||
DEPENDENCIES_ROOT="/tmp/openmw-deps"
|
||||
|
||||
QT_PATH=$(brew --prefix qt@6)
|
||||
ICU_PATH=$(brew --prefix icu4c)
|
||||
CCACHE_EXECUTABLE=$(brew --prefix ccache)/bin/ccache
|
||||
mkdir build
|
||||
cd build
|
||||
@ -31,6 +33,6 @@ cmake \
|
||||
-D BUILD_NIFTEST=TRUE \
|
||||
-D BUILD_NAVMESHTOOL=TRUE \
|
||||
-D BUILD_BULLETOBJECTTOOL=TRUE \
|
||||
-D ICU_ROOT="/usr/local/opt/icu4c" \
|
||||
-D ICU_ROOT="$ICU_PATH" \
|
||||
-G"Unix Makefiles" \
|
||||
..
|
||||
|
Loading…
Reference in New Issue
Block a user