Add backwards compatibility for older versions of macOS and add new macOS Icon (#957)
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled

Here are the changes:

- Update each runner to their respective latest versions (Arm is macOS-26 preview, and intel is macOS-15-intel)
- Compiled glew and sdl2 manually, specifically targeting 11 (big sur) on arm and 10.15 (catalina) on intel
- Recompiled arm lua libs to support Big Sur
- Add new icon designed for macOS 26 (tahoe), including backwards compatibility support for versions prior to tahoe

Few things to note are

- Vscode automatically removed white lines in the workflow for actions, if I need to revert it lmk.
- I tested this in a vm on macOS 11 (Monterey), and it appeared to work. If someone on intel is on macOS 10.15 (Catalina) or someone on arm is on macOS 11 (Big Sur), it would be greatly appreciated if you could test this. Even if you're on a slightly newer version that isn't supported in the current version, that would be appreciated. You can find the zipped builds [here](https://github.com/EmeraldLoc/random-files)
This commit is contained in:
EmeraldLockdown 2026-02-22 16:35:53 -06:00 committed by GitHub
parent f6f5434dda
commit 2fcf14d08d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 98 additions and 25 deletions

View file

@ -26,7 +26,7 @@ jobs:
cd tools
g++ -std=c++17 -o hash_file hash_file.cpp
echo "::notice ::$(./hash_file ../build/us_pc/sm64coopdx)"
- name: Zip the game
run: |
cd ./build/us_pc
@ -37,7 +37,7 @@ jobs:
with:
name: sm64coopdx-linux
path: ./build/us_pc/sm64coopdx_Linux.zip
build-steamos:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: ubuntu-22.04
@ -58,7 +58,7 @@ jobs:
cd tools
g++ -std=c++17 -o hash_file hash_file.cpp
echo "::notice ::$(./hash_file ../build/us_pc/sm64coopdx)"
- name: Zip the game
run: |
cd ./build/us_pc
@ -108,7 +108,7 @@ jobs:
cd tools
g++ -std=c++17 -o hash_file.exe hash_file.cpp
echo "::notice ::$(./hash_file.exe ../build/us_pc/sm64coopdx.exe)"
- name: Zip the game
run: |
cd ./build/us_pc
@ -158,7 +158,7 @@ jobs:
cd tools
g++ -std=c++17 -o hash_file.exe hash_file.cpp
echo "::notice ::$(./hash_file.exe ../build/us_pc/sm64coopdx.exe)"
- name: Zip the game
run: |
cd ./build/us_pc
@ -172,17 +172,36 @@ jobs:
build-macos-arm:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[build]') }}
runs-on: macos-latest
runs-on: macos-26
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install make mingw-w64 sdl2 pkg-config glew glfw3 coreutils
brew install make mingw-w64 pkg-config glfw3 coreutils
- name: Compile glew
run: |
export MACOSX_DEPLOYMENT_TARGET=11
curl -L -o glew.tar.gz https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz
tar -xzf glew.tar.gz
cd glew-2.2.0
make SYSTEM=darwin CC="clang -arch arm64 -mmacosx-version-min=11" GLEW_PREFIX=/opt/homebrew GLEW_DEST=/opt/homebrew
make install GLEW_PREFIX=/opt/homebrew GLEW_DEST=/opt/homebrew
- name: Compile SDL2
run: |
curl -L -o SDL2.tar.gz https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz
tar -xzf SDL2.tar.gz
cd SDL2-2.30.9
./configure --prefix=/opt/homebrew CC="clang -arch arm64 -mmacosx-version-min=11"
make -j$(sysctl -n hw.ncpu)
make install
- name: Build the game
run: |
export PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH
gmake OSX_BUILD=1 -j$(sysctl -n hw.ncpu)
- name: Code sign the app (Ad-Hoc)
@ -199,7 +218,7 @@ jobs:
run: |
cd ./build/us_pc
zip -r sm64coopdx_macOS_ARM.zip sm64coopdx.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
@ -215,7 +234,25 @@ jobs:
- name: Install dependencies
run: |
brew install make mingw-w64 gcc@9 sdl2 pkg-config glew glfw3 coreutils
brew install make mingw-w64 gcc@9 pkg-config glfw3 coreutils
- name: Compile glew
run: |
export MACOSX_DEPLOYMENT_TARGET=10.15
curl -L -o glew.tar.gz https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz
tar -xzf glew.tar.gz
cd glew-2.2.0
make SYSTEM=darwin CC="clang -arch x86_64 -mmacosx-version-min=10.15"
make install
- name: Compile SDL2
run: |
curl -L -o SDL2.tar.gz https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz
tar -xzf SDL2.tar.gz
cd SDL2-2.30.9
./configure --prefix=/usr/local CC="clang -arch x86_64 -mmacosx-version-min=10.15"
make -j$(sysctl -n hw.ncpu)
make install
- name: Build the game
run: |
@ -235,7 +272,7 @@ jobs:
run: |
cd ./build/us_pc
zip -r sm64coopdx_macOS_Intel.zip sm64coopdx.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:

View file

@ -64,12 +64,7 @@ ICON ?= 1
# Use .app (for macOS)
USE_APP ?= 1
# Minimum macOS Version
# If our arch is arm, set to macOS 14
ifeq ($(shell arch),arm64)
MIN_MACOS_VERSION ?= 14
else
MIN_MACOS_VERSION ?= 10.15
endif
MIN_MACOS_VERSION ?= 11
# Make some small adjustments for handheld devices
HANDHELD ?= 0
@ -1575,15 +1570,15 @@ endif
# with no prerequisites, .SECONDARY causes no intermediate target to be removed
.SECONDARY:
# Handle end of macOS compilation
APP_DIR = ./sm64coopdx.app
APP_CONTENTS_DIR = $(APP_DIR)/Contents
APP_MACOS_DIR = $(APP_CONTENTS_DIR)/MacOS
APP_RESOURCES_DIR = $(APP_CONTENTS_DIR)/Resources
ifeq ($(OSX_BUILD),1)
GLEW_LIB := $(shell find $(BREW_PREFIX)/Cellar/glew | grep libGLEW.2.2.0 | sort -n | uniq)
SDL2_LIB := $(shell find $(BREW_PREFIX)/Cellar/sdl2 | grep libSDL2- | sort -n | uniq)
GLEW_LIB := $(shell find $(BREW_PREFIX)/lib/ | grep libGLEW.2.2.0 | sort -n | uniq)
SDL2_LIB := $(shell find $(BREW_PREFIX)/lib/ | grep libSDL2- | sort -n | uniq)
endif
all:
@ -1605,14 +1600,20 @@ all:
cp build/us_pc/libcoopnet.dylib $(APP_MACOS_DIR); \
cp build/us_pc/libjuice.1.6.2.dylib $(APP_MACOS_DIR); \
cp $(SDL2_LIB) $(APP_MACOS_DIR)/libSDL2.dylib; \
install_name_tool -change $(BREW_PREFIX)/opt/sdl2/lib/libSDL2-2.0.0.dylib @executable_path/libSDL2.dylib $(APP_MACOS_DIR)/sm64coopdx; > /dev/null 2>&1 \
install_name_tool -id @executable_path/libSDL2.dylib $(APP_MACOS_DIR)/libSDL2.dylib; > /dev/null 2>&1 \
install_name_tool -change $(BREW_PREFIX)/lib/libSDL2-2.0.0.dylib @executable_path/libSDL2.dylib $(APP_MACOS_DIR)/sm64coopdx > /dev/null 2>&1; \
install_name_tool -change $(BREW_PREFIX)/opt/sdl2/lib/libSDL2-2.0.0.dylib @executable_path/libSDL2.dylib $(APP_MACOS_DIR)/sm64coopdx > /dev/null 2>&1; \
install_name_tool -id @executable_path/libSDL2.dylib $(APP_MACOS_DIR)/libSDL2.dylib > /dev/null 2>&1; \
codesign --force --deep --sign - $(APP_MACOS_DIR)/libSDL2.dylib; \
cp $(GLEW_LIB) $(APP_MACOS_DIR)/libGLEW.dylib; \
install_name_tool -change $(BREW_PREFIX)/opt/glew/lib/libGLEW.2.2.dylib @executable_path/libGLEW.dylib $(APP_MACOS_DIR)/sm64coopdx; > /dev/null 2>&1 \
install_name_tool -id @executable_path/libGLEW.dylib $(APP_MACOS_DIR)/libGLEW.dylib; > /dev/null 2>&1 \
install_name_tool -change $(BREW_PREFIX)/lib/libGLEW.2.2.0.dylib @executable_path/libGLEW.dylib $(APP_MACOS_DIR)/sm64coopdx > /dev/null 2>&1; \
install_name_tool -change $(BREW_PREFIX)/opt/glew/lib/libGLEW.2.2.0.dylib @executable_path/libGLEW.dylib $(APP_MACOS_DIR)/sm64coopdx > /dev/null 2>&1; \
install_name_tool -id @executable_path/libGLEW.dylib $(APP_MACOS_DIR)/libGLEW.dylib > /dev/null 2>&1; \
codesign --force --deep --sign - $(APP_MACOS_DIR)/libGLEW.dylib; \
cp res/icon.icns $(APP_RESOURCES_DIR)/icon.icns; \
mkdir res/build; \
xcrun actool res/icon.icon --compile res/build --app-icon icon --output-partial-info-plist res/build/Info.plist --minimum-deployment-target $(MIN_MACOS_VERSION) --platform macosx > /dev/null 2>&1; \
mv res/build/Assets.car $(APP_RESOURCES_DIR)/; \
cp res/icon.icns $(APP_RESOURCES_DIR)/; \
rm -rf res/build; \
echo "APPL????" > $(APP_CONTENTS_DIR)/PkgInfo; \
echo '<?xml version="1.0" encoding="UTF-8"?>' > $(APP_CONTENTS_DIR)/Info.plist; \
echo '<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' >> $(APP_CONTENTS_DIR)/Info.plist; \
@ -1623,7 +1624,7 @@ all:
echo ' <key>CFBundleIconFile</key>' >> $(APP_CONTENTS_DIR)/Info.plist; \
echo ' <string>icon</string>' >> $(APP_CONTENTS_DIR)/Info.plist; \
echo ' <key>CFBundleIconName</key>' >> $(APP_CONTENTS_DIR)/Info.plist; \
echo ' <string>AppIcon</string>' >> $(APP_CONTENTS_DIR)/Info.plist; \
echo ' <string>icon</string>' >> $(APP_CONTENTS_DIR)/Info.plist; \
echo ' <key>CFBundleDisplayName</key>' >> $(APP_CONTENTS_DIR)/Info.plist; \
echo ' <string>sm64coopdx</string>' >> $(APP_CONTENTS_DIR)/Info.plist; \
echo ' <!-- Add other keys and values here -->' >> $(APP_CONTENTS_DIR)/Info.plist; \

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

35
res/icon.icon/icon.json Normal file
View file

@ -0,0 +1,35 @@
{
"fill" : "automatic",
"groups" : [
{
"layers" : [
{
"image-name" : "icon.png",
"name" : "icon",
"position" : {
"scale" : 3.5,
"translation-in-points" : [
0,
0
]
}
}
],
"shadow" : {
"kind" : "neutral",
"opacity" : 0.5
},
"specular" : false,
"translucency" : {
"enabled" : false,
"value" : 0.5
}
}
],
"supported-platforms" : {
"circles" : [
"watchOS"
],
"squares" : "shared"
}
}