Skip to content

Commit

Permalink
macOS: SDK fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Dec 6, 2024
1 parent 6e060a2 commit f9e1eca
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
20 changes: 12 additions & 8 deletions src/scripts/build_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -40,8 +46,6 @@ pkg-config --version

clang --version

ls -l ${SDK}/bin

if [ -d "${BUILD_DIR}" ]; then
rm -rf ${BUILD_DIR}
fi
Expand All @@ -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
Expand Down
17 changes: 14 additions & 3 deletions src/scripts/build_mac_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit f9e1eca

Please sign in to comment.