From f9e1eca503f1ea2259c262a9eae5d649e871960b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Fri, 6 Dec 2024 12:47:49 +0100 Subject: [PATCH] macOS: SDK fixes --- src/scripts/build_mac.sh | 20 ++++++++++++-------- src/scripts/build_mac_sdk.sh | 17 ++++++++++++++--- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/scripts/build_mac.sh b/src/scripts/build_mac.sh index 2353761b9..15f03de18 100755 --- a/src/scripts/build_mac.sh +++ b/src/scripts/build_mac.sh @@ -32,6 +32,12 @@ BUILD_DIR=${BUILD_DIR:-"${CWD}/build-release"} export PATH="${SDK}/bin:/usr/bin:/bin:/usr/sbin:/sbin" export PKG_CONFIG_PATH="${SDK}/lib/pkgconfig" +whereis python +python --version + +whereis ninja +ninja --version + whereis cmake cmake --version @@ -40,8 +46,6 @@ pkg-config --version clang --version -ls -l ${SDK}/bin - if [ -d "${BUILD_DIR}" ]; then rm -rf ${BUILD_DIR} fi @@ -67,12 +71,12 @@ fi cmake --build . -#if [ "${BUILD_ENGINE}" = "ON" ]; then -# (cd src/engine ; -# tar cvvf friction-skia-build-${GIT_COMMIT}.tar skia -# mv friction-skia-build-${GIT_COMMIT}.tar ${BUILD_DIR}/ -# ) -#fi +if [ "${BUILD_ENGINE}" = "ON" ]; then + (cd src/engine ; + tar cvvf skia-build-macOS-${GIT_COMMIT}.tar skia + mv skia-build-macOS-${GIT_COMMIT}.tar ${BUILD_DIR}/ + ) +fi mv src/app/friction.app src/app/Friction.app macdeployqt src/app/Friction.app diff --git a/src/scripts/build_mac_sdk.sh b/src/scripts/build_mac_sdk.sh index fc30b2c4b..ff34eddcc 100755 --- a/src/scripts/build_mac_sdk.sh +++ b/src/scripts/build_mac_sdk.sh @@ -22,6 +22,7 @@ set -e -x # keep in sync with other SDK's +PYTHON_V=3.11.11 NINJA_V=1.11.1 CMAKE_V=3.26.3 NASM_V=2.14.02 @@ -71,10 +72,20 @@ if [ ! -d "${SDK}" ]; then mkdir -p "${SDK}/bin" mkdir -p "${SDK}/src" (cd "${SDK}"; ln -sf lib lib64) - (cd "${SDK}/bin"; ln -sf /usr/bin/python3 python) fi -alias python="/usr/bin/python3" +# python +if [ ! -f "${PYTHON_BIN}" ]; then + cd ${SRC} + PY_SRC=Python-${PYTHON_V} + rm -rf ${PY_SRC} || true + tar xf ${DIST}/tools/${PY_SRC}.tar.xz + cd ${PY_SRC} + ./configure ${COMMON_CONFIGURE} + make -j${MKJOBS} + make install + (cd ${SDK}/bin ; ln -sf python3 python) +fi # python # ninja if [ ! -f "${NINJA_BIN}" ]; then @@ -83,7 +94,7 @@ if [ ! -f "${NINJA_BIN}" ]; then rm -rf ${NINJA_SRC} || true tar xf ${DIST}/tools/${NINJA_SRC}.tar.gz cd ${NINJA_SRC} - ./configure.py --bootstrap + ${PYTHON_BIN} configure.py --bootstrap cp -a ninja ${NINJA_BIN} fi # ninja