Skip to content

Commit 06c773c

Browse files
committed
Update macOS SDK/CI
- Upgraded to Qt 5.16.19 + patches - Made the CI script more modular
1 parent 58c4d25 commit 06c773c

3 files changed

Lines changed: 54 additions & 26 deletions

File tree

src/scripts/build_mac_ci.sh

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,61 @@ REL=${REL:-"OFF"}
2525
BRANCH=${BRANCH:-`git rev-parse --abbrev-ref HEAD`}
2626
COMMIT=${COMMIT:-`git rev-parse --short=8 HEAD`}
2727
CUSTOM=${CUSTOM:-"CI"}
28+
BUILD_ARM=${BUILD_ARM:-1}
29+
BUILD_INTEL=${BUILD_INTEL:-1}
30+
BUILD_UNIVERSAL=${BUILD_UNIVERSAL:-1}
2831

29-
SDK=1.0.0
30-
SDK_REV=r5
31-
SDK_URL=https://github.com/friction2d/friction-sdk/releases/download/v${SDK}
32-
SDK_TAR=friction-sdk-${SDK}${SDK_REV}-macOS.tar.xz
33-
SDK_SHA256=36a30cb68862d3cd0fe39f9c283f1a9fb9cf2ea01a9dfc65c85024b0c2171d2d
34-
35-
if [ ! -d "${CWD}/sdk" ]; then
36-
curl -OL ${SDK_URL}/${SDK_TAR}
37-
echo "${SDK_SHA256} ${SDK_TAR}" | shasum -a 256 --check
38-
tar xf ${SDK_TAR}
32+
if [ "${BUILD_UNIVERSAL}" = 1 ]; then
33+
BUILD_ARM=1
34+
BUILD_INTEL=1
3935
fi
4036

41-
git submodule update --init --recursive
37+
SDK_PATH=${CWD}/sdk
38+
SDK_VERSION=1.0.0
39+
SDK_REV=r6
40+
SDK_URL=https://github.com/friction2d/friction-sdk/releases/download/v${SDK_VERSION}
41+
SDK_BASE=friction-sdk-${SDK_VERSION}${SDK_REV}-macOS
42+
SDK_ARM_TAR=${SDK_BASE}-arm64.tar.xz
43+
SDK_INTEL_TAR=${SDK_BASE}-x86_64.tar.xz
44+
SDK_ARM_SHA256=46a6e44b5d55f681f9dbddaa321635bfbc18cd080a649e48029d6b28cb41ad85
45+
SDK_INTEL_SHA256=c25c2a220a6f801edde67b2ce6aca3564ff7a0f7e0c00e35bac7878f1632d560
4246

43-
export CUSTOM=CI
44-
export REL=$REL
47+
if [ ! -d "${SDK_PATH}" ]; then
48+
mkdir -p "${SDK_PATH}"
49+
if [ "${BUILD_ARM}" = 1 ]; then
50+
curl -OL ${SDK_URL}/${SDK_ARM_TAR}
51+
echo "${SDK_ARM_SHA256} ${SDK_ARM_TAR}" | shasum -a 256 --check
52+
(cd "${SDK_PATH}" ; tar xf ${CWD}/${SDK_ARM_TAR} )
53+
fi
54+
if [ "${BUILD_INTEL}" = 1 ]; then
55+
curl -OL ${SDK_URL}/${SDK_INTEL_TAR}
56+
echo "${SDK_INTEL_SHA256} ${SDK_INTEL_TAR}" | shasum -a 256 --check
57+
(cd "${SDK_PATH}" ; tar xf ${CWD}/${SDK_INTEL_TAR} )
58+
fi
59+
fi
4560

46-
cd ${CWD}
47-
arch -x86_64 ./src/scripts/build_mac.sh
61+
git submodule update --init --recursive
4862

49-
cd ${CWD}
50-
./src/scripts/build_mac.sh
63+
export CUSTOM=${CUSTOM}
64+
export REL=${REL}
65+
export BRANCH=${BRANCH}
66+
export COMMIT=${COMMIT}
5167

52-
cd ${CWD}
68+
if [ "${BUILD_INTEL}" = 1 ]; then
69+
cd "${CWD}"
70+
arch -x86_64 ./src/scripts/build_mac.sh
71+
fi
5372

54-
VERSION=`cat build-release-arm64/version.txt`
55-
if [ "${REL}" != "ON" ]; then
56-
VERSION="${VERSION}-${COMMIT}"
73+
if [ "${BUILD_ARM}" = 1 ]; then
74+
cd "${CWD}"
75+
./src/scripts/build_mac.sh
5776
fi
5877

59-
VERSION=${VERSION} ./src/scripts/build_mac_universal.sh
78+
if [ "${BUILD_UNIVERSAL}" = 1 ]; then
79+
cd "${CWD}"
80+
VERSION=`cat build-release-arm64/version.txt`
81+
if [ "${REL}" != "ON" ]; then
82+
VERSION="${VERSION}-${COMMIT}"
83+
fi
84+
VERSION=${VERSION} ./src/scripts/build_mac_universal.sh
85+
fi

src/scripts/build_mac_sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ NASM_V=2.14.02
3030
YASM_V=1.3.0
3131
PKGCONF_V=1.1.0
3232

33-
QT_V=5.15.18_20251101_d8220074
33+
QT_V=5.15.19_20260520_aa749695
3434
QSCINTILLA_V=2.14.1
3535

3636
LAME_V=3.100

src/scripts/patches/qtbase-macos-versions.diff

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
--- qtbase/src/corelib/global/qglobal.cpp.orig 2025-06-11 18:07:02
2-
+++ qtbase/src/corelib/global/qglobal.cpp 2025-06-11 18:09:20
3-
@@ -2137,6 +2137,12 @@
1+
--- qtbase/src/corelib/global/qglobal.cpp.orig 2026-06-25 19:19:06
2+
+++ qtbase/src/corelib/global/qglobal.cpp 2026-06-25 19:23:11
3+
@@ -2137,6 +2137,14 @@
44
static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSystemVersion::current())
55
{
66
#ifdef Q_OS_MACOS
7+
+ if (version.majorVersion() == 17 || version.majorVersion() == 27)
8+
+ return "Golden Gate";
79
+ if (version.majorVersion() == 16 || version.majorVersion() == 26)
810
+ return "Tahoe";
911
+ if (version.majorVersion() == 15)

0 commit comments

Comments
 (0)