Skip to content

Commit

Permalink
Update macOS GitHub runner, SDL and extend compatibility (#217)
Browse files Browse the repository at this point in the history
* Update SDL and SDL_mixer on macOS

* Extend (Intel) Mac compatibility all the way to OS X El Capitan

* Update macOS runner due to GitHub deprecation but still use and Xcode version that supports 10.11
  • Loading branch information
orazioedoardo authored Aug 21, 2024
1 parent cef716e commit 182bd93
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ReleaseBuilds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ on: [workflow_dispatch]

jobs:
build-macos:
runs-on: macos-11
runs-on: macos-12
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: master

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 13

- run: bash build-mac-app.sh

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: mac-build
path: SpaceCadetPinball-*-mac.dmg
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if(APPLE)
set(MACOSX_RPATH)
set(CMAKE_BUILD_WITH_INSTALL_RPATH true)
set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
list(APPEND SDL2_PATH "${CMAKE_CURRENT_LIST_DIR}/Libs")
list(APPEND SDL2_MIXER_PATH "${CMAKE_CURRENT_LIST_DIR}/Libs")
Expand Down
2 changes: 2 additions & 0 deletions Platform/macOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
</array>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.11</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
Expand Down
10 changes: 5 additions & 5 deletions build-mac-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ mkdir -p Libs

cd Libs

sdl_version='2.28.1'
sdl_version='2.30.4'
sdl_filename="SDL2-$sdl_version.dmg"
sdl_url="https://github.com/libsdl-org/SDL/releases/download/release-$sdl_version/$sdl_filename"

sdl_mixer_version='2.7.0'
sdl_mixer_version='2.8.0'
sdl_mixer_filename="SDL2_mixer-$sdl_mixer_version.dmg"
sdl_mixer_url="https://www.libsdl.org/tmp/$sdl_mixer_filename"
sdl_mixer_url="https://github.com/libsdl-org/SDL_mixer/releases/download/release-$sdl_mixer_version/$sdl_mixer_filename"

mount_point="$(mktemp -d)"

if [ ! -f "$sdl_filename" ]; then
curl -sSf -L -O "$sdl_url"
fi

echo "2f936225c10a402cab07055e6f75de76f991945c37feb0cf6af633a96d2fb28c $sdl_filename" | shasum -a 256 -c
echo "2bf2cb8f6b44d584b14e8d4ca7437080d1d968fe3962303be27217b336b82249 $sdl_filename" | shasum -a 256 -c
hdiutil attach "$sdl_filename" -mountpoint "$mount_point" -quiet
cp -a "$mount_point/SDL2.framework" .
hdiutil detach "$mount_point"
Expand All @@ -29,7 +29,7 @@ if [ ! -f "$sdl_mixer_filename" ]; then
curl -sSf -L -O "$sdl_mixer_url"
fi

echo "f394c714c8aefdcae0ff9d6eefeb5d42f28e56ed09fcaebb796cb672ca11279d $sdl_mixer_filename" | shasum -a 256 -c
echo "aea973d78f2949b0b2404379dfe775ac367c69485c1d25a5c59f109797f18adf $sdl_mixer_filename" | shasum -a 256 -c
hdiutil attach "$sdl_mixer_filename" -mountpoint "$mount_point" -quiet
cp -a "$mount_point/SDL2_mixer.framework" .
hdiutil detach "$mount_point"
Expand Down

0 comments on commit 182bd93

Please sign in to comment.