Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
CI checks for macOS 15
NotProtonNot2c8125e01505
diff --git a/.github/workflows/app.yml b/.github/workflows/app.ymlindex fa19327..d009c6e 100644--- a/.github/workflows/app.yml+++ b/.github/workflows/app.yml@@ -102,6 +102,9 @@ jobs:- name: Build the apprun: make app+ - name: Check the minimum macOS version+ run: make -s mincheck+- name: Run the hermetic C suitesrun: |make -s sigcheckdiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex f914c38..07d24d4 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -39,6 +39,7 @@ jobs:codesign --verify --strict release/extracted/NotProton.appactual=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' release/extracted/NotProton.app/Contents/Info.plist)test "$actual" = "$VERSION"+ make -s mincheck APP_BUNDLE=release/extracted/NotProton.app- name: Resolve Sparkle toolsrun: swift package resolve --package-path appdiff --git a/Makefile b/Makefileindex ccb5d00..7499acb 100644--- a/Makefile+++ b/Makefile@@ -1,8 +1,9 @@CC := clangARCH := arm64MIN_VER := 15.0+AVAIL := -Werror=unguarded-availability-new-CFLAGS := -arch $(ARCH) -mmacosx-version-min=$(MIN_VER) \+CFLAGS := -arch $(ARCH) -mmacosx-version-min=$(MIN_VER) $(AVAIL) \-std=c17 -O2 -Wall -Wextra -Wno-unused-parameter \-fPIC -MMD -MP \-Idylib -Ivendor -Ivendor/dobby/include@@ -124,6 +125,10 @@ launchercheck:@if [ ! -f dylib/tests/launchercheck.sh ]; then $(call SKIP,launchercheck,dylib/tests/launchercheck.sh); exit 0; fi; \sh dylib/tests/launchercheck.sh dylib/feats/compat_run.sh+.PHONY: mincheck+mincheck:+ @sh dylib/tests/mincheck.sh "$(APP_BUNDLE)" "$(MIN_VER)"+# runcheck owns compat_run.sh, whose warnings wait for a change that can move# the embedded __text baselineSCRIPTS := $(shell git ls-files '*.sh' 2>/dev/null | grep -v '^dylib/feats/compat_run\.sh$$')@@ -341,7 +346,7 @@ $(ARM64_DYLIB): $(OBJS)$(X86_STUB): dylib/stub_x86_64.c@mkdir -p $(dir $@)- $(CC) -arch x86_64 -mmacosx-version-min=$(MIN_VER) \+ $(CC) -arch x86_64 -mmacosx-version-min=$(MIN_VER) $(AVAIL) \-dynamiclib -install_name @rpath/notproton.dylib \-o $@ $<@@ -365,7 +370,7 @@ OVERLAY_SHIM_SRC := overlay-shim/overlay_shim.mOVERLAY_SHIM_ARM := $(OUT_DIR)/overlay-shim.arm64.dylibOVERLAY_SHIM_X86 := $(OUT_DIR)/overlay-shim.x86_64.dylibOVERLAY_SHIM := $(OUT_DIR)/overlay-shim.dylib-OVERLAY_SHIM_FLAGS := -mmacosx-version-min=$(MIN_VER) -dynamiclib -O2 -Wall -Wextra \+OVERLAY_SHIM_FLAGS := -mmacosx-version-min=$(MIN_VER) $(AVAIL) -dynamiclib -O2 -Wall -Wextra \-install_name @rpath/overlay-shim.dylib \-framework Metal -framework QuartzCore \-framework CoreGraphics -framework CoreFoundation@@ -432,7 +437,7 @@ iconmaker: $(ICONMAKER)$(ICONMAKER): helpers/iconmaker.swift dylib/util/peicon.c dylib/util/peicon.h@mkdir -p $(OUT_DIR)- $(CC) -c -arch $(ARCH) -mmacosx-version-min=$(MIN_VER) -std=c17 -O2 \+ $(CC) -c -arch $(ARCH) -mmacosx-version-min=$(MIN_VER) $(AVAIL) -std=c17 -O2 \-Wall -Wextra -o $(OUT_DIR)/peicon-host.o dylib/util/peicon.cswiftc -O -target $(ARCH)-apple-macos$(MIN_VER) \-framework AppKit -import-objc-header dylib/util/peicon.h \diff --git a/dylib/tests/mincheck.sh b/dylib/tests/mincheck.shnew file mode 100644index 0000000..ebdbc98--- /dev/null+++ b/dylib/tests/mincheck.sh@@ -0,0 +1,47 @@+#!/bin/sh+set -eu++app="$1"+min="$2"++[ -d "$app" ] || { echo "mincheck: $app not found"; exit 1; }++newer() {+ awk -v a="$1" -v b="$2" 'BEGIN {+ split(a, x, "."); split(b, y, ".")+ for (i = 1; i <= 3; i++) {+ if (x[i] + 0 > y[i] + 0) exit 0+ if (x[i] + 0 < y[i] + 0) exit 1+ }+ exit 1+ }'+}++checked=0+bad=0+list=$(mktemp)+trap 'rm -f "$list"' EXIT+find "$app" -type f > "$list"+while IFS= read -r f; do+ case "$(file -b "$f")" in Mach-O*) ;; *) continue ;; esac+ checked=$((checked + 1))+ versions=$(xcrun vtool -show-build "$f" 2>/dev/null | awk '+ $1 == "cmd" { cmd = $2 }+ cmd == "LC_BUILD_VERSION" && $1 == "minos" { print $2 }+ cmd == "LC_VERSION_MIN_MACOSX" && $1 == "version" { print $2 }')+ if [ -z "$versions" ]; then+ echo " no minimum version: ${f#"$app"/}"+ bad=1+ continue+ fi+ for v in $versions; do+ if newer "$v" "$min"; then+ echo " needs macOS $v: ${f#"$app"/}"+ bad=1+ fi+ done+done < "$list"++[ "$checked" -gt 0 ] || { echo "mincheck: no Mach-O files in $app"; exit 1; }+[ "$bad" -eq 0 ] || { echo "==> mincheck: binaries above macOS $min"; exit 1; }+echo "==> mincheck: $checked binaries run on macOS $min"diff --git a/lsteamclient/build.sh b/lsteamclient/build.shindex b770dd0..14ffa54 100755--- a/lsteamclient/build.sh+++ b/lsteamclient/build.sh@@ -155,7 +155,7 @@ if [ "$do_unix" -eq 1 ]; thencount=$(echo "$objs" | wc -l | tr -d ' ')echo "==> unix half: $count sources from Makefile.in SOURCES"- CXXFLAGS="-arch $UNIX_ARCH -mmacosx-version-min=$MIN_VER -I$dll -I$src -Iinclude -I$WINE_SRC_REL/include \+ CXXFLAGS="-arch $UNIX_ARCH -mmacosx-version-min=$MIN_VER -Werror=unguarded-availability-new -I$dll -I$src -Iinclude -I$WINE_SRC_REL/include \-D__WINESRC__ -DSTEAM_API_EXPORTS -Dprivate=public -Dprotected=public -DWINE_UNIX_LIB \-fPIC -fasynchronous-unwind-tables -g -O2"