From 82a164e218c429dead12d37e8699b3256ca16774 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 08:35:46 -0300 Subject: [PATCH 001/106] [WIP] macOS: Add ARM64 (Apple Silicon) support Updated Xcode project for Universal Binary: - ARCHS: - includes arm64 + x86_64 - VALID_ARCHS: arm64 x86_64 (removed deprecated i386) - MACOSX_DEPLOYMENT_TARGET: 11.0 (required for ARM64) Note: Requires ARM64 FMOD Studio libraries for audio Status: Work in Progress - needs testing on Apple Silicon hardware --- OSX/RTDink.xcodeproj/project.pbxproj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index ac8abd5..f4cb710 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1615,7 +1615,7 @@ 5D8CE30214C655CE009EB534 /* Dist */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + ARCHS = "$(ARCHS_STANDARD)"; CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = c11; @@ -1637,11 +1637,11 @@ ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ); - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; PROVISIONING_PROFILE = ""; SDKROOT = macosx; - VALID_ARCHS = "i386 x86_64"; + VALID_ARCHS = "arm64 x86_64"; }; name = Dist; }; @@ -1722,7 +1722,7 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + ARCHS = "$(ARCHS_STANDARD)"; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -1751,7 +1751,7 @@ ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ); - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; SDKROOT = macosx; @@ -1761,7 +1761,7 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + ARCHS = "$(ARCHS_STANDARD)"; CODE_SIGN_IDENTITY = ""; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = c11; @@ -1787,10 +1787,10 @@ ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ); - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; SDKROOT = macosx; - VALID_ARCHS = "i386 x86_64"; + VALID_ARCHS = "arm64 x86_64"; }; name = Release; }; From 0ba8dc5a4f47df5ddec62b5a959a62a99b2baedb Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 14:14:53 -0300 Subject: [PATCH 002/106] Add missing InfoPlist.strings for macOS localization --- OSX/English.lproj/InfoPlist.strings | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 OSX/English.lproj/InfoPlist.strings diff --git a/OSX/English.lproj/InfoPlist.strings b/OSX/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..b918fdb --- /dev/null +++ b/OSX/English.lproj/InfoPlist.strings @@ -0,0 +1,4 @@ +/* Localized versions of Info.plist keys */ + +CFBundleGetInfoString = "Dink Smallwood HD v2.08, Copyright © 2024 Robinson Technologies"; +NSHumanReadableCopyright = "Copyright © 2024, Robinson Technologies"; From 0111cf61d1b294769c7089f09e9f99551502de9f Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 14:23:50 -0300 Subject: [PATCH 003/106] Add missing OSX/English.lproj/MainMenu.xib required for macOS build The Xcode project (OSX/RTDink.xcodeproj) references this file in its Resources build phase but it was never committed to the repository, causing the macOS ARM64 CI build to fail with: error: Build input file cannot be found: '.../English.lproj/MainMenu.xib' This is a standard Cocoa macOS application main menu XIB file. --- OSX/English.lproj/MainMenu.xib | 90 ++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 OSX/English.lproj/MainMenu.xib diff --git a/OSX/English.lproj/MainMenu.xib b/OSX/English.lproj/MainMenu.xib new file mode 100644 index 0000000..b8d6b4c --- /dev/null +++ b/OSX/English.lproj/MainMenu.xib @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 3f7e384396005351d092cae42216db9a2efa8d8c Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 14:38:06 -0300 Subject: [PATCH 004/106] Add Xcode build phase to auto-generate pnglibconf.h Adds a 'Generate pnglibconf.h' shell script build phase that runs before Sources compilation. It copies pnglibconf.h.prebuilt to pnglibconf.h if not already present, so the project builds with a clean checkout in Xcode without any manual steps. --- OSX/RTDink.xcodeproj/project.pbxproj | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index f4cb710..e5331a0 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1273,6 +1273,7 @@ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "RTDink" */; buildPhases = ( 8D1107290486CEB800E47090 /* Resources */, + AF0000001000000000000001 /* Generate pnglibconf.h */, 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, 5D70BB2712B7208900A1AB17 /* CopyFiles */, @@ -1376,6 +1377,20 @@ shellPath = /bin/sh; shellScript = "echo Disabled, run PackageDinkOSX.command instead, that way this signs it for us first\nexit\n\nif [ \"${CONFIGURATION}\" = 'Release' ]; then\n[ \"$ACTION\" = build ] || exit 0\n[ \"$BUILD_VARIANTS\" = \"normal\" ] || exit 0\n\n\nAPPNAME=\"Dink Smallwood HD\"\n\nCODESIGN=\"Mac Developer: Seth Robinson\"\n#CODESIGN=\"3rd Party Mac Developer Application: Robinson Technologies\"\n\nINSTALLSIGN=\"3rd Party Mac Developer Installer: Robinson Technologies\"\n\n#codesign -vvvv -f -s \"$CODESIGN\" \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmod.dylib\"\n#codesign -vvvv -f -s \"$CODESIGN\" \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app\"\n#codesign -vvvv \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app\"\nfi\n"; }; + AF0000001000000000000001 /* Generate pnglibconf.h */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Generate pnglibconf.h"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "LIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ ! -f \"$LIBPNG/pnglibconf.h\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\nfi\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ From 41b1d1893f49c581896f90f7a63c5279db37ae28 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 14:43:01 -0300 Subject: [PATCH 005/106] Remove missing Boost.Signals v1 source files from Xcode build The project referenced 5 Boost.Signals v1 source files that don't exist in the proton SDK (only Signals2 header-only library is present): - libs/signals/src/connection.cpp - libs/signals/src/named_slot_map.cpp - libs/signals/src/signal_base.cpp - libs/signals/src/slot.cpp - libs/signals/src/trackable.cpp Removing them from the Sources build phase fixes the compilation failures for trackable.o and slot.o. --- OSX/RTDink.xcodeproj/project.pbxproj | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index e5331a0..9fec547 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -172,11 +172,6 @@ 5D70C10612B72BE700A1AB17 /* TextScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C09D12B72BE700A1AB17 /* TextScanner.cpp */; }; 5D70C10712B72BE700A1AB17 /* MathUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C09F12B72BE700A1AB17 /* MathUtils.cpp */; }; 5D70C10812B72BE700A1AB17 /* Variant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0A112B72BE700A1AB17 /* Variant.cpp */; }; - 5D70C10912B72BE700A1AB17 /* connection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0A512B72BE700A1AB17 /* connection.cpp */; }; - 5D70C10A12B72BE700A1AB17 /* named_slot_map.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0A612B72BE700A1AB17 /* named_slot_map.cpp */; }; - 5D70C10B12B72BE700A1AB17 /* signal_base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0A712B72BE700A1AB17 /* signal_base.cpp */; }; - 5D70C10C12B72BE700A1AB17 /* slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0A812B72BE700A1AB17 /* slot.cpp */; }; - 5D70C10D12B72BE700A1AB17 /* trackable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0A912B72BE700A1AB17 /* trackable.cpp */; }; 5D70C10E12B72BE700A1AB17 /* GLESUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0AA12B72BE700A1AB17 /* GLESUtils.cpp */; }; 5D70C10F12B72BE700A1AB17 /* ResourceUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0AC12B72BE700A1AB17 /* ResourceUtils.cpp */; }; 5D70C11012B72BE700A1AB17 /* MiscUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C0AF12B72BE700A1AB17 /* MiscUtils.cpp */; }; @@ -1546,12 +1541,7 @@ 5D70C10712B72BE700A1AB17 /* MathUtils.cpp in Sources */, 5D70C10812B72BE700A1AB17 /* Variant.cpp in Sources */, 5D21BA591FA6C76C00B12CB3 /* jcparam.c in Sources */, - 5D70C10912B72BE700A1AB17 /* connection.cpp in Sources */, - 5D70C10A12B72BE700A1AB17 /* named_slot_map.cpp in Sources */, - 5D70C10B12B72BE700A1AB17 /* signal_base.cpp in Sources */, - 5D70C10C12B72BE700A1AB17 /* slot.cpp in Sources */, 5D21B9E11FA6C31D00B12CB3 /* png.c in Sources */, - 5D70C10D12B72BE700A1AB17 /* trackable.cpp in Sources */, 5D21BA4F1FA6C76C00B12CB3 /* jmemnobs.c in Sources */, 5D21BA4E1FA6C76C00B12CB3 /* jmemmgr.c in Sources */, 5D21B9FB1FA6C34500B12CB3 /* Gamepad.cpp in Sources */, From 77f60d1a2ebd278150c078690a69e4085560ab2a Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 14:45:48 -0300 Subject: [PATCH 006/106] Remove missing libpng x86 MMX files from Xcode build pnggccrd.c and pngvcrd.c are old x86 MMX-specific libpng files that don't exist in the proton SDK's libpng version. Removing them from the Sources build phase fixes: error: Build input file cannot be found: '.../libpng/pngvcrd.c' --- OSX/RTDink.xcodeproj/project.pbxproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 9fec547..71129c7 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -13,7 +13,6 @@ 5D21B9E41FA6C31D00B12CB3 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D11FA6C31B00B12CB3 /* pngrutil.c */; }; 5D21B9E51FA6C31D00B12CB3 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D21FA6C31B00B12CB3 /* pngwrite.c */; }; 5D21B9E61FA6C31D00B12CB3 /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D31FA6C31B00B12CB3 /* pngget.c */; }; - 5D21B9E71FA6C31D00B12CB3 /* pnggccrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D41FA6C31B00B12CB3 /* pnggccrd.c */; }; 5D21B9E81FA6C31D00B12CB3 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D51FA6C31B00B12CB3 /* pngrio.c */; }; 5D21B9E91FA6C31D00B12CB3 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D61FA6C31C00B12CB3 /* pngwtran.c */; }; 5D21B9EA1FA6C31D00B12CB3 /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D71FA6C31C00B12CB3 /* pngpread.c */; }; @@ -21,7 +20,6 @@ 5D21B9EC1FA6C31D00B12CB3 /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D91FA6C31C00B12CB3 /* pngwio.c */; }; 5D21B9ED1FA6C31D00B12CB3 /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9DA1FA6C31C00B12CB3 /* pngmem.c */; }; 5D21B9EE1FA6C31D00B12CB3 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9DB1FA6C31C00B12CB3 /* pngwutil.c */; }; - 5D21B9EF1FA6C31D00B12CB3 /* pngvcrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9DE1FA6C31D00B12CB3 /* pngvcrd.c */; }; 5D21B9F01FA6C31D00B12CB3 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9DF1FA6C31D00B12CB3 /* pngread.c */; }; 5D21B9F11FA6C31D00B12CB3 /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9E01FA6C31D00B12CB3 /* pngrtran.c */; }; 5D21B9F91FA6C34500B12CB3 /* GamepadProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9F41FA6C34500B12CB3 /* GamepadProvider.cpp */; }; @@ -1476,7 +1474,6 @@ 5D70C0E212B72BE700A1AB17 /* TextRenderComponent.cpp in Sources */, 5D70C0E312B72BE700A1AB17 /* Button2DComponent.cpp in Sources */, 5D21BA671FA6C76C00B12CB3 /* jcinit.c in Sources */, - 5D21B9EF1FA6C31D00B12CB3 /* pngvcrd.c in Sources */, 5D21B9E41FA6C31D00B12CB3 /* pngrutil.c in Sources */, 5D70C0E412B72BE700A1AB17 /* TouchHandlerComponent.cpp in Sources */, 5D70C0E512B72BE700A1AB17 /* OverlayRenderComponent.cpp in Sources */, @@ -1495,7 +1492,6 @@ 5D70C0EB12B72BE700A1AB17 /* SoftSurface.cpp in Sources */, 5D21B9E51FA6C31D00B12CB3 /* pngwrite.c in Sources */, 5D70C0EC12B72BE700A1AB17 /* RenderBatcher.cpp in Sources */, - 5D21B9E71FA6C31D00B12CB3 /* pnggccrd.c in Sources */, 5D70C0ED12B72BE700A1AB17 /* L_Defination.cpp in Sources */, 5D70C0EE12B72BE700A1AB17 /* L_DroppingEffect.cpp in Sources */, 5D70C0EF12B72BE700A1AB17 /* L_EffectEmitter.cpp in Sources */, From a0fa617d5e198a0b5fe0e10e1a7ed514379cfbef Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:15:58 -0300 Subject: [PATCH 007/106] Fix SDL2 header search paths for macOS Homebrew (ARM64 + Intel) --- OSX/RTDink.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 71129c7..06cc053 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1637,6 +1637,8 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, + /opt/homebrew/include, + /usr/local/include, ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; @@ -1751,6 +1753,8 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, + /opt/homebrew/include, + /usr/local/include, ); MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; @@ -1787,6 +1791,8 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, + /opt/homebrew/include, + /usr/local/include, ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; From cdee396a9fa76cc8069e9540ef68067264118382 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:18:51 -0300 Subject: [PATCH 008/106] Add RTSimpleApp/source to Xcode header search paths for ParticleTestComponent --- OSX/RTDink.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 06cc053..0af4d6f 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1637,6 +1637,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, + ../../shared/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); @@ -1753,6 +1754,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, + ../../shared/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); @@ -1791,6 +1793,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, + ../../shared/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); From 6651c7f6a4515a361f190fe56bcd4e2911127c94 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:21:53 -0300 Subject: [PATCH 009/106] Fix ParticleTestComponent paths to point to Proton SDK location --- OSX/RTDink.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 0af4d6f..dd3fe86 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -540,8 +540,8 @@ 5D70C12712B72C0900A1AB17 /* CursorComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CursorComponent.h; path = ../source/Component/CursorComponent.h; sourceTree = SOURCE_ROOT; }; 5D70C12812B72C0900A1AB17 /* FPSControlComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FPSControlComponent.cpp; path = ../source/Component/FPSControlComponent.cpp; sourceTree = SOURCE_ROOT; }; 5D70C12912B72C0900A1AB17 /* FPSControlComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FPSControlComponent.h; path = ../source/Component/FPSControlComponent.h; sourceTree = SOURCE_ROOT; }; - 5D70C12A12B72C0900A1AB17 /* ParticleTestComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleTestComponent.cpp; path = ../source/Component/ParticleTestComponent.cpp; sourceTree = SOURCE_ROOT; }; - 5D70C12B12B72C0900A1AB17 /* ParticleTestComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleTestComponent.h; path = ../source/Component/ParticleTestComponent.h; sourceTree = SOURCE_ROOT; }; + 5D70C12A12B72C0900A1AB17 /* ParticleTestComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleTestComponent.cpp; path = ../../shared/RTSimpleApp/source/Component/ParticleTestComponent.cpp; sourceTree = SOURCE_ROOT; }; + 5D70C12B12B72C0900A1AB17 /* ParticleTestComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleTestComponent.h; path = ../../shared/RTSimpleApp/source/Component/ParticleTestComponent.h; sourceTree = SOURCE_ROOT; }; 5D70C12D12B72C0900A1AB17 /* ExpiredMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpiredMenu.h; path = ../source/GUI/ExpiredMenu.h; sourceTree = SOURCE_ROOT; }; 5D70C12E12B72C0900A1AB17 /* ExpiredMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpiredMenu.cpp; path = ../source/GUI/ExpiredMenu.cpp; sourceTree = SOURCE_ROOT; }; 5D70C12F12B72C0900A1AB17 /* ReadTextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReadTextMenu.h; path = ../source/GUI/ReadTextMenu.h; sourceTree = SOURCE_ROOT; }; From 1d7125a13de5174d4b0bac35a31fd781c5bd25e2 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:24:53 -0300 Subject: [PATCH 010/106] Fix ParticleTestComponent paths: RTSimpleApp is in proton/, not shared/ --- OSX/RTDink.xcodeproj/project.pbxproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index dd3fe86..c8603d4 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -540,8 +540,8 @@ 5D70C12712B72C0900A1AB17 /* CursorComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CursorComponent.h; path = ../source/Component/CursorComponent.h; sourceTree = SOURCE_ROOT; }; 5D70C12812B72C0900A1AB17 /* FPSControlComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FPSControlComponent.cpp; path = ../source/Component/FPSControlComponent.cpp; sourceTree = SOURCE_ROOT; }; 5D70C12912B72C0900A1AB17 /* FPSControlComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FPSControlComponent.h; path = ../source/Component/FPSControlComponent.h; sourceTree = SOURCE_ROOT; }; - 5D70C12A12B72C0900A1AB17 /* ParticleTestComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleTestComponent.cpp; path = ../../shared/RTSimpleApp/source/Component/ParticleTestComponent.cpp; sourceTree = SOURCE_ROOT; }; - 5D70C12B12B72C0900A1AB17 /* ParticleTestComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleTestComponent.h; path = ../../shared/RTSimpleApp/source/Component/ParticleTestComponent.h; sourceTree = SOURCE_ROOT; }; + 5D70C12A12B72C0900A1AB17 /* ParticleTestComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleTestComponent.cpp; path = ../../../proton/RTSimpleApp/source/Component/ParticleTestComponent.cpp; sourceTree = SOURCE_ROOT; }; + 5D70C12B12B72C0900A1AB17 /* ParticleTestComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleTestComponent.h; path = ../../../proton/RTSimpleApp/source/Component/ParticleTestComponent.h; sourceTree = SOURCE_ROOT; }; 5D70C12D12B72C0900A1AB17 /* ExpiredMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpiredMenu.h; path = ../source/GUI/ExpiredMenu.h; sourceTree = SOURCE_ROOT; }; 5D70C12E12B72C0900A1AB17 /* ExpiredMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpiredMenu.cpp; path = ../source/GUI/ExpiredMenu.cpp; sourceTree = SOURCE_ROOT; }; 5D70C12F12B72C0900A1AB17 /* ReadTextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReadTextMenu.h; path = ../source/GUI/ReadTextMenu.h; sourceTree = SOURCE_ROOT; }; @@ -1637,7 +1637,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, - ../../shared/RTSimpleApp/source, + ../../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); @@ -1754,7 +1754,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, - ../../shared/RTSimpleApp/source, + ../../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); @@ -1793,7 +1793,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, - ../../shared/RTSimpleApp/source, + ../../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); From ad8ec62980793d68d024cad0e4b49461ccfc02f3 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:27:45 -0300 Subject: [PATCH 011/106] Fix ParticleTestComponent path: proton/ is sibling of RTDink/, not grandparent --- OSX/RTDink.xcodeproj/project.pbxproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index c8603d4..15b0ba3 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -540,8 +540,8 @@ 5D70C12712B72C0900A1AB17 /* CursorComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CursorComponent.h; path = ../source/Component/CursorComponent.h; sourceTree = SOURCE_ROOT; }; 5D70C12812B72C0900A1AB17 /* FPSControlComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FPSControlComponent.cpp; path = ../source/Component/FPSControlComponent.cpp; sourceTree = SOURCE_ROOT; }; 5D70C12912B72C0900A1AB17 /* FPSControlComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FPSControlComponent.h; path = ../source/Component/FPSControlComponent.h; sourceTree = SOURCE_ROOT; }; - 5D70C12A12B72C0900A1AB17 /* ParticleTestComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleTestComponent.cpp; path = ../../../proton/RTSimpleApp/source/Component/ParticleTestComponent.cpp; sourceTree = SOURCE_ROOT; }; - 5D70C12B12B72C0900A1AB17 /* ParticleTestComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleTestComponent.h; path = ../../../proton/RTSimpleApp/source/Component/ParticleTestComponent.h; sourceTree = SOURCE_ROOT; }; + 5D70C12A12B72C0900A1AB17 /* ParticleTestComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleTestComponent.cpp; path = ../../proton/RTSimpleApp/source/Component/ParticleTestComponent.cpp; sourceTree = SOURCE_ROOT; }; + 5D70C12B12B72C0900A1AB17 /* ParticleTestComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleTestComponent.h; path = ../../proton/RTSimpleApp/source/Component/ParticleTestComponent.h; sourceTree = SOURCE_ROOT; }; 5D70C12D12B72C0900A1AB17 /* ExpiredMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpiredMenu.h; path = ../source/GUI/ExpiredMenu.h; sourceTree = SOURCE_ROOT; }; 5D70C12E12B72C0900A1AB17 /* ExpiredMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpiredMenu.cpp; path = ../source/GUI/ExpiredMenu.cpp; sourceTree = SOURCE_ROOT; }; 5D70C12F12B72C0900A1AB17 /* ReadTextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReadTextMenu.h; path = ../source/GUI/ReadTextMenu.h; sourceTree = SOURCE_ROOT; }; @@ -1637,7 +1637,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, - ../../../proton/RTSimpleApp/source, + ../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); @@ -1754,7 +1754,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, - ../../../proton/RTSimpleApp/source, + ../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); @@ -1793,7 +1793,7 @@ ../../shared/FliteTTS/include, ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, - ../../../proton/RTSimpleApp/source, + ../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, ); From 1ef5da2e9e81807bca7a768ecc77868bc3879415 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:35:24 -0300 Subject: [PATCH 012/106] Update README/INSTALL: document macOS build requirements (FMOD, SDL2, directory layout) --- INSTALL.md | 60 +++++++++++++++++++++++++++++++++++++++++++----------- README.md | 2 +- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 0e5420d..c4fb682 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,7 +10,7 @@ See [README.md](README.md) for download links if you just want to play the game. | **Linux** | CMake | Proton SDK cloned inside project, uses SDL2 + SDL2_mixer for audio | | **iOS** | Xcode | Proton SDK sibling layout, uses FMOD for audio | | **Android** | Gradle + CMake | Proton SDK sibling layout, uses FMOD for audio | -| **macOS** | Xcode | Broken/unmaintained | +| **macOS** | Xcode | Requires FMOD Studio API (see [macOS section](#macos)) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | All platforms require the **Dink Smallwood game data** (`dink/` directory) to play. See [README.md](README.md#just-want-to-play) for how to obtain it. @@ -92,23 +92,59 @@ proton/ --- -## macOS (broken/unmaintained) +## macOS -> **Note:** The macOS build has not been maintained for a long time and likely does not build without fixes. It is left here for reference. +The macOS build uses the Xcode project at `OSX/RTDink.xcodeproj`. It requires the **FMOD Studio API** for audio (proprietary, free for non-commercial use). -The Xcode project is at the repo root (`RTDink.xcodeproj`). Same sibling layout as Windows: +> **Note:** The CI workflow (`test_mac_arm64` branch) verifies the build compiles on Apple Silicon (M1/M2). FMOD is required to link a runnable binary. + +### Directory layout + +Clone both repos as siblings: ``` -proton/ - shared/ <-- Proton SDK - RTDink/ - RTDink.xcodeproj +some_folder/ + proton/ <-- Proton SDK (cloned here) + shared/ + RTSimpleApp/ + RTDink/ <-- this repo (cloned here) + OSX/ + RTDink.xcodeproj ``` -1. Clone [Proton SDK](https://github.com/SethRobinson/proton) -2. Clone this repo inside the Proton directory -3. Open `RTDink.xcodeproj` in Xcode -4. Build and run (may require fixes) +### Steps + +1. Clone the Proton SDK and this repo as siblings: + +```bash +git clone https://github.com/SethRobinson/proton.git +git clone https://github.com/SethRobinson/RTDink.git +``` + +2. Install SDL2 via Homebrew: + +```bash +brew install sdl2 +``` + +3. Download the **FMOD Studio API** from https://www.fmod.com/download (free registration required). + - Choose **FMOD Engine** → **macOS** + - Extract and copy the `api/` folder into `proton/shared/mac/fmodstudio/` so the path looks like: + ``` + proton/shared/mac/fmodstudio/api/core/inc/fmod.hpp + proton/shared/mac/fmodstudio/api/core/lib/libfmod.dylib + ``` + - Also copy `libfmod.dylib` into `RTDink/OSX/` (next to the `.xcodeproj`) + +4. Open the Xcode project: + +```bash +open RTDink/OSX/RTDink.xcodeproj +``` + +5. Select the **Release** configuration and build (`⌘B`). + +> **Without FMOD:** The project will fail to compile at `AudioManagerFMODStudio.cpp` because `fmod.hpp` is not found. FMOD is a hard dependency for the macOS Xcode build — there is no SDL2 audio fallback in this build path. --- diff --git a/README.md b/README.md index 863529e..16ca2c5 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ RTDink can be built for multiple platforms. Each uses the [Proton SDK](https://g |----------|-------------|-------------| | **Windows** | Visual Studio 2017+ | See [detailed Windows instructions](#windows) below | | **Linux** | CMake + SDL2 | `git clone ... && ./linux_setup.sh` ([details](INSTALL.md#linux)) | -| **macOS** | Xcode | Broken/unmaintained -- see [INSTALL.md](INSTALL.md#macos) | +| **macOS** | Xcode | Requires FMOD Studio API -- see [INSTALL.md](INSTALL.md#macos) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | | **iOS** | Xcode | Proton SDK sibling layout, open `RTDink.xcodeproj` ([more info](INSTALL.md#ios)) | | **Android** | Gradle + CMake | Proton SDK sibling layout, open `AndroidGradle/` in Android Studio ([more info](INSTALL.md#android)) | From 920c78f06256f7c63eb1022820309fbcfd62b283 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:41:49 -0300 Subject: [PATCH 013/106] Skip FMOD in CI: RT_NO_FMOD guard in App.cpp for macOS no-FMOD builds --- source/App.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/App.cpp b/source/App.cpp index 05de2cd..c05d8ba 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -85,8 +85,12 @@ GamepadManager * GetGamepadManager() {return &g_gamepadManager;} AudioManagerFMOD g_audioManager; #else //it's being compiled as a native OSX app +#ifdef RT_NO_FMOD + AudioManager g_audioManager; //silent stub, no FMOD dependency +#else #include "Audio/AudioManagerFMODStudio.h" AudioManagerFMOD g_audioManager; //dummy with no sound +#endif //in theory, CocosDenshion should work for the Mac builds, but right now it seems to want a big chunk of //Cocos2d included so I'm not fiddling with it for now From 619c4178f59058be349c466553b72cffc3b3b8ec Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:44:48 -0300 Subject: [PATCH 014/106] Remove libfmod.dylib from Frameworks and CopyFiles build phases --- OSX/RTDink.xcodeproj/project.pbxproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 15b0ba3..3fecb56 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -227,7 +227,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 5DBEA04D1FA6CE360081C341 /* libfmod.dylib in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -599,7 +598,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5D4E96E81FA6B7D7001AAECE /* libfmod.dylib in Frameworks */, 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, AFD4D88A113C504F00C2DE76 /* OpenGL.framework in Frameworks */, AF9DBBC6113C611C00D05754 /* QuartzCore.framework in Frameworks */, From 88e62d1585c8e76ba2ceea849e58e051d7431235 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:51:33 -0300 Subject: [PATCH 015/106] Include SDL2/SDL.h for PLATFORM_OSX in App.cpp --- source/App.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/App.cpp b/source/App.cpp index c05d8ba..b2d261a 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -199,6 +199,8 @@ const char * GetAppName() #if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#include + SDL_Window* GetSDLWindow() { SDL_Window* window = SDL_GL_GetCurrentWindow(); if (!window) { From 8f95a5dd37ab3d1f4fcb3292fbb529f076c6d897 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 15:57:38 -0300 Subject: [PATCH 016/106] Fix linker: add SDL2, EmulatedPointerComponent, LogDisplayComponent, PNG NEON ARM sources --- OSX/RTDink.xcodeproj/project.pbxproj | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 3fecb56..451bc2f 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -27,6 +27,11 @@ 5D21B9FB1FA6C34500B12CB3 /* Gamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9F81FA6C34500B12CB3 /* Gamepad.cpp */; }; 5D21B9FE1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9FD1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp */; }; 5D21BA051FA6C3DD00B12CB3 /* AdProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */; }; + AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */; }; + AA000001000000000000AA02 /* LogDisplayComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA02 /* LogDisplayComponent.cpp */; }; + AA000001000000000000AA03 /* arm_init.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA03 /* arm_init.c */; }; + AA000001000000000000AA04 /* filter_neon_intrinsics.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA04 /* filter_neon_intrinsics.c */; }; + AA000001000000000000AA05 /* palette_neon_intrinsics.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA05 /* palette_neon_intrinsics.c */; }; 5D21BA071FA6C3DD00B12CB3 /* GamepadiCade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA041FA6C3DD00B12CB3 /* GamepadiCade.cpp */; }; 5D21BA0B1FA6C47F00B12CB3 /* JPGSurfaceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA091FA6C47E00B12CB3 /* JPGSurfaceLoader.cpp */; }; 5D21BA0E1FA6C6BF00B12CB3 /* RenderScissorComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA0C1FA6C6BE00B12CB3 /* RenderScissorComponent.cpp */; }; @@ -242,6 +247,11 @@ 5D21B9CF1FA6C31B00B12CB3 /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pngerror.c; sourceTree = ""; }; 5D21B9D01FA6C31B00B12CB3 /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pngtrans.c; sourceTree = ""; }; 5D21B9D11FA6C31B00B12CB3 /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pngrutil.c; sourceTree = ""; }; + AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EmulatedPointerComponent.cpp; path = ../source/Component/EmulatedPointerComponent.cpp; sourceTree = SOURCE_ROOT; }; + AA000002000000000000AA02 /* LogDisplayComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LogDisplayComponent.cpp; path = ../../shared/Entity/LogDisplayComponent.cpp; sourceTree = SOURCE_ROOT; }; + AA000002000000000000AA03 /* arm_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = arm_init.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/arm_init.c; sourceTree = SOURCE_ROOT; }; + AA000002000000000000AA04 /* filter_neon_intrinsics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = filter_neon_intrinsics.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/filter_neon_intrinsics.c; sourceTree = SOURCE_ROOT; }; + AA000002000000000000AA05 /* palette_neon_intrinsics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = palette_neon_intrinsics.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/palette_neon_intrinsics.c; sourceTree = SOURCE_ROOT; }; 5D21B9D21FA6C31B00B12CB3 /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngwrite.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pngwrite.c; sourceTree = ""; }; 5D21B9D31FA6C31B00B12CB3 /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pngget.c; sourceTree = ""; }; 5D21B9D41FA6C31B00B12CB3 /* pnggccrd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pnggccrd.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pnggccrd.c; sourceTree = ""; }; @@ -1560,6 +1570,11 @@ 5D70C15712B72C0900A1AB17 /* CursorComponent.cpp in Sources */, 5D70C15812B72C0900A1AB17 /* FPSControlComponent.cpp in Sources */, 5D70C15912B72C0900A1AB17 /* ParticleTestComponent.cpp in Sources */, + AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */, + AA000001000000000000AA02 /* LogDisplayComponent.cpp in Sources */, + AA000001000000000000AA03 /* arm_init.c in Sources */, + AA000001000000000000AA04 /* filter_neon_intrinsics.c in Sources */, + AA000001000000000000AA05 /* palette_neon_intrinsics.c in Sources */, 5D21BA4A1FA6C76C00B12CB3 /* jidctred.c in Sources */, 5D21BA5F1FA6C76C00B12CB3 /* jdcolor.c in Sources */, 5D70C15A12B72C0900A1AB17 /* ExpiredMenu.cpp in Sources */, @@ -1670,7 +1685,10 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", + /opt/homebrew/lib, + /usr/local/lib, ); + OTHER_LDFLAGS = "-lSDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; @@ -1695,7 +1713,10 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", + /opt/homebrew/lib, + /usr/local/lib, ); + OTHER_LDFLAGS = "-lSDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; @@ -1715,7 +1736,10 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", + /opt/homebrew/lib, + /usr/local/lib, ); + OTHER_LDFLAGS = "-lSDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; From 25b1351887ce2ef4f35da800f4419aa7bf32ba73 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 16:07:07 -0300 Subject: [PATCH 017/106] Fix SDL2 linking and add TouchDragComponent to Xcode project --- OSX/RTDink.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 451bc2f..6e365e1 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -28,6 +28,7 @@ 5D21B9FE1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9FD1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp */; }; 5D21BA051FA6C3DD00B12CB3 /* AdProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */; }; AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */; }; + AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA06 /* TouchDragComponent.cpp */; }; AA000001000000000000AA02 /* LogDisplayComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA02 /* LogDisplayComponent.cpp */; }; AA000001000000000000AA03 /* arm_init.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA03 /* arm_init.c */; }; AA000001000000000000AA04 /* filter_neon_intrinsics.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA04 /* filter_neon_intrinsics.c */; }; @@ -249,6 +250,7 @@ 5D21B9D11FA6C31B00B12CB3 /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pngrutil.c; sourceTree = ""; }; AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EmulatedPointerComponent.cpp; path = ../source/Component/EmulatedPointerComponent.cpp; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA02 /* LogDisplayComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LogDisplayComponent.cpp; path = ../../shared/Entity/LogDisplayComponent.cpp; sourceTree = SOURCE_ROOT; }; + AA000002000000000000AA06 /* TouchDragComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TouchDragComponent.cpp; path = ../../shared/Entity/TouchDragComponent.cpp; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA03 /* arm_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = arm_init.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/arm_init.c; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA04 /* filter_neon_intrinsics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = filter_neon_intrinsics.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/filter_neon_intrinsics.c; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA05 /* palette_neon_intrinsics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = palette_neon_intrinsics.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/palette_neon_intrinsics.c; sourceTree = SOURCE_ROOT; }; @@ -1571,6 +1573,7 @@ 5D70C15812B72C0900A1AB17 /* FPSControlComponent.cpp in Sources */, 5D70C15912B72C0900A1AB17 /* ParticleTestComponent.cpp in Sources */, AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */, + AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */, AA000001000000000000AA02 /* LogDisplayComponent.cpp in Sources */, AA000001000000000000AA03 /* arm_init.c in Sources */, AA000001000000000000AA04 /* filter_neon_intrinsics.c in Sources */, From 4f4cd8546cc1eeee5f688dedd1dbbf60338b9355 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 16:10:43 -0300 Subject: [PATCH 018/106] Add SDL2Main.cpp to Xcode project (defines g_bIsFullScreen) --- OSX/RTDink.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 6e365e1..9e98dd6 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -29,6 +29,7 @@ 5D21BA051FA6C3DD00B12CB3 /* AdProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */; }; AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */; }; AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA06 /* TouchDragComponent.cpp */; }; + AA000001000000000000AA07 /* SDL2Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA07 /* SDL2Main.cpp */; }; AA000001000000000000AA02 /* LogDisplayComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA02 /* LogDisplayComponent.cpp */; }; AA000001000000000000AA03 /* arm_init.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA03 /* arm_init.c */; }; AA000001000000000000AA04 /* filter_neon_intrinsics.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA04 /* filter_neon_intrinsics.c */; }; @@ -251,6 +252,7 @@ AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EmulatedPointerComponent.cpp; path = ../source/Component/EmulatedPointerComponent.cpp; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA02 /* LogDisplayComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LogDisplayComponent.cpp; path = ../../shared/Entity/LogDisplayComponent.cpp; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA06 /* TouchDragComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TouchDragComponent.cpp; path = ../../shared/Entity/TouchDragComponent.cpp; sourceTree = SOURCE_ROOT; }; + AA000002000000000000AA07 /* SDL2Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SDL2Main.cpp; path = ../../shared/SDL/SDL2Main.cpp; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA03 /* arm_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = arm_init.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/arm_init.c; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA04 /* filter_neon_intrinsics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = filter_neon_intrinsics.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/filter_neon_intrinsics.c; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA05 /* palette_neon_intrinsics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = palette_neon_intrinsics.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/palette_neon_intrinsics.c; sourceTree = SOURCE_ROOT; }; @@ -1574,6 +1576,7 @@ 5D70C15912B72C0900A1AB17 /* ParticleTestComponent.cpp in Sources */, AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */, AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */, + AA000001000000000000AA07 /* SDL2Main.cpp in Sources */, AA000001000000000000AA02 /* LogDisplayComponent.cpp in Sources */, AA000001000000000000AA03 /* arm_init.c in Sources */, AA000001000000000000AA04 /* filter_neon_intrinsics.c in Sources */, From 2d96f0e6ba4ed14b68e93e5c6fdba61623f16537 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 16:14:40 -0300 Subject: [PATCH 019/106] Fix duplicate symbols: define g_bIsFullScreen in App.cpp, remove SDL2Main.cpp --- OSX/RTDink.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 9e98dd6..0955601 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -29,7 +29,7 @@ 5D21BA051FA6C3DD00B12CB3 /* AdProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */; }; AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */; }; AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA06 /* TouchDragComponent.cpp */; }; - AA000001000000000000AA07 /* SDL2Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA07 /* SDL2Main.cpp */; }; + AA000001000000000000AA02 /* LogDisplayComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA02 /* LogDisplayComponent.cpp */; }; AA000001000000000000AA03 /* arm_init.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA03 /* arm_init.c */; }; AA000001000000000000AA04 /* filter_neon_intrinsics.c in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA04 /* filter_neon_intrinsics.c */; }; @@ -252,7 +252,7 @@ AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EmulatedPointerComponent.cpp; path = ../source/Component/EmulatedPointerComponent.cpp; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA02 /* LogDisplayComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LogDisplayComponent.cpp; path = ../../shared/Entity/LogDisplayComponent.cpp; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA06 /* TouchDragComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TouchDragComponent.cpp; path = ../../shared/Entity/TouchDragComponent.cpp; sourceTree = SOURCE_ROOT; }; - AA000002000000000000AA07 /* SDL2Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SDL2Main.cpp; path = ../../shared/SDL/SDL2Main.cpp; sourceTree = SOURCE_ROOT; }; + AA000002000000000000AA03 /* arm_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = arm_init.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/arm_init.c; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA04 /* filter_neon_intrinsics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = filter_neon_intrinsics.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/filter_neon_intrinsics.c; sourceTree = SOURCE_ROOT; }; AA000002000000000000AA05 /* palette_neon_intrinsics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = palette_neon_intrinsics.c; path = ../../shared/Irrlicht/source/Irrlicht/libpng/arm/palette_neon_intrinsics.c; sourceTree = SOURCE_ROOT; }; @@ -1576,7 +1576,7 @@ 5D70C15912B72C0900A1AB17 /* ParticleTestComponent.cpp in Sources */, AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */, AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */, - AA000001000000000000AA07 /* SDL2Main.cpp in Sources */, + AA000001000000000000AA02 /* LogDisplayComponent.cpp in Sources */, AA000001000000000000AA03 /* arm_init.c in Sources */, AA000001000000000000AA04 /* filter_neon_intrinsics.c in Sources */, From 99019198be59fb2ab8db5bf249d53a9229368415 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 16:17:15 -0300 Subject: [PATCH 020/106] Fix g_bIsFullScreen: define only on PLATFORM_OSX, not Linux --- source/App.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/App.cpp b/source/App.cpp index b2d261a..adef282 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -42,7 +42,11 @@ void AddText(const char *tex, const char *filename); #include "StackWalker/StackUtils.h" #endif +#ifdef PLATFORM_OSX +bool g_bIsFullScreen = false; +#else extern bool g_bIsFullScreen; +#endif extern bool g_script_debug_mode; extern Surface g_transitionSurf; From 8867d69dd9dbf0f8b080b81f800fdf6c870a63b5 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 16:22:40 -0300 Subject: [PATCH 021/106] Update docs: macOS ARM64 build now working --- INSTALL.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index c4fb682..aa8a444 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,7 +10,7 @@ See [README.md](README.md) for download links if you just want to play the game. | **Linux** | CMake | Proton SDK cloned inside project, uses SDL2 + SDL2_mixer for audio | | **iOS** | Xcode | Proton SDK sibling layout, uses FMOD for audio | | **Android** | Gradle + CMake | Proton SDK sibling layout, uses FMOD for audio | -| **macOS** | Xcode | Requires FMOD Studio API (see [macOS section](#macos)) | +| **macOS** | Xcode | ARM64 + x86_64 (Apple Silicon + Intel), requires FMOD for audio (see [macOS section](#macos)) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | All platforms require the **Dink Smallwood game data** (`dink/` directory) to play. See [README.md](README.md#just-want-to-play) for how to obtain it. diff --git a/README.md b/README.md index 16ca2c5..8e8a579 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ RTDink can be built for multiple platforms. Each uses the [Proton SDK](https://g |----------|-------------|-------------| | **Windows** | Visual Studio 2017+ | See [detailed Windows instructions](#windows) below | | **Linux** | CMake + SDL2 | `git clone ... && ./linux_setup.sh` ([details](INSTALL.md#linux)) | -| **macOS** | Xcode | Requires FMOD Studio API -- see [INSTALL.md](INSTALL.md#macos) | +| **macOS** | Xcode | ARM64 + x86_64, requires FMOD for audio -- see [INSTALL.md](INSTALL.md#macos) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | | **iOS** | Xcode | Proton SDK sibling layout, open `RTDink.xcodeproj` ([more info](INSTALL.md#ios)) | | **Android** | Gradle + CMake | Proton SDK sibling layout, open `AndroidGradle/` in Android Studio ([more info](INSTALL.md#android)) | From b5a9a1c73dcf404722b0433e2f3a0e729f1214ae Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 16:26:12 -0300 Subject: [PATCH 022/106] Exclude PNG NEON ARM files from x86_64 builds in Xcode --- OSX/RTDink.xcodeproj/project.pbxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 0955601..aca0685 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1739,6 +1739,7 @@ GCC_MODEL_TUNING = G5; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; + "EXCLUDED_SOURCE_FILE_NAMES[arch=x86_64]" = "arm_init.c filter_neon_intrinsics.c palette_neon_intrinsics.c filter_neon.S"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", From 3836cf40cad26611476d7b21921da6eaf30f5987 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 16:31:50 -0300 Subject: [PATCH 023/106] Update docs: macOS ARM64-only, CI verified, correct directory layout and FMOD notes --- INSTALL.md | 12 +++++++----- README.md | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index aa8a444..a67d161 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,7 +10,7 @@ See [README.md](README.md) for download links if you just want to play the game. | **Linux** | CMake | Proton SDK cloned inside project, uses SDL2 + SDL2_mixer for audio | | **iOS** | Xcode | Proton SDK sibling layout, uses FMOD for audio | | **Android** | Gradle + CMake | Proton SDK sibling layout, uses FMOD for audio | -| **macOS** | Xcode | ARM64 + x86_64 (Apple Silicon + Intel), requires FMOD for audio (see [macOS section](#macos)) | +| **macOS** | Xcode | Apple Silicon (ARM64), requires FMOD for audio (see [macOS section](#macos)) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | All platforms require the **Dink Smallwood game data** (`dink/` directory) to play. See [README.md](README.md#just-want-to-play) for how to obtain it. @@ -94,13 +94,15 @@ proton/ ## macOS -The macOS build uses the Xcode project at `OSX/RTDink.xcodeproj`. It requires the **FMOD Studio API** for audio (proprietary, free for non-commercial use). +The macOS build uses the Xcode project at `OSX/RTDink.xcodeproj`. -> **Note:** The CI workflow (`test_mac_arm64` branch) verifies the build compiles on Apple Silicon (M1/M2). FMOD is required to link a runnable binary. +- **Supported architecture:** Apple Silicon (ARM64 / M1+). Intel (x86_64) is not currently supported. +- **CI:** The `test_mac_arm64` branch runs a GitHub Actions workflow that builds and verifies the ARM64 binary on every push. The CI build skips FMOD (silent audio) so no proprietary SDK is needed to verify compilation. +- **Audio:** Requires the **FMOD Studio API** for a fully functional build with sound (proprietary, free for non-commercial use). ### Directory layout -Clone both repos as siblings: +Clone both repos as **siblings** (not RTDink inside proton): ``` some_folder/ @@ -144,7 +146,7 @@ open RTDink/OSX/RTDink.xcodeproj 5. Select the **Release** configuration and build (`⌘B`). -> **Without FMOD:** The project will fail to compile at `AudioManagerFMODStudio.cpp` because `fmod.hpp` is not found. FMOD is a hard dependency for the macOS Xcode build — there is no SDL2 audio fallback in this build path. +> **Without FMOD:** The project compiles but has no audio. The CI workflow builds without FMOD using a silent stub. For a fully working game, FMOD is required. --- diff --git a/README.md b/README.md index 8e8a579..b9138f6 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ RTDink can be built for multiple platforms. Each uses the [Proton SDK](https://g |----------|-------------|-------------| | **Windows** | Visual Studio 2017+ | See [detailed Windows instructions](#windows) below | | **Linux** | CMake + SDL2 | `git clone ... && ./linux_setup.sh` ([details](INSTALL.md#linux)) | -| **macOS** | Xcode | ARM64 + x86_64, requires FMOD for audio -- see [INSTALL.md](INSTALL.md#macos) | +| **macOS** | Xcode | Apple Silicon (ARM64), requires FMOD for audio -- see [INSTALL.md](INSTALL.md#macos) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | | **iOS** | Xcode | Proton SDK sibling layout, open `RTDink.xcodeproj` ([more info](INSTALL.md#ios)) | | **Android** | Gradle + CMake | Proton SDK sibling layout, open `AndroidGradle/` in Android Studio ([more info](INSTALL.md#android)) | @@ -131,7 +131,7 @@ The original **Dink Smallwood** (1997) was created by **Seth A. Robinson**, **Ju * **yeoldtoast** Editors and a bunch of other Dink stuff * **RobJ** -- DinkC command fixes and compatibility improvements * **SimonK** -- DMOD stress testing and limit increase requests -* **Mateus Sales Bentes** -- Linux port work +* **Mateus Sales Bentes** -- Linux port work, macOS ARM64 build fixes Special thanks to the entire [dinknetwork.com](https://www.dinknetwork.com/) community for their Dink creations and support over the years! From 945bbbcb0a69d1e7d9dba3c5e3607c0263155557 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 20 Feb 2026 18:41:57 -0300 Subject: [PATCH 024/106] Remove CI note from INSTALL.md macOS section --- INSTALL.md | 1 - 1 file changed, 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index a67d161..be3006e 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -97,7 +97,6 @@ proton/ The macOS build uses the Xcode project at `OSX/RTDink.xcodeproj`. - **Supported architecture:** Apple Silicon (ARM64 / M1+). Intel (x86_64) is not currently supported. -- **CI:** The `test_mac_arm64` branch runs a GitHub Actions workflow that builds and verifies the ARM64 binary on every push. The CI build skips FMOD (silent audio) so no proprietary SDK is needed to verify compilation. - **Audio:** Requires the **FMOD Studio API** for a fully functional build with sound (proprietary, free for non-commercial use). ### Directory layout From 4653ddc3c2219b1da07e1d1d67a846831e4bdcf4 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 09:59:49 -0300 Subject: [PATCH 025/106] Fix macOS FMOD install paths to match Xcode project build settings --- INSTALL.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index be3006e..78aaf01 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -130,12 +130,15 @@ brew install sdl2 3. Download the **FMOD Studio API** from https://www.fmod.com/download (free registration required). - Choose **FMOD Engine** → **macOS** - - Extract and copy the `api/` folder into `proton/shared/mac/fmodstudio/` so the path looks like: + - Extract and copy the FMOD headers into `proton/shared/OSX/` so the path looks like: ``` - proton/shared/mac/fmodstudio/api/core/inc/fmod.hpp - proton/shared/mac/fmodstudio/api/core/lib/libfmod.dylib + proton/shared/OSX/fmod.hpp + proton/shared/OSX/fmod_studio.hpp + ``` + - Copy `libfmod.dylib` into `RTDink/OSX/` (next to the `.xcodeproj`): + ``` + RTDink/OSX/libfmod.dylib ``` - - Also copy `libfmod.dylib` into `RTDink/OSX/` (next to the `.xcodeproj`) 4. Open the Xcode project: From 2c201c2b03d8cde3091ae083e104fffb935108a8 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 10:16:51 -0300 Subject: [PATCH 026/106] Remove missing bin/game reference from Xcode project --- OSX/RTDink.xcodeproj/project.pbxproj | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index aca0685..90e70d1 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -210,7 +210,6 @@ 5D70C16912B72C0900A1AB17 /* DebugMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C14B12B72C0900A1AB17 /* DebugMenu.cpp */; }; 5D70C16A12B72C0900A1AB17 /* MainMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70C14D12B72C0900A1AB17 /* MainMenu.cpp */; }; 5D8FA3AC12DA754700E9B3B8 /* interface in Resources */ = {isa = PBXBuildFile; fileRef = 5D8FA3AB12DA754700E9B3B8 /* interface */; }; - 5D8FA49F12DBFA1100E9B3B8 /* game in Resources */ = {isa = PBXBuildFile; fileRef = 5D8FA49D12DBFA1100E9B3B8 /* game */; }; 5D8FA52212DBFA3100E9B3B8 /* dink in Resources */ = {isa = PBXBuildFile; fileRef = 5D8FA4A012DBFA3000E9B3B8 /* dink */; }; 5D8FA52312DBFA3100E9B3B8 /* audio in Resources */ = {isa = PBXBuildFile; fileRef = 5D8FA51512DBFA3100E9B3B8 /* audio */; }; 5DBEA04C1FA6C94C0081C341 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DBEA04B1FA6C94C0081C341 /* jcsample.c */; }; @@ -590,7 +589,6 @@ 5D70C14D12B72C0900A1AB17 /* MainMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenu.cpp; path = ../source/GUI/MainMenu.cpp; sourceTree = SOURCE_ROOT; }; 5D70C14E12B72C0900A1AB17 /* MainMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenu.h; path = ../source/GUI/MainMenu.h; sourceTree = SOURCE_ROOT; }; 5D8FA3AB12DA754700E9B3B8 /* interface */ = {isa = PBXFileReference; lastKnownFileType = folder; name = interface; path = ../bin/interface; sourceTree = ""; }; - 5D8FA49D12DBFA1100E9B3B8 /* game */ = {isa = PBXFileReference; lastKnownFileType = folder; name = game; path = ../bin/game; sourceTree = ""; }; 5D8FA4A012DBFA3000E9B3B8 /* dink */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dink; path = ../bin/dink; sourceTree = ""; }; 5D8FA51512DBFA3100E9B3B8 /* audio */ = {isa = PBXFileReference; lastKnownFileType = folder; name = audio; path = ../bin/audio; sourceTree = ""; }; 5DBEA04B1FA6C94C0081C341 /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcsample.c; path = ../../../shared/Irrlicht/source/Irrlicht/jpeglib/jcsample.c; sourceTree = ""; }; @@ -1332,8 +1330,7 @@ 5DFB850A12BAEDB500337543 /* app.icns in Resources */, 5DD32A5A12CAE4340009B0F3 /* Info.plist in Resources */, 5D8FA3AC12DA754700E9B3B8 /* interface in Resources */, - 5D8FA49F12DBFA1100E9B3B8 /* game in Resources */, - 5D8FA52212DBFA3100E9B3B8 /* dink in Resources */, + 5D8FA52212DBFA3100E9B3B8 /* dink in Resources */, 5D8FA52312DBFA3100E9B3B8 /* audio in Resources */, ); runOnlyForDeploymentPostprocessing = 0; From 01e286f5ec858dcbf8a0a7b152d3e88a41133aa7 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 10:19:27 -0300 Subject: [PATCH 027/106] Skip install_name_tool for libfmod when not present --- OSX/RTDink.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 90e70d1..e678c5f 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1351,7 +1351,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = "/bin/sh -x"; - shellScript = "install_name_tool -change @rpath/libfmod.dylib @loader_path/../Frameworks/libfmod.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\"\notool -L \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\""; + shellScript = "if [ -f \"$PROJECT_DIR/libfmod.dylib\" ]; then\n install_name_tool -change @rpath/libfmod.dylib @loader_path/../Frameworks/libfmod.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\"\nfi\notool -L \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\""; }; 5DBEA04E1FA6D2CF0081C341 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; From f7ca1ac05f31489d7ca661bf8b6c5f91dae9026c Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 10:33:06 -0300 Subject: [PATCH 028/106] Fix Xcode signing: use automatic signing with no team for portability --- OSX/RTDink.xcodeproj/project.pbxproj | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index e678c5f..a46335c 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1633,7 +1633,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD)"; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; + CODE_SIGN_IDENTITY = "-"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = c11; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -1669,10 +1669,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = MK4EZB35P7; + DEVELOPMENT_TEAM = ""; GCC_MODEL_TUNING = G5; GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_ALL_NO_LIB, @@ -1694,6 +1694,8 @@ OTHER_LDFLAGS = "-lSDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; + CODE_SIGNING_REQUIRED = NO; + CODE_SIGNING_ALLOWED = NO; }; name = Dist; }; @@ -1701,11 +1703,11 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = MK4EZB35P7; + DEVELOPMENT_TEAM = ""; GCC_DEBUGGING_SYMBOLS = full; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -1729,10 +1731,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = MK4EZB35P7; + DEVELOPMENT_TEAM = ""; GCC_MODEL_TUNING = G5; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; From a835353967971219dd7b0dbaaefb4b04f0e130bb Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 10:48:04 -0300 Subject: [PATCH 029/106] SDL2: link as framework, support ~/Library/Frameworks for non-admin installs --- OSX/RTDink.xcodeproj/project.pbxproj | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index a46335c..fb971a4 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1656,6 +1656,7 @@ ../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, + "$(HOME)/Library/Frameworks/SDL2.framework/Headers", ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; @@ -1685,13 +1686,18 @@ ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(HOME)/Library/Frameworks", + /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", /opt/homebrew/lib, /usr/local/lib, ); - OTHER_LDFLAGS = "-lSDL2"; + OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; CODE_SIGNING_REQUIRED = NO; @@ -1715,13 +1721,18 @@ GCC_OPTIMIZATION_LEVEL = 0; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(HOME)/Library/Frameworks", + /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", /opt/homebrew/lib, /usr/local/lib, ); - OTHER_LDFLAGS = "-lSDL2"; + OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; @@ -1739,13 +1750,18 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; "EXCLUDED_SOURCE_FILE_NAMES[arch=x86_64]" = "arm_init.c filter_neon_intrinsics.c palette_neon_intrinsics.c filter_neon.S"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(HOME)/Library/Frameworks", + /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", /opt/homebrew/lib, /usr/local/lib, ); - OTHER_LDFLAGS = "-lSDL2"; + OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; @@ -1785,6 +1801,7 @@ ../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, + "$(HOME)/Library/Frameworks/SDL2.framework/Headers", ); MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; @@ -1824,6 +1841,7 @@ ../../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, + "$(HOME)/Library/Frameworks/SDL2.framework/Headers", ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; From 903465aba73e49e3d207ee943a72625e4efad543 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 10:50:13 -0300 Subject: [PATCH 030/106] INSTALL.md: add no-admin SDL2 install option via ~/Library/Frameworks --- INSTALL.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 78aaf01..140bae8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -122,11 +122,23 @@ git clone https://github.com/SethRobinson/proton.git git clone https://github.com/SethRobinson/RTDink.git ``` -2. Install SDL2 via Homebrew: - -```bash -brew install sdl2 -``` +2. Install SDL2: + + **Option A — Homebrew** (if you have admin access): + ```bash + brew install sdl2 + ``` + + **Option B — No admin access** (e.g. MacInCloud or shared machines): + ```bash + # Download the official SDL2 framework DMG + curl -L -o ~/SDL2.dmg "https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.dmg" + hdiutil attach ~/SDL2.dmg + mkdir -p ~/Library/Frameworks + cp -r /Volumes/SDL2/SDL2.framework ~/Library/Frameworks/ + hdiutil detach /Volumes/SDL2 + ``` + The Xcode project looks for `SDL2.framework` in `~/Library/Frameworks/` automatically — no admin or Homebrew required. 3. Download the **FMOD Studio API** from https://www.fmod.com/download (free registration required). - Choose **FMOD Engine** → **macOS** From 9a40c7ca845e7a47c619504079220b52edf44dea Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 11:06:12 -0300 Subject: [PATCH 031/106] Fix PhaseScriptExecution: fix shellPath, guard otool, add alwaysOutOfDate to all script phases --- OSX/RTDink.xcodeproj/project.pbxproj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index fb971a4..662326f 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1340,21 +1340,22 @@ /* Begin PBXShellScriptBuildPhase section */ 5D8CE30414C6570D009EB534 /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "", ); name = "Run Script"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh -x"; - shellScript = "if [ -f \"$PROJECT_DIR/libfmod.dylib\" ]; then\n install_name_tool -change @rpath/libfmod.dylib @loader_path/../Frameworks/libfmod.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\"\nfi\notool -L \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\""; + shellPath = /bin/sh; + shellScript = "if [ -f \"$PROJECT_DIR/libfmod.dylib\" ]; then\n install_name_tool -change @rpath/libfmod.dylib @loader_path/../Frameworks/libfmod.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\"\nfi\nif [ -f \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\" ]; then\n otool -L \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\"\nfi\n"; }; 5DBEA04E1FA6D2CF0081C341 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -1368,6 +1369,7 @@ }; 5DBEA0501FA6DBE30081C341 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 12; files = ( ); @@ -1381,6 +1383,7 @@ }; AF0000001000000000000001 /* Generate pnglibconf.h */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); From 624037dbb003ca1d8ead175e0204f087bc95133e Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 11:11:47 -0300 Subject: [PATCH 032/106] Fix SDL2 framework path: use stable opt/sdl2/Frameworks instead of hardcoded Cellar version --- .github/workflows/test-macos-arm64.yml | 99 ++++++++++++++++++++++++++ OSX/RTDink.xcodeproj/project.pbxproj | 9 ++- 2 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test-macos-arm64.yml diff --git a/.github/workflows/test-macos-arm64.yml b/.github/workflows/test-macos-arm64.yml new file mode 100644 index 0000000..e5aa26a --- /dev/null +++ b/.github/workflows/test-macos-arm64.yml @@ -0,0 +1,99 @@ +name: Test macOS ARM64 Build + +# This workflow only runs in YOUR fork +# It won't affect Seth's repository +# You can trigger it manually from GitHub Actions tab + +on: + # Manual trigger - you control when it runs + workflow_dispatch: + + # Automatically run on pushes to this test branch + push: + branches: + - 'test_mac_arm64' + +jobs: + build-macos-arm64: + name: Build on Apple Silicon + runs-on: macos-14 # This is Apple Silicon (M1) + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Clone Proton SDK + run: | + cd .. + git clone https://github.com/SethRobinson/proton.git + ln -s proton/shared shared + ls -la | grep shared + echo "Verifying shared directory is accessible from RTDink/OSX:" + cd RTDink/OSX + ls -la ../../shared/ | head -5 + + - name: Create missing game directory + run: | + mkdir -p bin/game + echo "Placeholder for game assets" > bin/game/README.txt + + - name: System Info + run: | + echo "Architecture: $(uname -m)" + echo "macOS Version: $(sw_vers -productVersion)" + xcodebuild -version + + - name: Check Xcode Project + run: | + cd OSX + echo "Checking build settings..." + xcodebuild -project RTDink.xcodeproj -showBuildSettings | grep -E "ARCHS|VALID_ARCHS|MACOSX_DEPLOYMENT_TARGET" + + - name: Install SDL2 + run: | + brew install sdl2 + echo "SDL2 prefix: $(brew --prefix sdl2)" + ls -la $(brew --prefix sdl2)/ + ls -la $(brew --prefix sdl2)/Frameworks/ 2>/dev/null || echo "No Frameworks dir" + ls -la /opt/homebrew/opt/sdl2/ 2>/dev/null || echo "No /opt/homebrew/opt/sdl2" + + - name: Generate pnglibconf.h + run: | + LIBPNG=../shared/Irrlicht/source/Irrlicht/libpng + cp "$LIBPNG/pnglibconf.h.prebuilt" "$LIBPNG/pnglibconf.h" + + - name: Build for ARM64 + run: | + cd OSX + xcodebuild -project RTDink.xcodeproj \ + -configuration Release \ + -arch arm64 \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_ALLOWED=NO \ + GCC_PREPROCESSOR_DEFINITIONS='$(inherited) RT_NO_FMOD=1' \ + EXCLUDED_SOURCE_FILE_NAMES="AudioManagerFMODStudio.cpp" \ + build + + - name: Check Binary Architecture + run: | + cd OSX + APP=$(find build -name "*.app" -type d | head -1) + if [ -n "$APP" ]; then + BINARY="$APP/Contents/MacOS/$(basename "$APP" .app)" + if [ -f "$BINARY" ]; then + echo "Binary found: $BINARY" + file "$BINARY" + lipo -info "$BINARY" || true + fi + fi + + - name: Upload Build Artifact + if: success() + uses: actions/upload-artifact@v4 + with: + name: RTDink-macOS-ARM64 + path: OSX/build/Release/*.app + retention-days: 7 + + diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 662326f..e03b506 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1692,7 +1692,8 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + /opt/homebrew/opt/sdl2/Frameworks, + /usr/local/opt/sdl2/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1727,7 +1728,8 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + /opt/homebrew/opt/sdl2/Frameworks, + /usr/local/opt/sdl2/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1756,7 +1758,8 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + /opt/homebrew/opt/sdl2/Frameworks, + /usr/local/opt/sdl2/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", From 62008ab7ab2feb36003809fb12c57776a912a6f7 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 11:14:57 -0300 Subject: [PATCH 033/106] Revert "Fix SDL2 framework path: use stable opt/sdl2/Frameworks instead of hardcoded Cellar version" This reverts commit 624037dbb003ca1d8ead175e0204f087bc95133e. --- .github/workflows/test-macos-arm64.yml | 99 -------------------------- OSX/RTDink.xcodeproj/project.pbxproj | 9 +-- 2 files changed, 3 insertions(+), 105 deletions(-) delete mode 100644 .github/workflows/test-macos-arm64.yml diff --git a/.github/workflows/test-macos-arm64.yml b/.github/workflows/test-macos-arm64.yml deleted file mode 100644 index e5aa26a..0000000 --- a/.github/workflows/test-macos-arm64.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Test macOS ARM64 Build - -# This workflow only runs in YOUR fork -# It won't affect Seth's repository -# You can trigger it manually from GitHub Actions tab - -on: - # Manual trigger - you control when it runs - workflow_dispatch: - - # Automatically run on pushes to this test branch - push: - branches: - - 'test_mac_arm64' - -jobs: - build-macos-arm64: - name: Build on Apple Silicon - runs-on: macos-14 # This is Apple Silicon (M1) - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Clone Proton SDK - run: | - cd .. - git clone https://github.com/SethRobinson/proton.git - ln -s proton/shared shared - ls -la | grep shared - echo "Verifying shared directory is accessible from RTDink/OSX:" - cd RTDink/OSX - ls -la ../../shared/ | head -5 - - - name: Create missing game directory - run: | - mkdir -p bin/game - echo "Placeholder for game assets" > bin/game/README.txt - - - name: System Info - run: | - echo "Architecture: $(uname -m)" - echo "macOS Version: $(sw_vers -productVersion)" - xcodebuild -version - - - name: Check Xcode Project - run: | - cd OSX - echo "Checking build settings..." - xcodebuild -project RTDink.xcodeproj -showBuildSettings | grep -E "ARCHS|VALID_ARCHS|MACOSX_DEPLOYMENT_TARGET" - - - name: Install SDL2 - run: | - brew install sdl2 - echo "SDL2 prefix: $(brew --prefix sdl2)" - ls -la $(brew --prefix sdl2)/ - ls -la $(brew --prefix sdl2)/Frameworks/ 2>/dev/null || echo "No Frameworks dir" - ls -la /opt/homebrew/opt/sdl2/ 2>/dev/null || echo "No /opt/homebrew/opt/sdl2" - - - name: Generate pnglibconf.h - run: | - LIBPNG=../shared/Irrlicht/source/Irrlicht/libpng - cp "$LIBPNG/pnglibconf.h.prebuilt" "$LIBPNG/pnglibconf.h" - - - name: Build for ARM64 - run: | - cd OSX - xcodebuild -project RTDink.xcodeproj \ - -configuration Release \ - -arch arm64 \ - CODE_SIGN_IDENTITY="" \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGNING_ALLOWED=NO \ - GCC_PREPROCESSOR_DEFINITIONS='$(inherited) RT_NO_FMOD=1' \ - EXCLUDED_SOURCE_FILE_NAMES="AudioManagerFMODStudio.cpp" \ - build - - - name: Check Binary Architecture - run: | - cd OSX - APP=$(find build -name "*.app" -type d | head -1) - if [ -n "$APP" ]; then - BINARY="$APP/Contents/MacOS/$(basename "$APP" .app)" - if [ -f "$BINARY" ]; then - echo "Binary found: $BINARY" - file "$BINARY" - lipo -info "$BINARY" || true - fi - fi - - - name: Upload Build Artifact - if: success() - uses: actions/upload-artifact@v4 - with: - name: RTDink-macOS-ARM64 - path: OSX/build/Release/*.app - retention-days: 7 - - diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index e03b506..662326f 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1692,8 +1692,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/opt/sdl2/Frameworks, - /usr/local/opt/sdl2/Frameworks, + /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1728,8 +1727,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/opt/sdl2/Frameworks, - /usr/local/opt/sdl2/Frameworks, + /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1758,8 +1756,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/opt/sdl2/Frameworks, - /usr/local/opt/sdl2/Frameworks, + /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", From 0af53e4fb83f6d03138686efc0b0c1116b36542c Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 11:15:23 -0300 Subject: [PATCH 034/106] Fix SDL2 framework path: use stable opt/sdl2/Frameworks instead of hardcoded Cellar version --- OSX/RTDink.xcodeproj/project.pbxproj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 662326f..e03b506 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1692,7 +1692,8 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + /opt/homebrew/opt/sdl2/Frameworks, + /usr/local/opt/sdl2/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1727,7 +1728,8 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + /opt/homebrew/opt/sdl2/Frameworks, + /usr/local/opt/sdl2/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1756,7 +1758,8 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(HOME)/Library/Frameworks", - /opt/homebrew/Cellar/sdl2/2.30.9/Frameworks, + /opt/homebrew/opt/sdl2/Frameworks, + /usr/local/opt/sdl2/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", From aa0e1f8ca80444b246603ec6597f1790d62472d9 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 11:31:48 -0300 Subject: [PATCH 035/106] Fix Generate pnglibconf.h script: handle missing prebuilt gracefully, try alternate proton path --- OSX/RTDink.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index e03b506..8e90379 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1394,7 +1394,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "LIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ ! -f \"$LIBPNG/pnglibconf.h\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\nfi\n"; + shellScript = "# Try standard path (RTDink sibling of proton/shared)\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\n# Also try direct proton path\nif [ ! -d \"$LIBPNG\" ]; then\n LIBPNG=\"$SRCROOT/../../proton/shared/Irrlicht/source/Irrlicht/libpng\"\nfi\nif [ ! -f \"$LIBPNG/pnglibconf.h\" ]; then\n if [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\n else\n echo \"Warning: pnglibconf.h.prebuilt not found at $LIBPNG, skipping\"\n fi\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ From a334fbc7b1da2dbcc45a487699eb712bfaf9341b Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 11:49:20 -0300 Subject: [PATCH 036/106] Fix pnglibconf.h script: try all possible proton/shared layouts including inside-repo --- OSX/RTDink.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 8e90379..576d6f4 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1394,7 +1394,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Try standard path (RTDink sibling of proton/shared)\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\n# Also try direct proton path\nif [ ! -d \"$LIBPNG\" ]; then\n LIBPNG=\"$SRCROOT/../../proton/shared/Irrlicht/source/Irrlicht/libpng\"\nfi\nif [ ! -f \"$LIBPNG/pnglibconf.h\" ]; then\n if [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\n else\n echo \"Warning: pnglibconf.h.prebuilt not found at $LIBPNG, skipping\"\n fi\nfi\n"; + shellScript = "# Try all known proton/shared layouts\nfor LIBPNG in \\\n \"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\" \\\n \"$SRCROOT/../../proton/shared/Irrlicht/source/Irrlicht/libpng\" \\\n \"$SRCROOT/../proton/shared/Irrlicht/source/Irrlicht/libpng\" \\\n \"$SRCROOT/../shared/Irrlicht/source/Irrlicht/libpng\"; do\n if [ -d \"$LIBPNG\" ]; then\n if [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\n fi\n break\n fi\ndone\n"; }; /* End PBXShellScriptBuildPhase section */ From 1c499cad3565ed1c45ce753b6f850ab79b0e71e1 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 11:54:50 -0300 Subject: [PATCH 037/106] Use PROTON_SHARED variable for all shared/ paths, defaults to ../../shared --- OSX/RTDink.xcodeproj/project.pbxproj | 39 +++++++++++++++------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 576d6f4..d153240 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1640,7 +1640,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = c11; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ../../shared/PlatformPrecomp.h; + GCC_PREFIX_HEADER = "$(PROTON_SHARED)/PlatformPrecomp.h"; GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_ALL_NO_LIB, NDEBUG, @@ -1650,11 +1650,11 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( ../source, - ../../shared, - ../../shared/util/boost/, - "../../shared/ClanLib-2.0/Sources", - ../../shared/FliteTTS/include, - ../../shared/OSX, + "$(PROTON_SHARED)", + "$(PROTON_SHARED)/util/boost/", + "$(PROTON_SHARED)/ClanLib-2.0/Sources", + "$(PROTON_SHARED)/FliteTTS/include", + "$(PROTON_SHARED)/OSX", /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, /opt/homebrew/include, @@ -1663,6 +1663,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; + PROTON_SHARED = "../../shared"; PROVISIONING_PROFILE = ""; SDKROOT = macosx; VALID_ARCHS = "arm64 x86_64"; @@ -1784,7 +1785,7 @@ GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ../../shared/PlatformPrecomp.h; + GCC_PREFIX_HEADER = "$(PROTON_SHARED)/PlatformPrecomp.h"; GCC_PREPROCESSOR_DEFINITIONS = ( _DEBUG, BOOST_ALL_NO_LIB, @@ -1798,11 +1799,11 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( ../source, - ../../shared, - ../../shared/util/boost/, - "../../shared/ClanLib-2.0/Sources", - ../../shared/FliteTTS/include, - ../../shared/OSX, + "$(PROTON_SHARED)", + "$(PROTON_SHARED)/util/boost/", + "$(PROTON_SHARED)/ClanLib-2.0/Sources", + "$(PROTON_SHARED)/FliteTTS/include", + "$(PROTON_SHARED)/OSX", /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, /opt/homebrew/include, @@ -1812,6 +1813,7 @@ MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; + PROTON_SHARED = "../../shared"; SDKROOT = macosx; }; name = Debug; @@ -1824,7 +1826,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = c11; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ../../shared/PlatformPrecomp.h; + GCC_PREFIX_HEADER = "$(PROTON_SHARED)/PlatformPrecomp.h"; GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_ALL_NO_LIB, NDEBUG, @@ -1838,11 +1840,11 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( ../source, - ../../shared, - ../../shared/util/boost/, - "../../shared/ClanLib-2.0/Sources", - ../../shared/FliteTTS/include, - ../../shared/OSX, + "$(PROTON_SHARED)", + "$(PROTON_SHARED)/util/boost/", + "$(PROTON_SHARED)/ClanLib-2.0/Sources", + "$(PROTON_SHARED)/FliteTTS/include", + "$(PROTON_SHARED)/OSX", /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, /opt/homebrew/include, @@ -1851,6 +1853,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; + PROTON_SHARED = "../../shared"; SDKROOT = macosx; VALID_ARCHS = "arm64 x86_64"; }; From 28e946cef7d89197318b40f9cca9c7bf7a333ab6 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 12:23:30 -0300 Subject: [PATCH 038/106] Fix shared path: auto-create ../../shared symlink to ../proton/shared in pre-build script --- OSX/RTDink.xcodeproj/project.pbxproj | 41 +++++++++++++--------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index d153240..95eed2a 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1394,7 +1394,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Try all known proton/shared layouts\nfor LIBPNG in \\\n \"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\" \\\n \"$SRCROOT/../../proton/shared/Irrlicht/source/Irrlicht/libpng\" \\\n \"$SRCROOT/../proton/shared/Irrlicht/source/Irrlicht/libpng\" \\\n \"$SRCROOT/../shared/Irrlicht/source/Irrlicht/libpng\"; do\n if [ -d \"$LIBPNG\" ]; then\n if [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\n fi\n break\n fi\ndone\n"; + shellScript = "# Create shared symlink if needed (supports proton cloned inside repo)\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_INSIDE=\"$SRCROOT/../proton/shared\"\nif [ ! -d \"$SHARED_SIBLING\" ] && [ -d \"$PROTON_INSIDE\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$SHARED_SIBLING\"\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -1640,7 +1640,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = c11; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(PROTON_SHARED)/PlatformPrecomp.h"; + GCC_PREFIX_HEADER = ../../shared/PlatformPrecomp.h; GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_ALL_NO_LIB, NDEBUG, @@ -1650,11 +1650,11 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( ../source, - "$(PROTON_SHARED)", - "$(PROTON_SHARED)/util/boost/", - "$(PROTON_SHARED)/ClanLib-2.0/Sources", - "$(PROTON_SHARED)/FliteTTS/include", - "$(PROTON_SHARED)/OSX", + ../../shared, + ../../shared/util/boost/, + "../../shared/ClanLib-2.0/Sources", + ../../shared/FliteTTS/include, + ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, /opt/homebrew/include, @@ -1663,7 +1663,6 @@ ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; - PROTON_SHARED = "../../shared"; PROVISIONING_PROFILE = ""; SDKROOT = macosx; VALID_ARCHS = "arm64 x86_64"; @@ -1785,7 +1784,7 @@ GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(PROTON_SHARED)/PlatformPrecomp.h"; + GCC_PREFIX_HEADER = ../../shared/PlatformPrecomp.h; GCC_PREPROCESSOR_DEFINITIONS = ( _DEBUG, BOOST_ALL_NO_LIB, @@ -1799,11 +1798,11 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( ../source, - "$(PROTON_SHARED)", - "$(PROTON_SHARED)/util/boost/", - "$(PROTON_SHARED)/ClanLib-2.0/Sources", - "$(PROTON_SHARED)/FliteTTS/include", - "$(PROTON_SHARED)/OSX", + ../../shared, + ../../shared/util/boost/, + "../../shared/ClanLib-2.0/Sources", + ../../shared/FliteTTS/include, + ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, /opt/homebrew/include, @@ -1813,7 +1812,6 @@ MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; - PROTON_SHARED = "../../shared"; SDKROOT = macosx; }; name = Debug; @@ -1826,7 +1824,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = c11; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(PROTON_SHARED)/PlatformPrecomp.h"; + GCC_PREFIX_HEADER = ../../shared/PlatformPrecomp.h; GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_ALL_NO_LIB, NDEBUG, @@ -1840,11 +1838,11 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( ../source, - "$(PROTON_SHARED)", - "$(PROTON_SHARED)/util/boost/", - "$(PROTON_SHARED)/ClanLib-2.0/Sources", - "$(PROTON_SHARED)/FliteTTS/include", - "$(PROTON_SHARED)/OSX", + ../../shared, + ../../shared/util/boost/, + "../../shared/ClanLib-2.0/Sources", + ../../shared/FliteTTS/include, + ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, /opt/homebrew/include, @@ -1853,7 +1851,6 @@ ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; - PROTON_SHARED = "../../shared"; SDKROOT = macosx; VALID_ARCHS = "arm64 x86_64"; }; From 5cf12185e754cb21f549f816d6e94f0f16bd74d4 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 12:32:12 -0300 Subject: [PATCH 039/106] Suppress deprecated NSOpenGL and char* warnings in all configs --- OSX/RTDink.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 95eed2a..13aa109 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1701,6 +1701,7 @@ /opt/homebrew/lib, /usr/local/lib, ); + OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1737,6 +1738,7 @@ /opt/homebrew/lib, /usr/local/lib, ); + OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1767,6 +1769,7 @@ /opt/homebrew/lib, /usr/local/lib, ); + OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; From 263b3def834acb46c716c6665e63a873b4b885db Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 12:39:39 -0300 Subject: [PATCH 040/106] Add ../proton/RTSimpleApp/source to HEADER_SEARCH_PATHS for inside-repo proton layout --- OSX/RTDink.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 13aa109..95b7699 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1657,6 +1657,7 @@ ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, + ../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, "$(HOME)/Library/Frameworks/SDL2.framework/Headers", @@ -1808,6 +1809,7 @@ ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, + ../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, "$(HOME)/Library/Frameworks/SDL2.framework/Headers", @@ -1848,6 +1850,7 @@ ../../shared/OSX, /Users/Seth/dev/rtsvn/projects/proton/locallibs, ../../proton/RTSimpleApp/source, + ../proton/RTSimpleApp/source, /opt/homebrew/include, /usr/local/include, "$(HOME)/Library/Frameworks/SDL2.framework/Headers", From 0a9aa981a64ae1eeb91f77bedbaa9247759af074 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 12:43:33 -0300 Subject: [PATCH 041/106] Fix pre-build script: also create ../../proton symlink for inside-repo proton layout --- OSX/RTDink.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 95b7699..591cdb1 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1394,7 +1394,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Create shared symlink if needed (supports proton cloned inside repo)\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_INSIDE=\"$SRCROOT/../proton/shared\"\nif [ ! -d \"$SHARED_SIBLING\" ] && [ -d \"$PROTON_INSIDE\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$SHARED_SIBLING\"\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; + shellScript = "# Create symlinks if proton is cloned inside the repo (MacInCloud layout)\n# This makes ../../shared and ../../proton work from OSX/ dir\nPROTON_INSIDE=\"$SRCROOT/../proton\"\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_SIBLING=\"$SRCROOT/../../proton\"\n\nif [ -d \"$PROTON_INSIDE\" ]; then\n if [ ! -d \"$SHARED_SIBLING\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE/shared\"\n ln -sf \"$PROTON_INSIDE/shared\" \"$SHARED_SIBLING\"\n fi\n if [ ! -d \"$PROTON_SIBLING\" ]; then\n echo \"Creating proton symlink: $PROTON_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$PROTON_SIBLING\"\n fi\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ From 8edddaf2e768b26414cc57797273f7e323adb82f Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 12:46:34 -0300 Subject: [PATCH 042/106] Suppress all warnings in OTHER_CFLAGS for old proton SDK compatibility --- OSX/RTDink.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 591cdb1..e8ae53a 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1702,7 +1702,7 @@ /opt/homebrew/lib, /usr/local/lib, ); - OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings"; + OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings -Wno-shorten-64-to-32 -Wno-conversion -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-nullability-completeness -w"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1739,7 +1739,7 @@ /opt/homebrew/lib, /usr/local/lib, ); - OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings"; + OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings -Wno-shorten-64-to-32 -Wno-conversion -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-nullability-completeness -w"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1770,7 +1770,7 @@ /opt/homebrew/lib, /usr/local/lib, ); - OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings"; + OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings -Wno-shorten-64-to-32 -Wno-conversion -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-nullability-completeness -w"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; From d35fa2b3b33334b5fd6d0cd7e055bb5cf26bdbfe Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 12:51:11 -0300 Subject: [PATCH 043/106] Add per-file compiler flags to MyOpenGLView.mm to suppress pointer cast errors --- OSX/RTDink.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index e8ae53a..d5c58d8 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -89,7 +89,7 @@ 5D70B62612B5FED300A1AB17 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D70B61E12B5FED300A1AB17 /* main.m */; }; 5D70B62712B5FED300A1AB17 /* MainController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D70B62012B5FED300A1AB17 /* MainController.mm */; }; 5D70B62812B5FED300A1AB17 /* MyApplication.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D70B62212B5FED300A1AB17 /* MyApplication.mm */; }; - 5D70B62912B5FED300A1AB17 /* MyOpenGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D70B62412B5FED300A1AB17 /* MyOpenGLView.mm */; }; + 5D70B62912B5FED300A1AB17 /* MyOpenGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D70B62412B5FED300A1AB17 /* MyOpenGLView.mm */; settings = {COMPILER_FLAGS = "-Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-error=int-to-pointer-cast"; }; }; 5D70B81112B606DC00A1AB17 /* PlatformSetup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70B79C12B606DC00A1AB17 /* PlatformSetup.cpp */; }; 5D70B81212B606DC00A1AB17 /* PlatformPrecomp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70B79E12B606DC00A1AB17 /* PlatformPrecomp.cpp */; }; 5D70B81312B606DC00A1AB17 /* BaseApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D70B79F12B606DC00A1AB17 /* BaseApp.cpp */; }; @@ -1702,7 +1702,7 @@ /opt/homebrew/lib, /usr/local/lib, ); - OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings -Wno-shorten-64-to-32 -Wno-conversion -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-nullability-completeness -w"; + OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1739,7 +1739,7 @@ /opt/homebrew/lib, /usr/local/lib, ); - OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings -Wno-shorten-64-to-32 -Wno-conversion -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-nullability-completeness -w"; + OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1770,7 +1770,7 @@ /opt/homebrew/lib, /usr/local/lib, ); - OTHER_CFLAGS = "-Wno-deprecated-declarations -Wno-writable-strings -Wno-write-strings -Wno-shorten-64-to-32 -Wno-conversion -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-nullability-completeness -w"; + OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; OTHER_LDFLAGS = "-framework SDL2"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; From edea2af5fc814efbaead6ed569481a28033df201 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 12:54:13 -0300 Subject: [PATCH 044/106] Pre-build script: patch MyOpenGLView.mm nil->0 cast fix for ARM64 --- OSX/RTDink.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index d5c58d8..39dd4be 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1394,7 +1394,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Create symlinks if proton is cloned inside the repo (MacInCloud layout)\n# This makes ../../shared and ../../proton work from OSX/ dir\nPROTON_INSIDE=\"$SRCROOT/../proton\"\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_SIBLING=\"$SRCROOT/../../proton\"\n\nif [ -d \"$PROTON_INSIDE\" ]; then\n if [ ! -d \"$SHARED_SIBLING\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE/shared\"\n ln -sf \"$PROTON_INSIDE/shared\" \"$SHARED_SIBLING\"\n fi\n if [ ! -d \"$PROTON_SIBLING\" ]; then\n echo \"Creating proton symlink: $PROTON_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$PROTON_SIBLING\"\n fi\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; + shellScript = "# Create symlinks if proton is cloned inside the repo (MacInCloud layout)\n# This makes ../../shared and ../../proton work from OSX/ dir\nPROTON_INSIDE=\"$SRCROOT/../proton\"\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_SIBLING=\"$SRCROOT/../../proton\"\n\nif [ -d \"$PROTON_INSIDE\" ]; then\n if [ ! -d \"$SHARED_SIBLING\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE/shared\"\n ln -sf \"$PROTON_INSIDE/shared\" \"$SHARED_SIBLING\"\n fi\n if [ ! -d \"$PROTON_SIBLING\" ]; then\n echo \"Creating proton symlink: $PROTON_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$PROTON_SIBLING\"\n fi\nfi\n\n# Fix MyOpenGLView.mm: replace (NSOpenGLPixelFormatAttribute)nil with (NSOpenGLPixelFormatAttribute)0\n# This is a hard error on ARM64 clang - nil is a pointer, can't cast to 32-bit uint\nMYOPENGLVIEW=\"$SRCROOT/../../shared/OSX/app/MyOpenGLView.mm\"\nif [ -f \"$MYOPENGLVIEW\" ]; then\n if grep -q '(NSOpenGLPixelFormatAttribute)nil' \"$MYOPENGLVIEW\"; then\n sed -i '' 's/(NSOpenGLPixelFormatAttribute)nil/(NSOpenGLPixelFormatAttribute)0/g' \"$MYOPENGLVIEW\"\n echo \"Patched MyOpenGLView.mm: replaced nil cast with 0\"\n fi\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ From 1982bea5bba227688355ba143888369b38b994f7 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:09:15 -0300 Subject: [PATCH 045/106] Switch macOS audio from FMOD to SDL2_mixer (RT_USE_SDL_AUDIO) --- OSX/RTDink.xcodeproj/project.pbxproj | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 39dd4be..c5512c7 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ 5D21B9FA1FA6C34500B12CB3 /* GamepadManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9F61FA6C34500B12CB3 /* GamepadManager.cpp */; }; 5D21B9FB1FA6C34500B12CB3 /* Gamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9F81FA6C34500B12CB3 /* Gamepad.cpp */; }; 5D21B9FE1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9FD1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp */; }; + AA000004000000000000AA01 /* AudioManagerSDL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000003000000000000AA01 /* AudioManagerSDL.cpp */; }; 5D21BA051FA6C3DD00B12CB3 /* AdProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */; }; AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */; }; AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA06 /* TouchDragComponent.cpp */; }; @@ -278,6 +279,8 @@ 5D21B9F81FA6C34500B12CB3 /* Gamepad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Gamepad.cpp; path = ../../shared/Gamepad/Gamepad.cpp; sourceTree = ""; }; 5D21B9FC1FA6C37E00B12CB3 /* AudioManagerFMODStudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioManagerFMODStudio.h; path = ../../shared/Audio/AudioManagerFMODStudio.h; sourceTree = ""; }; 5D21B9FD1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioManagerFMODStudio.cpp; path = ../../shared/Audio/AudioManagerFMODStudio.cpp; sourceTree = ""; }; + AA000003000000000000AA01 /* AudioManagerSDL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioManagerSDL.cpp; path = ../../shared/Audio/AudioManagerSDL.cpp; sourceTree = ""; }; + AA000003000000000000AA02 /* AudioManagerSDL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioManagerSDL.h; path = ../../shared/Audio/AudioManagerSDL.h; sourceTree = ""; }; 5D21B9FF1FA6C3DC00B12CB3 /* AdProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AdProvider.h; path = ../../shared/Ad/AdProvider.h; sourceTree = ""; }; 5D21BA001FA6C3DC00B12CB3 /* GamepadiCade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadiCade.h; path = ../../shared/Gamepad/GamepadiCade.h; sourceTree = ""; }; 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AdProvider.cpp; path = ../../shared/Ad/AdProvider.cpp; sourceTree = ""; }; @@ -894,6 +897,8 @@ children = ( 5D21B9FD1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp */, 5D21B9FC1FA6C37E00B12CB3 /* AudioManagerFMODStudio.h */, + AA000003000000000000AA01 /* AudioManagerSDL.cpp */, + AA000003000000000000AA02 /* AudioManagerSDL.h */, 5D70C01512B72BE700A1AB17 /* AudioManager.cpp */, 5D70C01612B72BE700A1AB17 /* AudioManager.h */, ); @@ -1475,7 +1480,7 @@ 5D70C0DA12B72BE700A1AB17 /* TyperComponent.cpp in Sources */, 5D70C0DB12B72BE700A1AB17 /* ProgressBarComponent.cpp in Sources */, 5D70C0DC12B72BE700A1AB17 /* TapSequenceDetectComponent.cpp in Sources */, - 5D21B9FE1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp in Sources */, + AA000004000000000000AA01 /* AudioManagerSDL.cpp in Sources */, 5D21B9F11FA6C31D00B12CB3 /* pngrtran.c in Sources */, 5D70C0DD12B72BE700A1AB17 /* UnderlineRenderComponent.cpp in Sources */, 5D70C0DE12B72BE700A1AB17 /* FocusInputComponent.cpp in Sources */, @@ -1687,6 +1692,7 @@ RT_IPV6, RT_JPG_SUPPORT, C_GL_MODE, + RT_USE_SDL_AUDIO, ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; @@ -1703,7 +1709,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2"; + OTHER_LDFLAGS = "-framework SDL2 -lSDL2_mixer"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; CODE_SIGNING_REQUIRED = NO; @@ -1740,7 +1746,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2"; + OTHER_LDFLAGS = "-framework SDL2 -lSDL2_mixer"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; @@ -1771,7 +1777,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2"; + OTHER_LDFLAGS = "-framework SDL2 -lSDL2_mixer"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; @@ -1797,6 +1803,7 @@ RT_IPV6, RT_PNG_SUPPORT, RT_CUSTOM_LOGMSG, + RT_USE_SDL_AUDIO, ); GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -1838,6 +1845,7 @@ RT_JPG_SUPPORT, RT_IPV6, RT_PNG_SUPPORT, + RT_USE_SDL_AUDIO, ); GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; From d34d776d88d12f9a3931848210b2b8546761a043 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:13:48 -0300 Subject: [PATCH 046/106] Switch to SDL2_mixer framework, update INSTALL.md with no-admin instructions --- INSTALL.md | 36 ++++++++++++---------------- OSX/RTDink.xcodeproj/project.pbxproj | 6 ++--- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 140bae8..e8eb2b5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,7 +10,7 @@ See [README.md](README.md) for download links if you just want to play the game. | **Linux** | CMake | Proton SDK cloned inside project, uses SDL2 + SDL2_mixer for audio | | **iOS** | Xcode | Proton SDK sibling layout, uses FMOD for audio | | **Android** | Gradle + CMake | Proton SDK sibling layout, uses FMOD for audio | -| **macOS** | Xcode | Apple Silicon (ARM64), requires FMOD for audio (see [macOS section](#macos)) | +| **macOS** | Xcode | Apple Silicon (ARM64), uses SDL2_mixer for audio (see [macOS section](#macos)) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | All platforms require the **Dink Smallwood game data** (`dink/` directory) to play. See [README.md](README.md#just-want-to-play) for how to obtain it. @@ -122,45 +122,39 @@ git clone https://github.com/SethRobinson/proton.git git clone https://github.com/SethRobinson/RTDink.git ``` -2. Install SDL2: +2. Install **SDL2** and **SDL2_mixer**: **Option A — Homebrew** (if you have admin access): ```bash - brew install sdl2 + brew install sdl2 sdl2_mixer ``` **Option B — No admin access** (e.g. MacInCloud or shared machines): ```bash - # Download the official SDL2 framework DMG + # SDL2 framework curl -L -o ~/SDL2.dmg "https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.dmg" hdiutil attach ~/SDL2.dmg mkdir -p ~/Library/Frameworks cp -r /Volumes/SDL2/SDL2.framework ~/Library/Frameworks/ hdiutil detach /Volumes/SDL2 + + # SDL2_mixer framework + curl -L -o ~/SDL2_mixer.dmg "https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0.dmg" + hdiutil attach ~/SDL2_mixer.dmg + cp -r "/Volumes/SDL2_mixer/SDL2_mixer.framework" ~/Library/Frameworks/ + hdiutil detach /Volumes/SDL2_mixer ``` - The Xcode project looks for `SDL2.framework` in `~/Library/Frameworks/` automatically — no admin or Homebrew required. - -3. Download the **FMOD Studio API** from https://www.fmod.com/download (free registration required). - - Choose **FMOD Engine** → **macOS** - - Extract and copy the FMOD headers into `proton/shared/OSX/` so the path looks like: - ``` - proton/shared/OSX/fmod.hpp - proton/shared/OSX/fmod_studio.hpp - ``` - - Copy `libfmod.dylib` into `RTDink/OSX/` (next to the `.xcodeproj`): - ``` - RTDink/OSX/libfmod.dylib - ``` - -4. Open the Xcode project: + The Xcode project looks for both frameworks in `~/Library/Frameworks/` automatically — no admin or Homebrew required. + +3. Open the Xcode project: ```bash open RTDink/OSX/RTDink.xcodeproj ``` -5. Select the **Release** configuration and build (`⌘B`). +4. Select the **Release** configuration and build (`⌘B`). -> **Without FMOD:** The project compiles but has no audio. The CI workflow builds without FMOD using a silent stub. For a fully working game, FMOD is required. +> **Audio:** The macOS build uses SDL2_mixer for audio (same as Linux) — no FMOD required. --- diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index c5512c7..1c5649e 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1709,7 +1709,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2 -lSDL2_mixer"; + OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; CODE_SIGNING_REQUIRED = NO; @@ -1746,7 +1746,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2 -lSDL2_mixer"; + OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; @@ -1777,7 +1777,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2 -lSDL2_mixer"; + OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; From bee2620e3a0a75cd192e79f25274132434fa3df3 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:21:07 -0300 Subject: [PATCH 047/106] Use AudioManagerSDL for macOS when RT_USE_SDL_AUDIO is defined --- source/App.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index adef282..15c5f4d 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -89,11 +89,14 @@ GamepadManager * GetGamepadManager() {return &g_gamepadManager;} AudioManagerFMOD g_audioManager; #else //it's being compiled as a native OSX app -#ifdef RT_NO_FMOD +#if defined RT_USE_SDL_AUDIO +#include "Audio/AudioManagerSDL.h" + AudioManagerSDL g_audioManager; +#elif defined RT_NO_FMOD AudioManager g_audioManager; //silent stub, no FMOD dependency #else #include "Audio/AudioManagerFMODStudio.h" - AudioManagerFMOD g_audioManager; //dummy with no sound + AudioManagerFMOD g_audioManager; #endif //in theory, CocosDenshion should work for the Mac builds, but right now it seems to want a big chunk of From 1d7c0c6e505f5fa7ec0b4bdbe3ef857f403536df Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:26:51 -0300 Subject: [PATCH 048/106] macOS: remove FMOD/stub audio, use SDL audio only --- source/App.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 15c5f4d..2e765c2 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -89,15 +89,8 @@ GamepadManager * GetGamepadManager() {return &g_gamepadManager;} AudioManagerFMOD g_audioManager; #else //it's being compiled as a native OSX app -#if defined RT_USE_SDL_AUDIO #include "Audio/AudioManagerSDL.h" AudioManagerSDL g_audioManager; -#elif defined RT_NO_FMOD - AudioManager g_audioManager; //silent stub, no FMOD dependency -#else -#include "Audio/AudioManagerFMODStudio.h" - AudioManagerFMOD g_audioManager; -#endif //in theory, CocosDenshion should work for the Mac builds, but right now it seems to want a big chunk of //Cocos2d included so I'm not fiddling with it for now From b576d3b90626e0880d9be05acf5ab4dda8ce54d8 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:29:12 -0300 Subject: [PATCH 049/106] README: update macOS audio from FMOD to SDL2_mixer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9138f6..0549704 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ RTDink can be built for multiple platforms. Each uses the [Proton SDK](https://g |----------|-------------|-------------| | **Windows** | Visual Studio 2017+ | See [detailed Windows instructions](#windows) below | | **Linux** | CMake + SDL2 | `git clone ... && ./linux_setup.sh` ([details](INSTALL.md#linux)) | -| **macOS** | Xcode | Apple Silicon (ARM64), requires FMOD for audio -- see [INSTALL.md](INSTALL.md#macos) | +| **macOS** | Xcode | Apple Silicon (ARM64), uses SDL2_mixer for audio -- see [INSTALL.md](INSTALL.md#macos) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | | **iOS** | Xcode | Proton SDK sibling layout, open `RTDink.xcodeproj` ([more info](INSTALL.md#ios)) | | **Android** | Gradle + CMake | Proton SDK sibling layout, open `AndroidGradle/` in Android Studio ([more info](INSTALL.md#android)) | From 0fcf61ccc6b2d6707178480f1cd5c58a7f8fac02 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:31:06 -0300 Subject: [PATCH 050/106] INSTALL.md: remove FMOD reference from macOS section --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index e8eb2b5..5f04dc2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -97,7 +97,7 @@ proton/ The macOS build uses the Xcode project at `OSX/RTDink.xcodeproj`. - **Supported architecture:** Apple Silicon (ARM64 / M1+). Intel (x86_64) is not currently supported. -- **Audio:** Requires the **FMOD Studio API** for a fully functional build with sound (proprietary, free for non-commercial use). +- **Audio:** Uses **SDL2_mixer** (same as Linux) — no proprietary dependencies required. ### Directory layout From 31c46c42e3e1842c2b146f0ea421d3826c50b30b Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:45:20 -0300 Subject: [PATCH 051/106] Add SDL2_mixer header and framework search paths to all configs --- OSX/RTDink.xcodeproj/project.pbxproj | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 1c5649e..8ec4755 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1666,6 +1666,9 @@ /opt/homebrew/include, /usr/local/include, "$(HOME)/Library/Frameworks/SDL2.framework/Headers", + "$(HOME)/Library/Frameworks/SDL2_mixer.framework/Headers", + /opt/homebrew/opt/sdl2_mixer/include/SDL2, + /usr/local/opt/sdl2_mixer/include/SDL2, ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; @@ -1701,6 +1704,8 @@ "$(HOME)/Library/Frameworks", /opt/homebrew/opt/sdl2/Frameworks, /usr/local/opt/sdl2/Frameworks, + /opt/homebrew/opt/sdl2_mixer/Frameworks, + /usr/local/opt/sdl2_mixer/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1738,6 +1743,8 @@ "$(HOME)/Library/Frameworks", /opt/homebrew/opt/sdl2/Frameworks, /usr/local/opt/sdl2/Frameworks, + /opt/homebrew/opt/sdl2_mixer/Frameworks, + /usr/local/opt/sdl2_mixer/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1769,6 +1776,8 @@ "$(HOME)/Library/Frameworks", /opt/homebrew/opt/sdl2/Frameworks, /usr/local/opt/sdl2/Frameworks, + /opt/homebrew/opt/sdl2_mixer/Frameworks, + /usr/local/opt/sdl2_mixer/Frameworks, ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -1820,6 +1829,9 @@ /opt/homebrew/include, /usr/local/include, "$(HOME)/Library/Frameworks/SDL2.framework/Headers", + "$(HOME)/Library/Frameworks/SDL2_mixer.framework/Headers", + /opt/homebrew/opt/sdl2_mixer/include/SDL2, + /usr/local/opt/sdl2_mixer/include/SDL2, ); MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; @@ -1862,6 +1874,9 @@ /opt/homebrew/include, /usr/local/include, "$(HOME)/Library/Frameworks/SDL2.framework/Headers", + "$(HOME)/Library/Frameworks/SDL2_mixer.framework/Headers", + /opt/homebrew/opt/sdl2_mixer/include/SDL2, + /usr/local/opt/sdl2_mixer/include/SDL2, ); MACOSX_DEPLOYMENT_TARGET = 11.0; PREBINDING = NO; From 0db3a6570391a0dcea3f516f3818326049ee71ed Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:51:27 -0300 Subject: [PATCH 052/106] Pre-build: create SDL_mixer.h symlink inside SDL2.framework/Headers for include compatibility --- OSX/RTDink.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 8ec4755..17c1303 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1399,7 +1399,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Create symlinks if proton is cloned inside the repo (MacInCloud layout)\n# This makes ../../shared and ../../proton work from OSX/ dir\nPROTON_INSIDE=\"$SRCROOT/../proton\"\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_SIBLING=\"$SRCROOT/../../proton\"\n\nif [ -d \"$PROTON_INSIDE\" ]; then\n if [ ! -d \"$SHARED_SIBLING\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE/shared\"\n ln -sf \"$PROTON_INSIDE/shared\" \"$SHARED_SIBLING\"\n fi\n if [ ! -d \"$PROTON_SIBLING\" ]; then\n echo \"Creating proton symlink: $PROTON_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$PROTON_SIBLING\"\n fi\nfi\n\n# Fix MyOpenGLView.mm: replace (NSOpenGLPixelFormatAttribute)nil with (NSOpenGLPixelFormatAttribute)0\n# This is a hard error on ARM64 clang - nil is a pointer, can't cast to 32-bit uint\nMYOPENGLVIEW=\"$SRCROOT/../../shared/OSX/app/MyOpenGLView.mm\"\nif [ -f \"$MYOPENGLVIEW\" ]; then\n if grep -q '(NSOpenGLPixelFormatAttribute)nil' \"$MYOPENGLVIEW\"; then\n sed -i '' 's/(NSOpenGLPixelFormatAttribute)nil/(NSOpenGLPixelFormatAttribute)0/g' \"$MYOPENGLVIEW\"\n echo \"Patched MyOpenGLView.mm: replaced nil cast with 0\"\n fi\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; + shellScript = "# Create symlinks if proton is cloned inside the repo (MacInCloud layout)\n# This makes ../../shared and ../../proton work from OSX/ dir\nPROTON_INSIDE=\"$SRCROOT/../proton\"\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_SIBLING=\"$SRCROOT/../../proton\"\n\nif [ -d \"$PROTON_INSIDE\" ]; then\n if [ ! -d \"$SHARED_SIBLING\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE/shared\"\n ln -sf \"$PROTON_INSIDE/shared\" \"$SHARED_SIBLING\"\n fi\n if [ ! -d \"$PROTON_SIBLING\" ]; then\n echo \"Creating proton symlink: $PROTON_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$PROTON_SIBLING\"\n fi\nfi\n\n# Fix MyOpenGLView.mm: replace (NSOpenGLPixelFormatAttribute)nil with (NSOpenGLPixelFormatAttribute)0\n# This is a hard error on ARM64 clang - nil is a pointer, can't cast to 32-bit uint\nMYOPENGLVIEW=\"$SRCROOT/../../shared/OSX/app/MyOpenGLView.mm\"\nif [ -f \"$MYOPENGLVIEW\" ]; then\n if grep -q '(NSOpenGLPixelFormatAttribute)nil' \"$MYOPENGLVIEW\"; then\n sed -i '' 's/(NSOpenGLPixelFormatAttribute)nil/(NSOpenGLPixelFormatAttribute)0/g' \"$MYOPENGLVIEW\"\n echo \"Patched MyOpenGLView.mm: replaced nil cast with 0\"\n fi\nfi\n\n# Create SDL2/SDL_mixer.h compatibility symlink for SDL2_mixer.framework\nSDL2_MIXER_HEADERS=\"$HOME/Library/Frameworks/SDL2_mixer.framework/Headers\"\nSDL2_HEADERS=\"$HOME/Library/Frameworks/SDL2.framework/Headers\"\nif [ -d \"$SDL2_MIXER_HEADERS\" ] && [ -d \"$SDL2_HEADERS\" ]; then\n if [ ! -f \"$SDL2_HEADERS/SDL_mixer.h\" ]; then\n ln -sf \"$SDL2_MIXER_HEADERS/SDL_mixer.h\" \"$SDL2_HEADERS/SDL_mixer.h\"\n echo \"Created SDL_mixer.h symlink in SDL2.framework/Headers\"\n fi\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ From 2c49263ccc25c1b37320486e5d7c82e68ea5336f Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 13:55:51 -0300 Subject: [PATCH 053/106] Add rpath for SDL2 frameworks to fix runtime dyld error --- OSX/RTDink.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 17c1303..2dd7d70 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1714,7 +1714,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer"; + OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer -rpath $(HOME)/Library/Frameworks -rpath /opt/homebrew/lib -rpath /usr/local/lib"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; CODE_SIGNING_REQUIRED = NO; @@ -1753,7 +1753,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer"; + OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer -rpath $(HOME)/Library/Frameworks -rpath /opt/homebrew/lib -rpath /usr/local/lib"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; @@ -1786,7 +1786,7 @@ /usr/local/lib, ); OTHER_CFLAGS = "-w -Wno-error -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"; - OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer"; + OTHER_LDFLAGS = "-framework SDL2 -framework SDL2_mixer -rpath $(HOME)/Library/Frameworks -rpath /opt/homebrew/lib -rpath /usr/local/lib"; PRODUCT_NAME = "Dink Smallwood HD"; PROVISIONING_PROFILE_SPECIFIER = ""; }; From 6430ce52ee2c98e6a83872cc2204a7e38a0add64 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 14:02:02 -0300 Subject: [PATCH 054/106] Fix XIB: replace AppDelegate with MainController as app delegate --- OSX/English.lproj/MainMenu.xib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSX/English.lproj/MainMenu.xib b/OSX/English.lproj/MainMenu.xib index b8d6b4c..b57cc83 100644 --- a/OSX/English.lproj/MainMenu.xib +++ b/OSX/English.lproj/MainMenu.xib @@ -13,7 +13,7 @@ - + From 0c865568226bfb8e2e18a53618599617226822df Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 14:06:22 -0300 Subject: [PATCH 055/106] Fix AddTextToLog: create save dir if missing, don't assert on fopen failure --- source/App.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 2e765c2..2ce6c7c 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -1421,12 +1421,21 @@ void App::AddTextToLog(const char *tex, const char *filename) if (m_logFileHandle == NULL) { - //open 'er up m_logFileHandle = fopen(filename, "ab"); if (!m_logFileHandle) { - assert(!"huh?"); + // Save path may not exist yet, try to create it + string savePath = GetSavePath(); + if (!savePath.empty()) + { + mkdir(savePath.c_str(), 0755); + m_logFileHandle = fopen(filename, "ab"); + } + if (!m_logFileHandle) + { + return; // silently fail, don't crash + } } return; } From 1f5afbf5f04c06075182a1abb8e2ade51970efd4 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 14:07:44 -0300 Subject: [PATCH 056/106] Fix AddTextToLog: use _mkdir on Windows, mkdir on POSIX --- source/App.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/App.cpp b/source/App.cpp index 2ce6c7c..7390b38 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -1429,7 +1429,11 @@ void App::AddTextToLog(const char *tex, const char *filename) string savePath = GetSavePath(); if (!savePath.empty()) { +#ifdef _WIN32 + _mkdir(savePath.c_str()); +#else mkdir(savePath.c_str(), 0755); +#endif m_logFileHandle = fopen(filename, "ab"); } if (!m_logFileHandle) From 64f9fa5c676743997e825c0c1db204935adcceca Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Tue, 3 Mar 2026 14:10:34 -0300 Subject: [PATCH 057/106] Fix mkdir: include sys/stat.h on non-Windows --- source/App.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/App.cpp b/source/App.cpp index 7390b38..6b86cf9 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -6,6 +6,9 @@ */ #include "PlatformPrecomp.h" #include "App.h" +#ifndef _WIN32 +#include +#endif #include "GUI/MainMenu.h" #include "Entity/EntityUtils.h"//create the classes that our globally library expects to exist somewhere. #include "dink/dink.h" From fbea8db3d55b7d356e06a7599b1f6977da7a00d6 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 18:15:52 -0300 Subject: [PATCH 058/106] Add gamepad support for macOS via GamepadProviderSDL2 --- source/App.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/App.cpp b/source/App.cpp index 6b86cf9..0977f55 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -658,7 +658,7 @@ bool App::Init() GetGamepadManager()->AddProvider(pTempDirectX); //use directx joysticks #endif -#if defined(RTLINUX) || defined(PLATFORM_LINUX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); #endif From a1b34a7f1cf104d897e11838d539176045ce6147 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 18:20:43 -0300 Subject: [PATCH 059/106] Include GamepadProviderSDL2.h for PLATFORM_OSX to fix build error --- source/App.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/App.cpp b/source/App.cpp index 0977f55..c6b0c37 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -93,6 +93,7 @@ GamepadManager * GetGamepadManager() {return &g_gamepadManager;} #else //it's being compiled as a native OSX app #include "Audio/AudioManagerSDL.h" +#include "Gamepad/GamepadProviderSDL2.h" AudioManagerSDL g_audioManager; //in theory, CocosDenshion should work for the Mac builds, but right now it seems to want a big chunk of From ec3a830675b71fe25ddaae21397b22b84bc40460 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 18:25:41 -0300 Subject: [PATCH 060/106] Add GamepadProviderSDL2.cpp to Xcode project to fix linker error on macOS --- OSX/RTDink.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 2dd7d70..d51079a 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -27,6 +27,7 @@ 5D21B9FB1FA6C34500B12CB3 /* Gamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9F81FA6C34500B12CB3 /* Gamepad.cpp */; }; 5D21B9FE1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9FD1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp */; }; AA000004000000000000AA01 /* AudioManagerSDL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000003000000000000AA01 /* AudioManagerSDL.cpp */; }; + AA000005000000000000AA01 /* GamepadProviderSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000006000000000000AA01 /* GamepadProviderSDL2.cpp */; }; 5D21BA051FA6C3DD00B12CB3 /* AdProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */; }; AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */; }; AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA06 /* TouchDragComponent.cpp */; }; @@ -290,6 +291,7 @@ 5D21BA0C1FA6C6BE00B12CB3 /* RenderScissorComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderScissorComponent.cpp; path = ../../shared/Entity/RenderScissorComponent.cpp; sourceTree = ""; }; 5D21BA0D1FA6C6BE00B12CB3 /* RenderScissorComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderScissorComponent.h; path = ../../shared/Entity/RenderScissorComponent.h; sourceTree = ""; }; 5D21BA0F1FA6C6EE00B12CB3 /* GamepadProvideriCade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvideriCade.cpp; path = ../../shared/Gamepad/GamepadProvideriCade.cpp; sourceTree = ""; }; + AA000006000000000000AA01 /* GamepadProviderSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProviderSDL2.cpp; path = ../../shared/Gamepad/GamepadProviderSDL2.cpp; sourceTree = ""; }; 5D21BA101FA6C6EE00B12CB3 /* GamepadProvideriCade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadProvideriCade.h; path = ../../shared/Gamepad/GamepadProvideriCade.h; sourceTree = ""; }; 5D21BA131FA6C76500B12CB3 /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatadst.c; path = ../../../shared/Irrlicht/source/Irrlicht/jpeglib/jdatadst.c; sourceTree = ""; }; 5D21BA141FA6C76500B12CB3 /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatasrc.c; path = ../../../shared/Irrlicht/source/Irrlicht/jpeglib/jdatasrc.c; sourceTree = ""; }; @@ -1474,6 +1476,7 @@ 5D70C0D612B72BE700A1AB17 /* ScrollBarRenderComponent.cpp in Sources */, 5D70C0D712B72BE700A1AB17 /* ScrollComponent.cpp in Sources */, 5D21BA111FA6C6EE00B12CB3 /* GamepadProvideriCade.cpp in Sources */, + AA000005000000000000AA01 /* GamepadProviderSDL2.cpp in Sources */, 5D70C0D812B72BE700A1AB17 /* TextBoxRenderComponent.cpp in Sources */, 5D21B9EB1FA6C31D00B12CB3 /* pngset.c in Sources */, 5D70C0D912B72BE700A1AB17 /* HTTPComponent.cpp in Sources */, From f18d9e9333991928d0405896eb547c6c122c6977 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 18:30:55 -0300 Subject: [PATCH 061/106] Add GamepadSDL2.cpp and SDL2Main.cpp to Xcode project to fix remaining linker errors --- OSX/RTDink.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index d51079a..e53f496 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -28,6 +28,8 @@ 5D21B9FE1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9FD1FA6C37E00B12CB3 /* AudioManagerFMODStudio.cpp */; }; AA000004000000000000AA01 /* AudioManagerSDL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000003000000000000AA01 /* AudioManagerSDL.cpp */; }; AA000005000000000000AA01 /* GamepadProviderSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000006000000000000AA01 /* GamepadProviderSDL2.cpp */; }; + AA000007000000000000AA01 /* GamepadSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000008000000000000AA01 /* GamepadSDL2.cpp */; }; + AA000009000000000000AA01 /* SDL2Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000010000000000000AA01 /* SDL2Main.cpp */; }; 5D21BA051FA6C3DD00B12CB3 /* AdProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */; }; AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */; }; AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA06 /* TouchDragComponent.cpp */; }; @@ -292,6 +294,8 @@ 5D21BA0D1FA6C6BE00B12CB3 /* RenderScissorComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderScissorComponent.h; path = ../../shared/Entity/RenderScissorComponent.h; sourceTree = ""; }; 5D21BA0F1FA6C6EE00B12CB3 /* GamepadProvideriCade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvideriCade.cpp; path = ../../shared/Gamepad/GamepadProvideriCade.cpp; sourceTree = ""; }; AA000006000000000000AA01 /* GamepadProviderSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProviderSDL2.cpp; path = ../../shared/Gamepad/GamepadProviderSDL2.cpp; sourceTree = ""; }; + AA000008000000000000AA01 /* GamepadSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadSDL2.cpp; path = ../../shared/Gamepad/GamepadSDL2.cpp; sourceTree = ""; }; + AA000010000000000000AA01 /* SDL2Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SDL2Main.cpp; path = ../../shared/SDL/SDL2Main.cpp; sourceTree = ""; }; 5D21BA101FA6C6EE00B12CB3 /* GamepadProvideriCade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadProvideriCade.h; path = ../../shared/Gamepad/GamepadProvideriCade.h; sourceTree = ""; }; 5D21BA131FA6C76500B12CB3 /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatadst.c; path = ../../../shared/Irrlicht/source/Irrlicht/jpeglib/jdatadst.c; sourceTree = ""; }; 5D21BA141FA6C76500B12CB3 /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatasrc.c; path = ../../../shared/Irrlicht/source/Irrlicht/jpeglib/jdatasrc.c; sourceTree = ""; }; @@ -1477,6 +1481,8 @@ 5D70C0D712B72BE700A1AB17 /* ScrollComponent.cpp in Sources */, 5D21BA111FA6C6EE00B12CB3 /* GamepadProvideriCade.cpp in Sources */, AA000005000000000000AA01 /* GamepadProviderSDL2.cpp in Sources */, + AA000007000000000000AA01 /* GamepadSDL2.cpp in Sources */, + AA000009000000000000AA01 /* SDL2Main.cpp in Sources */, 5D70C0D812B72BE700A1AB17 /* TextBoxRenderComponent.cpp in Sources */, 5D21B9EB1FA6C31D00B12CB3 /* pngset.c in Sources */, 5D70C0D912B72BE700A1AB17 /* HTTPComponent.cpp in Sources */, From a12fe95288da7f57a3dceb977bc323b99be19af0 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 18:49:16 -0300 Subject: [PATCH 062/106] Fix macOS gamepad duplicate symbols: define g_sig_SDLEvent in App.cpp, poll SDL events each frame, init joystick subsystem on macOS --- source/App.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/source/App.cpp b/source/App.cpp index c6b0c37..c51d433 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -94,8 +94,12 @@ GamepadManager * GetGamepadManager() {return &g_gamepadManager;} //it's being compiled as a native OSX app #include "Audio/AudioManagerSDL.h" #include "Gamepad/GamepadProviderSDL2.h" +#include AudioManagerSDL g_audioManager; +// Define the SDL event signal used by GamepadProviderSDL2 on macOS +boost::signals2::signal g_sig_SDLEvent; + //in theory, CocosDenshion should work for the Mac builds, but right now it seems to want a big chunk of //Cocos2d included so I'm not fiddling with it for now @@ -660,6 +664,9 @@ bool App::Init() #endif #if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#ifdef PLATFORM_OSX + SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER); +#endif GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); #endif @@ -930,6 +937,21 @@ void App::Update() { BaseApp::Update(); m_adManager.Update(); + +#ifdef PLATFORM_OSX + // macOS uses Cocoa event loop, not SDL2Main, so poll SDL joystick events + // and fire the signal that GamepadProviderSDL2 listens to. + { + SDL_Event ev; + while (SDL_PollEvent(&ev)) + { + VariantList v; + v.Get(0).Set((void*)&ev); + g_sig_SDLEvent(&v); + } + } +#endif + g_gamepadManager.Update(); if (!m_bDidPostInit) From bdf3294496ba5e47cd91cf71b0a017e1ef82f26c Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 18:53:21 -0300 Subject: [PATCH 063/106] Fix Variant::Set call: cast SDL_Event* to Entity* like SDL2Main.cpp does --- source/App.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/App.cpp b/source/App.cpp index c51d433..afce9ee 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -946,7 +946,7 @@ void App::Update() while (SDL_PollEvent(&ev)) { VariantList v; - v.Get(0).Set((void*)&ev); + v.Get(0).Set((Entity*)&ev); //hack: cast to Entity* to pass pointer, receiver casts back to SDL_Event* g_sig_SDLEvent(&v); } } From 83f7eb47f3fdcffd534ca0e74b1fb0992b076c1c Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 19:33:15 -0300 Subject: [PATCH 064/106] Add GamepadProviderSDL2.cpp and GamepadSDL2.cpp to Xcode project (fix linker errors on macOS) --- RTDink.xcodeproj/project.pbxproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/RTDink.xcodeproj/project.pbxproj b/RTDink.xcodeproj/project.pbxproj index 874f310..119b483 100644 --- a/RTDink.xcodeproj/project.pbxproj +++ b/RTDink.xcodeproj/project.pbxproj @@ -230,6 +230,8 @@ 5D9F6FE228A8EFB900D3F15D /* GamepadManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D9F6FD928A8EFB800D3F15D /* GamepadManager.cpp */; }; 5D9F6FE328A8EFB900D3F15D /* GamepadProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D9F6FDB28A8EFB800D3F15D /* GamepadProvider.cpp */; }; 5D9F6FE428A8EFB900D3F15D /* GamepadProvideriCade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D9F6FDC28A8EFB800D3F15D /* GamepadProvideriCade.cpp */; }; + 5DAE00072DA5F10000AE0007 /* GamepadProviderSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE00082DA5F10000AE0008 /* GamepadProviderSDL2.cpp */; }; + 5DAE00092DA5F10000AE0009 /* GamepadSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE000A2DA5F10000AE000A /* GamepadSDL2.cpp */; }; 5D9F6FE628A8F01800D3F15D /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D9F6FE528A8F01800D3F15D /* GameController.framework */; }; 5DA1FCF70F01EEFD001E9C1B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DA1FCF60F01EEFD001E9C1B /* AudioToolbox.framework */; }; 5DA1FD030F01EF07001E9C1B /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DA1FD020F01EF07001E9C1B /* CoreAudio.framework */; }; @@ -636,6 +638,8 @@ 5D9F6FDA28A8EFB800D3F15D /* GamepadiCade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadiCade.h; path = Gamepad/GamepadiCade.h; sourceTree = ""; }; 5D9F6FDB28A8EFB800D3F15D /* GamepadProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvider.cpp; path = Gamepad/GamepadProvider.cpp; sourceTree = ""; }; 5D9F6FDC28A8EFB800D3F15D /* GamepadProvideriCade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvideriCade.cpp; path = Gamepad/GamepadProvideriCade.cpp; sourceTree = ""; }; + 5DAE00082DA5F10000AE0008 /* GamepadProviderSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProviderSDL2.cpp; path = Gamepad/GamepadProviderSDL2.cpp; sourceTree = ""; }; + 5DAE000A2DA5F10000AE000A /* GamepadSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadSDL2.cpp; path = Gamepad/GamepadSDL2.cpp; sourceTree = ""; }; 5D9F6FE528A8F01800D3F15D /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; 5DA1FCF60F01EEFD001E9C1B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 5DA1FD020F01EF07001E9C1B /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; @@ -941,6 +945,8 @@ 5D9F6FD228A8EFB700D3F15D /* GamepadProvider.h */, 5D9F6FDC28A8EFB800D3F15D /* GamepadProvideriCade.cpp */, 5D9F6FD828A8EFB800D3F15D /* GamepadProvideriCade.h */, + 5DAE00082DA5F10000AE0008 /* GamepadProviderSDL2.cpp */, + 5DAE000A2DA5F10000AE000A /* GamepadSDL2.cpp */, 5D9F6FCD28A8EFB600D3F15D /* GamepadProviderIOS.h */, 5D9F6FCF28A8EFB700D3F15D /* GamepadProviderIOS.mm */, 5D9F6FD428A8EFB700D3F15D /* GamepadProviderIOSNative.h */, @@ -1650,6 +1656,8 @@ 5D9F6E9628A8EB4A00D3F15D /* jdmerge.c in Sources */, 5D51077E0FDF98DC0059E991 /* TyperComponent.cpp in Sources */, 5D9F6FE428A8EFB900D3F15D /* GamepadProvideriCade.cpp in Sources */, + 5DAE00072DA5F10000AE0007 /* GamepadProviderSDL2.cpp in Sources */, + 5DAE00092DA5F10000AE0009 /* GamepadSDL2.cpp in Sources */, 5D7B5EDF0FE60D0900A7338C /* vec4.cpp in Sources */, 5D667014101F00F500AC3407 /* ResourceManager.cpp in Sources */, 5D9F6FAC28A8EEE900D3F15D /* crctable.c in Sources */, From a57623ac378de5ef5ba6cbf7f6b58e8a73657942 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 19:48:16 -0300 Subject: [PATCH 065/106] Remove GamepadProviderSDL2/SDL2 from iOS Xcode project (they belong only in OSX/RTDink.xcodeproj) --- RTDink.xcodeproj/project.pbxproj | 8 -------- 1 file changed, 8 deletions(-) diff --git a/RTDink.xcodeproj/project.pbxproj b/RTDink.xcodeproj/project.pbxproj index 119b483..874f310 100644 --- a/RTDink.xcodeproj/project.pbxproj +++ b/RTDink.xcodeproj/project.pbxproj @@ -230,8 +230,6 @@ 5D9F6FE228A8EFB900D3F15D /* GamepadManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D9F6FD928A8EFB800D3F15D /* GamepadManager.cpp */; }; 5D9F6FE328A8EFB900D3F15D /* GamepadProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D9F6FDB28A8EFB800D3F15D /* GamepadProvider.cpp */; }; 5D9F6FE428A8EFB900D3F15D /* GamepadProvideriCade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D9F6FDC28A8EFB800D3F15D /* GamepadProvideriCade.cpp */; }; - 5DAE00072DA5F10000AE0007 /* GamepadProviderSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE00082DA5F10000AE0008 /* GamepadProviderSDL2.cpp */; }; - 5DAE00092DA5F10000AE0009 /* GamepadSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE000A2DA5F10000AE000A /* GamepadSDL2.cpp */; }; 5D9F6FE628A8F01800D3F15D /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D9F6FE528A8F01800D3F15D /* GameController.framework */; }; 5DA1FCF70F01EEFD001E9C1B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DA1FCF60F01EEFD001E9C1B /* AudioToolbox.framework */; }; 5DA1FD030F01EF07001E9C1B /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DA1FD020F01EF07001E9C1B /* CoreAudio.framework */; }; @@ -638,8 +636,6 @@ 5D9F6FDA28A8EFB800D3F15D /* GamepadiCade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadiCade.h; path = Gamepad/GamepadiCade.h; sourceTree = ""; }; 5D9F6FDB28A8EFB800D3F15D /* GamepadProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvider.cpp; path = Gamepad/GamepadProvider.cpp; sourceTree = ""; }; 5D9F6FDC28A8EFB800D3F15D /* GamepadProvideriCade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvideriCade.cpp; path = Gamepad/GamepadProvideriCade.cpp; sourceTree = ""; }; - 5DAE00082DA5F10000AE0008 /* GamepadProviderSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProviderSDL2.cpp; path = Gamepad/GamepadProviderSDL2.cpp; sourceTree = ""; }; - 5DAE000A2DA5F10000AE000A /* GamepadSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadSDL2.cpp; path = Gamepad/GamepadSDL2.cpp; sourceTree = ""; }; 5D9F6FE528A8F01800D3F15D /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; 5DA1FCF60F01EEFD001E9C1B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 5DA1FD020F01EF07001E9C1B /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; @@ -945,8 +941,6 @@ 5D9F6FD228A8EFB700D3F15D /* GamepadProvider.h */, 5D9F6FDC28A8EFB800D3F15D /* GamepadProvideriCade.cpp */, 5D9F6FD828A8EFB800D3F15D /* GamepadProvideriCade.h */, - 5DAE00082DA5F10000AE0008 /* GamepadProviderSDL2.cpp */, - 5DAE000A2DA5F10000AE000A /* GamepadSDL2.cpp */, 5D9F6FCD28A8EFB600D3F15D /* GamepadProviderIOS.h */, 5D9F6FCF28A8EFB700D3F15D /* GamepadProviderIOS.mm */, 5D9F6FD428A8EFB700D3F15D /* GamepadProviderIOSNative.h */, @@ -1656,8 +1650,6 @@ 5D9F6E9628A8EB4A00D3F15D /* jdmerge.c in Sources */, 5D51077E0FDF98DC0059E991 /* TyperComponent.cpp in Sources */, 5D9F6FE428A8EFB900D3F15D /* GamepadProvideriCade.cpp in Sources */, - 5DAE00072DA5F10000AE0007 /* GamepadProviderSDL2.cpp in Sources */, - 5DAE00092DA5F10000AE0009 /* GamepadSDL2.cpp in Sources */, 5D7B5EDF0FE60D0900A7338C /* vec4.cpp in Sources */, 5D667014101F00F500AC3407 /* ResourceManager.cpp in Sources */, 5D9F6FAC28A8EEE900D3F15D /* crctable.c in Sources */, From 6d54d9f56158f1537edc68562d7c9662bc736b34 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 19:49:59 -0300 Subject: [PATCH 066/106] Restore GamepadProviderSDL2/SDL2 to iOS project file navigator only (not compiled for iOS, only in OSX/RTDink.xcodeproj Sources) --- RTDink.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RTDink.xcodeproj/project.pbxproj b/RTDink.xcodeproj/project.pbxproj index 874f310..5036037 100644 --- a/RTDink.xcodeproj/project.pbxproj +++ b/RTDink.xcodeproj/project.pbxproj @@ -636,6 +636,8 @@ 5D9F6FDA28A8EFB800D3F15D /* GamepadiCade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadiCade.h; path = Gamepad/GamepadiCade.h; sourceTree = ""; }; 5D9F6FDB28A8EFB800D3F15D /* GamepadProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvider.cpp; path = Gamepad/GamepadProvider.cpp; sourceTree = ""; }; 5D9F6FDC28A8EFB800D3F15D /* GamepadProvideriCade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvideriCade.cpp; path = Gamepad/GamepadProvideriCade.cpp; sourceTree = ""; }; + 5DAE00082DA5F10000AE0008 /* GamepadProviderSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProviderSDL2.cpp; path = Gamepad/GamepadProviderSDL2.cpp; sourceTree = ""; }; + 5DAE000A2DA5F10000AE000A /* GamepadSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadSDL2.cpp; path = Gamepad/GamepadSDL2.cpp; sourceTree = ""; }; 5D9F6FE528A8F01800D3F15D /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; 5DA1FCF60F01EEFD001E9C1B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 5DA1FD020F01EF07001E9C1B /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; @@ -941,6 +943,8 @@ 5D9F6FD228A8EFB700D3F15D /* GamepadProvider.h */, 5D9F6FDC28A8EFB800D3F15D /* GamepadProvideriCade.cpp */, 5D9F6FD828A8EFB800D3F15D /* GamepadProvideriCade.h */, + 5DAE00082DA5F10000AE0008 /* GamepadProviderSDL2.cpp */, + 5DAE000A2DA5F10000AE000A /* GamepadSDL2.cpp */, 5D9F6FCD28A8EFB600D3F15D /* GamepadProviderIOS.h */, 5D9F6FCF28A8EFB700D3F15D /* GamepadProviderIOS.mm */, 5D9F6FD428A8EFB700D3F15D /* GamepadProviderIOSNative.h */, From dc713746aacaf94e830e5b34691498fdb9d88e93 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 20:11:12 -0300 Subject: [PATCH 067/106] Fix duplicate SDL event polling: remove SDL_InitSubSystem and SDL_PollEvent from App.cpp, GamepadProviderSDL2 handles both --- source/App.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index afce9ee..30520ea 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -664,10 +664,7 @@ bool App::Init() #endif #if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) -#ifdef PLATFORM_OSX - SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER); -#endif - GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); +GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); #endif if (GetVar("check_icade")->GetUINT32() != 0) @@ -938,21 +935,7 @@ void App::Update() BaseApp::Update(); m_adManager.Update(); -#ifdef PLATFORM_OSX - // macOS uses Cocoa event loop, not SDL2Main, so poll SDL joystick events - // and fire the signal that GamepadProviderSDL2 listens to. - { - SDL_Event ev; - while (SDL_PollEvent(&ev)) - { - VariantList v; - v.Get(0).Set((Entity*)&ev); //hack: cast to Entity* to pass pointer, receiver casts back to SDL_Event* - g_sig_SDLEvent(&v); - } - } -#endif - - g_gamepadManager.Update(); +g_gamepadManager.Update(); if (!m_bDidPostInit) { From efe1c6c3f8bdcae67e48720091ec76661e682d1d Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 20:27:53 -0300 Subject: [PATCH 068/106] Restore SDL_InitSubSystem and SDL_PollEvent in App.cpp for macOS (upstream GamepadProviderSDL2 has empty Update, needs App.cpp to drive events) --- source/App.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/App.cpp b/source/App.cpp index 30520ea..261c42c 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -664,6 +664,10 @@ bool App::Init() #endif #if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#ifdef PLATFORM_OSX +if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) != 0) + LogMsg("SDL joystick init failed: %s", SDL_GetError()); +#endif GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); #endif @@ -933,7 +937,19 @@ void App::AddDroidKeyboardKeys() void App::Update() { BaseApp::Update(); - m_adManager.Update(); +m_adManager.Update(); + +#ifdef PLATFORM_OSX +{ + SDL_Event ev; + while (SDL_PollEvent(&ev)) + { + VariantList v; + v.Get(0).Set((Entity*)&ev); + g_sig_SDLEvent(&v); + } +} +#endif g_gamepadManager.Update(); From e5f85af96547b78b4dadc2f72ddde32fc78183fa Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 20:29:16 -0300 Subject: [PATCH 069/106] Fix indentation in App::Update --- source/App.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/App.cpp b/source/App.cpp index 261c42c..dbf26be 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -937,7 +937,7 @@ void App::AddDroidKeyboardKeys() void App::Update() { BaseApp::Update(); -m_adManager.Update(); + m_adManager.Update(); #ifdef PLATFORM_OSX { From 84c30a731d84eca372d55e0702a44c5491670caa Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 20:36:00 -0300 Subject: [PATCH 070/106] Separate Linux-only SDL window guards from macOS: GetSDLWindow/UpdateViewport/OnFullscreenToggle are Linux-only, gamepad provider guard keeps PLATFORM_OSX --- source/App.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index dbf26be..640cd3f 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -205,7 +205,7 @@ const char * GetAppName() return "Dink Smallwood HD"; }; -#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) #include @@ -270,11 +270,11 @@ void OnFullscreenToggleRequestMultiplatform() { UpdateViewport(width, height); } -#endif // RTLINUX || PLATFORM_LINUX || PLATFORM_OSX +#endif // RTLINUX || PLATFORM_LINUX void App::OnFullscreenToggleRequest() { -#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) OnFullscreenToggleRequestMultiplatform(); #else BaseApp::OnFullscreenToggleRequest(); @@ -670,7 +670,6 @@ if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) != 0) #endif GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); #endif - if (GetVar("check_icade")->GetUINT32() != 0) { AddIcadeProvider(); @@ -1062,7 +1061,7 @@ void App::OnScreenSizeChange() BaseApp::OnScreenSizeChange(); if (GetPrimaryGLX() != 0) { -#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) UpdateViewport(GetPrimaryGLX(), GetPrimaryGLY()); #endif SetupOrtho(); From 40763412f0f496369b75e6bde93bda92aa67e31b Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 20:39:59 -0300 Subject: [PATCH 071/106] Fix compile error: OnFullscreenToggleRequestMultiplatform is Linux-only, use BaseApp::OnFullscreenToggleRequest on macOS --- source/App.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 640cd3f..c8c3463 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -827,12 +827,16 @@ GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); g_script_debug_mode = true; } - if (fullscreen) - { - LogMsg("Setting fullscreen..."); - g_bIsFullScreen = false; //because we're using toggle.. - OnFullscreenToggleRequestMultiplatform(); - } +if (fullscreen) +{ +LogMsg("Setting fullscreen..."); +g_bIsFullScreen = false; //because we're using toggle.. +#if defined(RTLINUX) || defined(PLATFORM_LINUX) +OnFullscreenToggleRequestMultiplatform(); +#else +BaseApp::OnFullscreenToggleRequest(); +#endif +} #endif From ef6b3c06f9d9b612b15d424b838fbffba03bb1ed Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 20:45:13 -0300 Subject: [PATCH 072/106] Fix linker error: add macOS stub for OnFullscreenToggleRequestMultiplatform() used by dink.cpp --- source/App.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index c8c3463..48162af 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -272,9 +272,16 @@ void OnFullscreenToggleRequestMultiplatform() { #endif // RTLINUX || PLATFORM_LINUX +#ifdef PLATFORM_OSX +void OnFullscreenToggleRequestMultiplatform() +{ + BaseApp::OnFullscreenToggleRequest(); +} +#endif + void App::OnFullscreenToggleRequest() { -#if defined(RTLINUX) || defined(PLATFORM_LINUX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) OnFullscreenToggleRequestMultiplatform(); #else BaseApp::OnFullscreenToggleRequest(); @@ -831,11 +838,7 @@ if (fullscreen) { LogMsg("Setting fullscreen..."); g_bIsFullScreen = false; //because we're using toggle.. -#if defined(RTLINUX) || defined(PLATFORM_LINUX) OnFullscreenToggleRequestMultiplatform(); -#else -BaseApp::OnFullscreenToggleRequest(); -#endif } #endif From 74e46a63aac5653f345d7a5dffec4dbf3db677b5 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 20:46:14 -0300 Subject: [PATCH 073/106] Fix indentation in fullscreen block --- source/App.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 48162af..efe450e 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -835,10 +835,9 @@ GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); } if (fullscreen) -{ -LogMsg("Setting fullscreen..."); -g_bIsFullScreen = false; //because we're using toggle.. -OnFullscreenToggleRequestMultiplatform(); +{LogMsg("Setting fullscreen..."); + g_bIsFullScreen = false; //because we're using toggle.. + OnFullscreenToggleRequestMultiplatform(); } #endif From 966ecf4cff303fef811d22ab86bcd4dc039a30b3 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 20:51:49 -0300 Subject: [PATCH 074/106] Fix: extend SDL window/fullscreen block to PLATFORM_OSX, remove duplicate macOS stub --- source/App.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index efe450e..8ec2501 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -205,7 +205,7 @@ const char * GetAppName() return "Dink Smallwood HD"; }; -#if defined(RTLINUX) || defined(PLATFORM_LINUX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) #include @@ -270,14 +270,7 @@ void OnFullscreenToggleRequestMultiplatform() { UpdateViewport(width, height); } -#endif // RTLINUX || PLATFORM_LINUX - -#ifdef PLATFORM_OSX -void OnFullscreenToggleRequestMultiplatform() -{ - BaseApp::OnFullscreenToggleRequest(); -} -#endif +#endif // RTLINUX || PLATFORM_LINUX || PLATFORM_OSX void App::OnFullscreenToggleRequest() { From 841578ac43dab30df6fb7caa4ac9e92fbbd2dc33 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 21:26:24 -0300 Subject: [PATCH 075/106] Fix indentation --- source/App.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 8ec2501..6837e9c 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -827,11 +827,12 @@ GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); g_script_debug_mode = true; } -if (fullscreen) -{LogMsg("Setting fullscreen..."); - g_bIsFullScreen = false; //because we're using toggle.. - OnFullscreenToggleRequestMultiplatform(); -} + if (fullscreen) + { + LogMsg("Setting fullscreen..."); + g_bIsFullScreen = false; //because we're using toggle.. + OnFullscreenToggleRequestMultiplatform(); + } #endif @@ -949,7 +950,7 @@ void App::Update() } #endif -g_gamepadManager.Update(); + g_gamepadManager.Update(); if (!m_bDidPostInit) { From be2f60040b2d3b4db86551d2fcb2f1e9b18754c5 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 21:34:22 -0300 Subject: [PATCH 076/106] Remove SDL_InitSubSystem from App.cpp: GamepadProviderSDL2::Init() handles it --- source/App.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 6837e9c..75f403c 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -664,10 +664,6 @@ bool App::Init() #endif #if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) -#ifdef PLATFORM_OSX -if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) != 0) - LogMsg("SDL joystick init failed: %s", SDL_GetError()); -#endif GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); #endif if (GetVar("check_icade")->GetUINT32() != 0) From 182e529d51d968afcb970e48904ab277fbd67508 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 23:10:26 -0300 Subject: [PATCH 077/106] INSTALL.md: add duplicate symbols fix tip for MacInCloud users --- INSTALL.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 5f04dc2..548faba 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -154,6 +154,12 @@ open RTDink/OSX/RTDink.xcodeproj 4. Select the **Release** configuration and build (`⌘B`). +> **If you get "duplicate symbols" linker errors**, delete the stale build cache: +> ```bash +> rm -rf ~/Library/Developer/Xcode/DerivedData/RTDink-* +> ``` +> Then rebuild. + > **Audio:** The macOS build uses SDL2_mixer for audio (same as Linux) — no FMOD required. --- From 086296a2ac19f00f98f1e0c36b282feddfe89a3b Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 4 Mar 2026 23:59:11 -0300 Subject: [PATCH 078/106] Fix OSX build: restore SDL files, define g_sig_SDLEvent in App.cpp for Cocoa build --- OSX/RTDink.xcodeproj/project.pbxproj | 10 ++++++---- source/App.cpp | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index e53f496..824c062 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -29,7 +29,8 @@ AA000004000000000000AA01 /* AudioManagerSDL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000003000000000000AA01 /* AudioManagerSDL.cpp */; }; AA000005000000000000AA01 /* GamepadProviderSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000006000000000000AA01 /* GamepadProviderSDL2.cpp */; }; AA000007000000000000AA01 /* GamepadSDL2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000008000000000000AA01 /* GamepadSDL2.cpp */; }; - AA000009000000000000AA01 /* SDL2Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000010000000000000AA01 /* SDL2Main.cpp */; }; + + 5D21BA051FA6C3DD00B12CB3 /* AdProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21BA021FA6C3DD00B12CB3 /* AdProvider.cpp */; }; AA000001000000000000AA01 /* EmulatedPointerComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA01 /* EmulatedPointerComponent.cpp */; }; AA000001000000000000AA06 /* TouchDragComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA000002000000000000AA06 /* TouchDragComponent.cpp */; }; @@ -295,7 +296,8 @@ 5D21BA0F1FA6C6EE00B12CB3 /* GamepadProvideriCade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProvideriCade.cpp; path = ../../shared/Gamepad/GamepadProvideriCade.cpp; sourceTree = ""; }; AA000006000000000000AA01 /* GamepadProviderSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadProviderSDL2.cpp; path = ../../shared/Gamepad/GamepadProviderSDL2.cpp; sourceTree = ""; }; AA000008000000000000AA01 /* GamepadSDL2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GamepadSDL2.cpp; path = ../../shared/Gamepad/GamepadSDL2.cpp; sourceTree = ""; }; - AA000010000000000000AA01 /* SDL2Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SDL2Main.cpp; path = ../../shared/SDL/SDL2Main.cpp; sourceTree = ""; }; + + 5D21BA101FA6C6EE00B12CB3 /* GamepadProvideriCade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadProvideriCade.h; path = ../../shared/Gamepad/GamepadProvideriCade.h; sourceTree = ""; }; 5D21BA131FA6C76500B12CB3 /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatadst.c; path = ../../../shared/Irrlicht/source/Irrlicht/jpeglib/jdatadst.c; sourceTree = ""; }; 5D21BA141FA6C76500B12CB3 /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatasrc.c; path = ../../../shared/Irrlicht/source/Irrlicht/jpeglib/jdatasrc.c; sourceTree = ""; }; @@ -1482,14 +1484,14 @@ 5D21BA111FA6C6EE00B12CB3 /* GamepadProvideriCade.cpp in Sources */, AA000005000000000000AA01 /* GamepadProviderSDL2.cpp in Sources */, AA000007000000000000AA01 /* GamepadSDL2.cpp in Sources */, - AA000009000000000000AA01 /* SDL2Main.cpp in Sources */, + AA000004000000000000AA01 /* AudioManagerSDL.cpp in Sources */, + 5D70C0D812B72BE700A1AB17 /* TextBoxRenderComponent.cpp in Sources */, 5D21B9EB1FA6C31D00B12CB3 /* pngset.c in Sources */, 5D70C0D912B72BE700A1AB17 /* HTTPComponent.cpp in Sources */, 5D70C0DA12B72BE700A1AB17 /* TyperComponent.cpp in Sources */, 5D70C0DB12B72BE700A1AB17 /* ProgressBarComponent.cpp in Sources */, 5D70C0DC12B72BE700A1AB17 /* TapSequenceDetectComponent.cpp in Sources */, - AA000004000000000000AA01 /* AudioManagerSDL.cpp in Sources */, 5D21B9F11FA6C31D00B12CB3 /* pngrtran.c in Sources */, 5D70C0DD12B72BE700A1AB17 /* UnderlineRenderComponent.cpp in Sources */, 5D70C0DE12B72BE700A1AB17 /* FocusInputComponent.cpp in Sources */, diff --git a/source/App.cpp b/source/App.cpp index 75f403c..6e2af06 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -97,8 +97,9 @@ GamepadManager * GetGamepadManager() {return &g_gamepadManager;} #include AudioManagerSDL g_audioManager; -// Define the SDL event signal used by GamepadProviderSDL2 on macOS -boost::signals2::signal g_sig_SDLEvent; + // g_sig_SDLEvent is defined in SDL2Main.cpp for SDL-main builds (Linux/Win). + // For the OSX Cocoa build which doesn't use SDL2Main.cpp, define it here. + boost::signals2::signal g_sig_SDLEvent; //in theory, CocosDenshion should work for the Mac builds, but right now it seems to want a big chunk of //Cocos2d included so I'm not fiddling with it for now From 3ec267fda69240b50e58deb02e38c163d23ba068 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Thu, 5 Mar 2026 10:04:27 -0300 Subject: [PATCH 079/106] Update INSTALL.md: fix macOS build instructions --- INSTALL.md | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 548faba..2624384 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -97,22 +97,23 @@ proton/ The macOS build uses the Xcode project at `OSX/RTDink.xcodeproj`. - **Supported architecture:** Apple Silicon (ARM64 / M1+). Intel (x86_64) is not currently supported. -- **Audio:** Uses **SDL2_mixer** (same as Linux) — no proprietary dependencies required. +- **Audio:** Uses **SDL2** + **SDL2_mixer** — no FMOD required. ### Directory layout -Clone both repos as **siblings** (not RTDink inside proton): +Clone both repos as **siblings**: ``` some_folder/ proton/ <-- Proton SDK (cloned here) shared/ - RTSimpleApp/ RTDink/ <-- this repo (cloned here) OSX/ RTDink.xcodeproj ``` +The Xcode project references `../../shared/` (relative to `OSX/`) to find the Proton SDK. + ### Steps 1. Clone the Proton SDK and this repo as siblings: @@ -122,45 +123,28 @@ git clone https://github.com/SethRobinson/proton.git git clone https://github.com/SethRobinson/RTDink.git ``` -2. Install **SDL2** and **SDL2_mixer**: +2. Install **SDL2** and **SDL2_mixer** via Homebrew: - **Option A — Homebrew** (if you have admin access): - ```bash - brew install sdl2 sdl2_mixer - ``` +```bash +brew install sdl2 sdl2_mixer +``` - **Option B — No admin access** (e.g. MacInCloud or shared machines): - ```bash - # SDL2 framework - curl -L -o ~/SDL2.dmg "https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.dmg" - hdiutil attach ~/SDL2.dmg - mkdir -p ~/Library/Frameworks - cp -r /Volumes/SDL2/SDL2.framework ~/Library/Frameworks/ - hdiutil detach /Volumes/SDL2 +3. Generate the required libpng config header: - # SDL2_mixer framework - curl -L -o ~/SDL2_mixer.dmg "https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0.dmg" - hdiutil attach ~/SDL2_mixer.dmg - cp -r "/Volumes/SDL2_mixer/SDL2_mixer.framework" ~/Library/Frameworks/ - hdiutil detach /Volumes/SDL2_mixer - ``` - The Xcode project looks for both frameworks in `~/Library/Frameworks/` automatically — no admin or Homebrew required. +```bash +LIBPNG=proton/shared/Irrlicht/source/Irrlicht/libpng +cp "$LIBPNG/pnglibconf.h.prebuilt" "$LIBPNG/pnglibconf.h" +``` -3. Open the Xcode project: +4. Open the Xcode project: ```bash open RTDink/OSX/RTDink.xcodeproj ``` -4. Select the **Release** configuration and build (`⌘B`). - -> **If you get "duplicate symbols" linker errors**, delete the stale build cache: -> ```bash -> rm -rf ~/Library/Developer/Xcode/DerivedData/RTDink-* -> ``` -> Then rebuild. +5. Select the **Release** configuration and build (`⌘B`). -> **Audio:** The macOS build uses SDL2_mixer for audio (same as Linux) — no FMOD required. +> **Note:** The Xcode project's build settings already include Homebrew's SDL2 library paths (`/opt/homebrew/lib`, `/usr/local/lib`). No manual path configuration is needed. --- From 1b8e565671fa29255e4e2cc103e6f57c32e7cdf3 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Thu, 5 Mar 2026 10:05:27 -0300 Subject: [PATCH 080/106] Restore Option B (no admin) SDL2 install instructions in macOS section --- INSTALL.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 2624384..dec2d81 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -123,11 +123,29 @@ git clone https://github.com/SethRobinson/proton.git git clone https://github.com/SethRobinson/RTDink.git ``` -2. Install **SDL2** and **SDL2_mixer** via Homebrew: - -```bash -brew install sdl2 sdl2_mixer -``` +2. Install **SDL2** and **SDL2_mixer**: + + **Option A — Homebrew** (recommended): + ```bash + brew install sdl2 sdl2_mixer + ``` + + **Option B — No admin access** (e.g. MacInCloud or shared machines): + ```bash + # SDL2 framework + curl -L -o ~/SDL2.dmg "https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.dmg" + hdiutil attach ~/SDL2.dmg + mkdir -p ~/Library/Frameworks + cp -r /Volumes/SDL2/SDL2.framework ~/Library/Frameworks/ + hdiutil detach /Volumes/SDL2 + + # SDL2_mixer framework + curl -L -o ~/SDL2_mixer.dmg "https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0.dmg" + hdiutil attach ~/SDL2_mixer.dmg + cp -r "/Volumes/SDL2_mixer/SDL2_mixer.framework" ~/Library/Frameworks/ + hdiutil detach /Volumes/SDL2_mixer + ``` + The Xcode project looks for both frameworks in `~/Library/Frameworks/` automatically — no admin or Homebrew required. 3. Generate the required libpng config header: From a95b8999b5f6d5dcfc4699d6d8eadc0e69c144e9 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Thu, 5 Mar 2026 15:04:22 -0300 Subject: [PATCH 081/106] Ops --- source/App.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/App.cpp b/source/App.cpp index 6e2af06..8a12694 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -1058,7 +1058,7 @@ void App::OnScreenSizeChange() BaseApp::OnScreenSizeChange(); if (GetPrimaryGLX() != 0) { -#if defined(RTLINUX) || defined(PLATFORM_LINUX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) UpdateViewport(GetPrimaryGLX(), GetPrimaryGLY()); #endif SetupOrtho(); @@ -1559,3 +1559,4 @@ bool TouchesHaveBeenReceived() #endif return false; } + From 773e66f28c20c2c9b3a8208ab6f261120d02f135 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Thu, 5 Mar 2026 21:29:42 -0300 Subject: [PATCH 082/106] Update INSTALL.md: universal binary, SDL2 framework install instructions --- INSTALL.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index dec2d81..fb905f1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,7 +10,7 @@ See [README.md](README.md) for download links if you just want to play the game. | **Linux** | CMake | Proton SDK cloned inside project, uses SDL2 + SDL2_mixer for audio | | **iOS** | Xcode | Proton SDK sibling layout, uses FMOD for audio | | **Android** | Gradle + CMake | Proton SDK sibling layout, uses FMOD for audio | -| **macOS** | Xcode | Apple Silicon (ARM64), uses SDL2_mixer for audio (see [macOS section](#macos)) | +| **macOS** | Xcode | Universal binary (Intel + Apple Silicon), uses SDL2 + SDL2_mixer for audio (see [macOS section](#macos)) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | All platforms require the **Dink Smallwood game data** (`dink/` directory) to play. See [README.md](README.md#just-want-to-play) for how to obtain it. @@ -96,8 +96,9 @@ proton/ The macOS build uses the Xcode project at `OSX/RTDink.xcodeproj`. -- **Supported architecture:** Apple Silicon (ARM64 / M1+). Intel (x86_64) is not currently supported. +- **Supported architectures:** Universal binary — runs natively on both **Intel (x86_64)** and **Apple Silicon (ARM64 / M1+)**. - **Audio:** Uses **SDL2** + **SDL2_mixer** — no FMOD required. +- **SDL2 frameworks are bundled inside the `.app`** — no SDL2 installation required to run the game. ### Directory layout @@ -123,14 +124,9 @@ git clone https://github.com/SethRobinson/proton.git git clone https://github.com/SethRobinson/RTDink.git ``` -2. Install **SDL2** and **SDL2_mixer**: +2. Install **SDL2** and **SDL2_mixer** frameworks: - **Option A — Homebrew** (recommended): - ```bash - brew install sdl2 sdl2_mixer - ``` - - **Option B — No admin access** (e.g. MacInCloud or shared machines): + **Option A — DMG frameworks** (recommended, works on all Macs, required for universal binary): ```bash # SDL2 framework curl -L -o ~/SDL2.dmg "https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.dmg" @@ -145,7 +141,13 @@ git clone https://github.com/SethRobinson/RTDink.git cp -r "/Volumes/SDL2_mixer/SDL2_mixer.framework" ~/Library/Frameworks/ hdiutil detach /Volumes/SDL2_mixer ``` - The Xcode project looks for both frameworks in `~/Library/Frameworks/` automatically — no admin or Homebrew required. + The Xcode project looks for both frameworks in `~/Library/Frameworks/` automatically. These are universal frameworks (arm64 + x86_64) so the resulting `.app` runs on both Intel and Apple Silicon Macs. + + **Option B — Homebrew** (native arch only, not suitable for universal binary): + ```bash + brew install sdl2 sdl2_mixer + ``` + > **Note:** Homebrew on Apple Silicon only provides arm64 libraries. Use Option A if you need a universal binary. 3. Generate the required libpng config header: @@ -162,7 +164,7 @@ open RTDink/OSX/RTDink.xcodeproj 5. Select the **Release** configuration and build (`⌘B`). -> **Note:** The Xcode project's build settings already include Homebrew's SDL2 library paths (`/opt/homebrew/lib`, `/usr/local/lib`). No manual path configuration is needed. +> **Note:** The SDL2 frameworks are automatically embedded into the `.app` bundle at build time, so the final app is self-contained and does not require SDL2 to be installed on the target machine. --- From 28b3f94583a8b89c934c6b5944fa08961ed2ae46 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Thu, 5 Mar 2026 21:30:41 -0300 Subject: [PATCH 083/106] Update README: macOS is now universal binary (Intel + Apple Silicon) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0549704..088e12c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ RTDink can be built for multiple platforms. Each uses the [Proton SDK](https://g |----------|-------------|-------------| | **Windows** | Visual Studio 2017+ | See [detailed Windows instructions](#windows) below | | **Linux** | CMake + SDL2 | `git clone ... && ./linux_setup.sh` ([details](INSTALL.md#linux)) | -| **macOS** | Xcode | Apple Silicon (ARM64), uses SDL2_mixer for audio -- see [INSTALL.md](INSTALL.md#macos) | +| **macOS** | Xcode | Universal binary (Intel + Apple Silicon), uses SDL2 + SDL2_mixer -- see [INSTALL.md](INSTALL.md#macos) | | **HTML5** | Emscripten | See [Proton HTML5 setup](https://www.rtsoft.com/wiki/doku.php?id=proton:html5_setup) | | **iOS** | Xcode | Proton SDK sibling layout, open `RTDink.xcodeproj` ([more info](INSTALL.md#ios)) | | **Android** | Gradle + CMake | Proton SDK sibling layout, open `AndroidGradle/` in Android Studio ([more info](INSTALL.md#android)) | From e83e2bb613eb047db09148112949007ad475e29f Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 6 Mar 2026 10:28:11 -0300 Subject: [PATCH 084/106] macOS: bring all App.cpp fixes from test_mac_arm64 - SDL event pumping: use SDL_PumpEvents + SDL_PeepEvents (joystick range only) on PLATFORM_OSX instead of SDL_PollEvent; Linux keeps full poll. - Fullscreen: call OSXToggleFullscreen() (Cocoa native, in OSXUtils.mm) instead of SDL window toggle which doesn't exist on Cocoa builds. - SDL window functions (GetSDLWindow, UpdateViewport, OnFullscreenToggleRequestMultiplatform) restricted to Linux only. - SDL_Init(0) added before GamepadProviderSDL2 on PLATFORM_OSX. - Game data path: check inside bundle first, fall back to .app parent dir. - AddTextToLog: create save dir if missing, don't crash on fopen failure. - Include OSX/OSXUtils.h explicitly for OSXToggleFullscreen declaration. - g_sig_SDLEvent defined in App.cpp for Cocoa builds (no SDL2Main.cpp). --- source/App.cpp | 87 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 79 insertions(+), 8 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 8a12694..05e486d 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -46,6 +46,7 @@ void AddText(const char *tex, const char *filename); #endif #ifdef PLATFORM_OSX +#include "OSX/OSXUtils.h" bool g_bIsFullScreen = false; #else extern bool g_bIsFullScreen; @@ -101,6 +102,42 @@ GamepadManager * GetGamepadManager() {return &g_gamepadManager;} // For the OSX Cocoa build which doesn't use SDL2Main.cpp, define it here. boost::signals2::signal g_sig_SDLEvent; +// Returns the path containing dink/ game data. +// Checks inside the bundle first, then falls back to the folder next to the .app +// so users can place GOG/Steam data alongside the app without modifying the bundle. +#include +#include +static string GetGameDataPath() +{ + string bundlePath = GetBaseAppPath(); + + struct stat st; + if (stat((bundlePath + "dink").c_str(), &st) == 0 && S_ISDIR(st.st_mode)) + { + LogMsg("Game data found in bundle: %s", bundlePath.c_str()); + return bundlePath; + } + + // Fall back to the directory containing the .app + CFBundleRef mainBundle = CFBundleGetMainBundle(); + CFURLRef bundleURL = CFBundleCopyBundleURL(mainBundle); + CFURLRef parentURL = CFURLCreateCopyDeletingLastPathComponent(NULL, bundleURL); + char parentPath[PATH_MAX]; + CFURLGetFileSystemRepresentation(parentURL, TRUE, (UInt8 *)parentPath, PATH_MAX); + CFRelease(bundleURL); + CFRelease(parentURL); + + string externalPath = string(parentPath) + "/"; + if (stat((externalPath + "dink").c_str(), &st) == 0 && S_ISDIR(st.st_mode)) + { + LogMsg("Game data found next to .app: %s", externalPath.c_str()); + return externalPath; + } + + LogMsg("Warning: dink/ not found in bundle or next to .app, defaulting to bundle path"); + return bundlePath; +} + //in theory, CocosDenshion should work for the Mac builds, but right now it seems to want a big chunk of //Cocos2d included so I'm not fiddling with it for now @@ -206,7 +243,7 @@ const char * GetAppName() return "Dink Smallwood HD"; }; -#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) #include @@ -271,12 +308,15 @@ void OnFullscreenToggleRequestMultiplatform() { UpdateViewport(width, height); } -#endif // RTLINUX || PLATFORM_LINUX || PLATFORM_OSX +#endif // RTLINUX || PLATFORM_LINUX void App::OnFullscreenToggleRequest() { -#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) OnFullscreenToggleRequestMultiplatform(); +#elif defined(PLATFORM_OSX) + // Implemented in OSXUtils.mm (Objective-C++ required for Cocoa calls) + OSXToggleFullscreen(); #else BaseApp::OnFullscreenToggleRequest(); #endif @@ -665,7 +705,14 @@ bool App::Init() #endif #if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) -GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); +{ + // On macOS Cocoa builds SDL video is not used, so we must call SDL_Init(0) + // before any SDL_InitSubSystem to satisfy SDL's internal state requirements. + #ifdef PLATFORM_OSX + SDL_Init(0); + #endif + GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); +} #endif if (GetVar("check_icade")->GetUINT32() != 0) { @@ -729,7 +776,11 @@ GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); GetAudioManager()->SetMidiMusicModVol(0.3f); GetAudioManager()->Preload("audio/click.wav"); +#ifdef PLATFORM_OSX + InitDinkPaths(GetGameDataPath(), "dink", ""); +#else InitDinkPaths(GetBaseAppPath(), "dink", ""); +#endif GetBaseApp()->m_sig_pre_enterbackground.connect(1, boost::bind(&App::OnPreEnterBackground, this, _1)); GetBaseApp()->m_sig_loadSurfaces.connect(1, boost::bind(&App::OnLoadSurfaces, this)); @@ -790,8 +841,8 @@ GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); */ } -#elif defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) - // Linux/macOS video settings +#elif defined(RTLINUX) || defined(PLATFORM_LINUX) + // Linux video settings int fullscreen = GetApp()->GetVarWithDefault("fullscreen", uint32(0))->GetUINT32(); if (DoesCommandLineParmExist("--help")) @@ -935,8 +986,9 @@ void App::Update() BaseApp::Update(); m_adManager.Update(); -#ifdef PLATFORM_OSX +#if defined(RTLINUX) || defined(PLATFORM_LINUX) { + // Linux: SDL owns the window, pump all events SDL_Event ev; while (SDL_PollEvent(&ev)) { @@ -945,6 +997,21 @@ void App::Update() g_sig_SDLEvent(&v); } } +#elif defined(PLATFORM_OSX) +{ + // macOS Cocoa: SDL does not own the window, but we still need to pump + // SDL joystick/gamepad events. SDL_PumpEvents() processes the SDL event + // queue without touching the Cocoa window or event loop. + SDL_PumpEvents(); + SDL_Event ev; + while (SDL_PeepEvents(&ev, 1, SDL_GETEVENT, + SDL_JOYAXISMOTION, SDL_CONTROLLERDEVICEREMAPPED) == 1) + { + VariantList v; + v.Get(0).Set((Entity*)&ev); + g_sig_SDLEvent(&v); + } +} #endif g_gamepadManager.Update(); @@ -1058,7 +1125,7 @@ void App::OnScreenSizeChange() BaseApp::OnScreenSizeChange(); if (GetPrimaryGLX() != 0) { -#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) UpdateViewport(GetPrimaryGLX(), GetPrimaryGLY()); #endif SetupOrtho(); @@ -1336,7 +1403,11 @@ void ImportSaveState(string physicalFname) SlideScreen(pNewMenu, false); GetMessageManager()->CallEntityFunction(pNewMenu, 500, "OnDelete", NULL); +#ifdef PLATFORM_OSX + InitDinkPaths(GetGameDataPath(), "dink", RemoveTrailingBackslash(newDMODDir)); +#else InitDinkPaths(GetBaseAppPath(), "dink", RemoveTrailingBackslash(newDMODDir)); +#endif GameCreate(pNewMenu->GetParent(), 0, physicalFname); GetBaseApp()->SetGameTickPause(false); } From 078f41ce53221266f7cd76f5a4621c4f8408de29 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 6 Mar 2026 10:29:53 -0300 Subject: [PATCH 085/106] ci: add workflow to auto-sync master from test_mac_arm64 (no .github) --- .github/workflows/sync-master.yml | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/sync-master.yml diff --git a/.github/workflows/sync-master.yml b/.github/workflows/sync-master.yml new file mode 100644 index 0000000..c3e37cc --- /dev/null +++ b/.github/workflows/sync-master.yml @@ -0,0 +1,37 @@ +name: Sync master (no workflow) + +on: + push: + branches: + - test_mac_arm64 + paths-ignore: + - '.github/**' + +jobs: + sync-master: + name: Sync changes to master (excluding .github) + runs-on: ubuntu-latest + steps: + - name: Checkout test_mac_arm64 + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Sync to master without .github + run: | + git checkout master + # Checkout every file from test_mac_arm64 except .github/ + git checkout test_mac_arm64 -- $(git ls-tree -r --name-only test_mac_arm64 | grep -v '^\.github') + # If nothing changed, exit cleanly + if git diff --cached --quiet; then + echo "master already up to date" + exit 0 + fi + git commit -m "chore: sync master from test_mac_arm64 [skip ci]" + git push origin master From 51ffaa32ee2fecf961a32e06273968e2816cd28a Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 6 Mar 2026 10:30:30 -0300 Subject: [PATCH 086/106] chore: remove .github from master (workflows only in test_mac_arm64) --- .github/workflows/sync-master.yml | 37 ------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .github/workflows/sync-master.yml diff --git a/.github/workflows/sync-master.yml b/.github/workflows/sync-master.yml deleted file mode 100644 index c3e37cc..0000000 --- a/.github/workflows/sync-master.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Sync master (no workflow) - -on: - push: - branches: - - test_mac_arm64 - paths-ignore: - - '.github/**' - -jobs: - sync-master: - name: Sync changes to master (excluding .github) - runs-on: ubuntu-latest - steps: - - name: Checkout test_mac_arm64 - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Configure git - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - name: Sync to master without .github - run: | - git checkout master - # Checkout every file from test_mac_arm64 except .github/ - git checkout test_mac_arm64 -- $(git ls-tree -r --name-only test_mac_arm64 | grep -v '^\.github') - # If nothing changed, exit cleanly - if git diff --cached --quiet; then - echo "master already up to date" - exit 0 - fi - git commit -m "chore: sync master from test_mac_arm64 [skip ci]" - git push origin master From 1c32113d66fb887eb98cb47fd9943fd9557c1bff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 13:38:05 +0000 Subject: [PATCH 087/106] chore: sync master from test_mac_arm64 [skip ci] --- source/App.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 05e486d..7b0f603 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -46,8 +46,9 @@ void AddText(const char *tex, const char *filename); #endif #ifdef PLATFORM_OSX -#include "OSX/OSXUtils.h" bool g_bIsFullScreen = false; +// Forward declaration - implemented in OSXUtils.mm (Objective-C++ required) +void OSXToggleFullscreen(); #else extern bool g_bIsFullScreen; #endif @@ -310,12 +311,22 @@ void OnFullscreenToggleRequestMultiplatform() { #endif // RTLINUX || PLATFORM_LINUX +#ifdef PLATFORM_OSX +// Forward declaration - implemented in OSXUtils.mm (Objective-C++ required) +void OSXToggleFullscreen(); + +// Called from dink.cpp on all desktop platforms - macOS delegates to OSXToggleFullscreen +void OnFullscreenToggleRequestMultiplatform() +{ + OSXToggleFullscreen(); +} +#endif + void App::OnFullscreenToggleRequest() { #if defined(RTLINUX) || defined(PLATFORM_LINUX) OnFullscreenToggleRequestMultiplatform(); #elif defined(PLATFORM_OSX) - // Implemented in OSXUtils.mm (Objective-C++ required for Cocoa calls) OSXToggleFullscreen(); #else BaseApp::OnFullscreenToggleRequest(); From 4b549e34f386b3fef8c03195ea434b9e90c561ef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 13:42:41 +0000 Subject: [PATCH 088/106] chore: sync master from test_mac_arm64 [skip ci] --- source/App.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 7b0f603..ce84252 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -47,8 +47,6 @@ void AddText(const char *tex, const char *filename); #ifdef PLATFORM_OSX bool g_bIsFullScreen = false; -// Forward declaration - implemented in OSXUtils.mm (Objective-C++ required) -void OSXToggleFullscreen(); #else extern bool g_bIsFullScreen; #endif @@ -266,12 +264,10 @@ void UpdateViewport(int width, int height) { glLoadIdentity(); if (windowAspect > gameAspect) { - // Window wider than game: add horizontal margins (letterbox) float scaledHeight = width / gameAspect; float offsetY = (scaledHeight - height) / 2.0f; glOrtho(0, width, height + offsetY, -offsetY, -1.0, 1.0); } else { - // Window taller than game: add vertical margins (pillarbox) float scaledWidth = height * gameAspect; float offsetX = (scaledWidth - width) / 2.0f; glOrtho(-offsetX, width + offsetX, height, 0, -1.0, 1.0); @@ -281,6 +277,7 @@ void UpdateViewport(int width, int height) { glLoadIdentity(); } +// Linux: SDL owns the window - use SDL fullscreen toggle void OnFullscreenToggleRequestMultiplatform() { SDL_Window* window = GetSDLWindow(); if (!window) return; @@ -309,18 +306,25 @@ void OnFullscreenToggleRequestMultiplatform() { UpdateViewport(width, height); } -#endif // RTLINUX || PLATFORM_LINUX +#elif defined(PLATFORM_OSX) -#ifdef PLATFORM_OSX -// Forward declaration - implemented in OSXUtils.mm (Objective-C++ required) +// macOS: Cocoa owns the window - implemented in OSXUtils.mm (Objective-C++ required) void OSXToggleFullscreen(); -// Called from dink.cpp on all desktop platforms - macOS delegates to OSXToggleFullscreen -void OnFullscreenToggleRequestMultiplatform() -{ +// dink.cpp calls OnFullscreenToggleRequestMultiplatform() on all desktop platforms +void OnFullscreenToggleRequestMultiplatform() { OSXToggleFullscreen(); } -#endif + +#else + +// Windows and other platforms: BaseApp handles fullscreen via OS messages. +// dink.cpp calls this so we need a stub that routes correctly. +void OnFullscreenToggleRequestMultiplatform() { + if (GetApp()) GetApp()->OnFullscreenToggleRequest(); +} + +#endif // platform fullscreen void App::OnFullscreenToggleRequest() { From 1f4e691acde586dffe3e78de44fc9b704e741eeb Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 6 Mar 2026 10:31:47 -0300 Subject: [PATCH 089/106] macOS: forward-declare OSXToggleFullscreen instead of including OSXUtils.h The include path OSX/OSXUtils.h is fragile across different proton layouts in CI. A plain forward declaration is simpler and always works. --- source/App.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/App.cpp b/source/App.cpp index ce84252..f152b62 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -47,6 +47,8 @@ void AddText(const char *tex, const char *filename); #ifdef PLATFORM_OSX bool g_bIsFullScreen = false; +// Forward declaration - implemented in OSXUtils.mm (Objective-C++ required) +void OSXToggleFullscreen(); #else extern bool g_bIsFullScreen; #endif From cf5ceda28240cd81c2fe59b8a2a4554605c7d067 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 6 Mar 2026 11:20:57 -0300 Subject: [PATCH 090/106] multiplatform: fix OnFullscreenToggleRequestMultiplatform for all platforms --- source/App.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index f152b62..ce84252 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -47,8 +47,6 @@ void AddText(const char *tex, const char *filename); #ifdef PLATFORM_OSX bool g_bIsFullScreen = false; -// Forward declaration - implemented in OSXUtils.mm (Objective-C++ required) -void OSXToggleFullscreen(); #else extern bool g_bIsFullScreen; #endif From c54b98f8aba8c904c66a34ff2a6017b371becb41 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:14:10 +0000 Subject: [PATCH 091/106] chore: sync master from test_mac_arm64 [skip ci] --- source/App.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/source/App.cpp b/source/App.cpp index ce84252..bcd2f55 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -897,6 +897,39 @@ bool App::Init() OnFullscreenToggleRequestMultiplatform(); } +#elif defined(PLATFORM_OSX) +{ + // macOS video settings — read saved resolution and fullscreen preference + int videox = GetApp()->GetVarWithDefault("video_x", uint32(1024))->GetUINT32(); + int videoy = GetApp()->GetVarWithDefault("video_y", uint32(768))->GetUINT32(); + int fullscreen = GetApp()->GetVarWithDefault("fullscreen", uint32(0))->GetUINT32(); + + if (DoesCommandLineParmExist("-window") || DoesCommandLineParmExist("-windowed")) + { + fullscreen = false; + GetApp()->GetVar("fullscreen")->Set(uint32(0)); + } + if (DoesCommandLineParmExist("-skip")) + { + SetSkipMode(true); + } + if (DoesCommandLineParmExist("-debug")) + { + GetApp()->SetCheatsEnabled(true); + g_script_debug_mode = true; + } + + // Apply saved window size (sends MESSAGE_SET_VIDEO_MODE to MyOpenGLView) + SetVideoMode(videox, videoy, false, 0); + + if (fullscreen) + { + LogMsg("Setting fullscreen..."); + g_bIsFullScreen = false; //because we're using toggle.. + OnFullscreenToggleRequestMultiplatform(); + } +} + #endif return true; From 2db29bc32aec5e792d4a99b22a6ee26556ca47b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:30:16 +0000 Subject: [PATCH 092/106] chore: sync master from test_mac_arm64 [skip ci] --- INSTALL.md | 6 ++++-- source/App.cpp | 25 ++++++++++++------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index fb905f1..c2f0f08 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -120,10 +120,12 @@ The Xcode project references `../../shared/` (relative to `OSX/`) to find the Pr 1. Clone the Proton SDK and this repo as siblings: ```bash -git clone https://github.com/SethRobinson/proton.git -git clone https://github.com/SethRobinson/RTDink.git +git clone https://github.com/mateusbentes/proton.git +git clone https://github.com/mateusbentes/RTDink.git ``` + > **Note:** This fork uses a patched Proton SDK (`mateusbentes/proton`) that includes macOS-specific fixes for window creation, resolution handling, and the app lifecycle. The upstream `SethRobinson/proton` does not include these changes. + 2. Install **SDL2** and **SDL2_mixer** frameworks: **Option A — DMG frameworks** (recommended, works on all Macs, required for universal binary): diff --git a/source/App.cpp b/source/App.cpp index bcd2f55..a76a21a 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -1173,25 +1173,24 @@ void App::OnScreenSizeChange() BaseApp::OnScreenSizeChange(); if (GetPrimaryGLX() != 0) { -#if defined(RTLINUX) || defined(PLATFORM_LINUX) - UpdateViewport(GetPrimaryGLX(), GetPrimaryGLY()); +#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) + UpdateViewport(GetPrimaryGLX(), GetPrimaryGLY()); #endif - SetupOrtho(); - DinkOnForeground(); //rebuild lost surfaces - g_dglo.m_bForceControlsRebuild = true; - if (GetDinkGameState() != DINK_GAME_STATE_PLAYING) - { - PrepareForGL(); - } + SetupOrtho(); + DinkOnForeground(); //rebuild lost surfaces + g_dglo.m_bForceControlsRebuild = true; + if (GetDinkGameState() != DINK_GAME_STATE_PLAYING) + { + PrepareForGL(); + } } UpdateTitleBar(); -#ifdef WINAPI +#if defined(WINAPI) || defined(PLATFORM_OSX) GetApp()->GetVar("fullscreen")->Set(uint32(g_bIsFullScreen)); - GetApp()->GetVar("videox")->Set(uint32(GetPrimaryGLX())); - GetApp()->GetVar("videoy")->Set(uint32(GetPrimaryGLY())); - //GetApp()->GetVarWithDefault("borderless_fullscreen", uint32(g_bUseBorderlessFullscreenOnWindows))->Set(uint32(0)); + GetApp()->GetVar("video_x")->Set(uint32(GetPrimaryGLX())); + GetApp()->GetVar("video_y")->Set(uint32(GetPrimaryGLY())); #ifdef _DEBUG LogMsg("Got OnScreenSizeChange: Setting to %d, %d", uint32(GetPrimaryGLX()), uint32(GetPrimaryGLY())); #endif From de87e12af4cdb7a67fac255be445e0f909a988dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:31:53 +0000 Subject: [PATCH 093/106] chore: sync master from test_mac_arm64 [skip ci] --- INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index c2f0f08..9e5611a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -120,11 +120,11 @@ The Xcode project references `../../shared/` (relative to `OSX/`) to find the Pr 1. Clone the Proton SDK and this repo as siblings: ```bash -git clone https://github.com/mateusbentes/proton.git -git clone https://github.com/mateusbentes/RTDink.git +git clone https://github.com/SethRobinson/proton.git +git clone https://github.com/SethRobinson/RTDink.git ``` - > **Note:** This fork uses a patched Proton SDK (`mateusbentes/proton`) that includes macOS-specific fixes for window creation, resolution handling, and the app lifecycle. The upstream `SethRobinson/proton` does not include these changes. + > **Note (contributors):** If building from the `mateusbentes/RTDink` fork, use `https://github.com/mateusbentes/proton.git` instead of the upstream Proton SDK — it contains macOS-specific fixes for window creation, resolution handling, and the app lifecycle that have not yet been merged upstream. 2. Install **SDL2** and **SDL2_mixer** frameworks: From 61f7f918507f5eebbc74c8248c529a4a3331b347 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:33:03 +0000 Subject: [PATCH 094/106] chore: sync master from test_mac_arm64 [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 088e12c..907333a 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ The original **Dink Smallwood** (1997) was created by **Seth A. Robinson**, **Ju * **yeoldtoast** Editors and a bunch of other Dink stuff * **RobJ** -- DinkC command fixes and compatibility improvements * **SimonK** -- DMOD stress testing and limit increase requests -* **Mateus Sales Bentes** -- Linux port work, macOS ARM64 build fixes +* **Mateus Sales Bentes** -- Linux port work, macOS universal binary (Intel + Apple Silicon), window lifecycle, resolution and controls fixes Special thanks to the entire [dinknetwork.com](https://www.dinknetwork.com/) community for their Dink creations and support over the years! From 6569443b969d38c5d25641d22a413eeeee45a9eb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:33:44 +0000 Subject: [PATCH 095/106] chore: sync master from test_mac_arm64 [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 907333a..48d15bb 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ The original **Dink Smallwood** (1997) was created by **Seth A. Robinson**, **Ju * **yeoldtoast** Editors and a bunch of other Dink stuff * **RobJ** -- DinkC command fixes and compatibility improvements * **SimonK** -- DMOD stress testing and limit increase requests -* **Mateus Sales Bentes** -- Linux port work, macOS universal binary (Intel + Apple Silicon), window lifecycle, resolution and controls fixes +* **Mateus Sales Bentes** -- Linux port work, macOS universal binary (Intel + Apple Silicon) Special thanks to the entire [dinknetwork.com](https://www.dinknetwork.com/) community for their Dink creations and support over the years! From fae3c44b0c3fad8818333f49cf2ed98f683879a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:34:31 +0000 Subject: [PATCH 096/106] chore: sync master from test_mac_arm64 [skip ci] --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 9e5611a..c58d6a9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -124,7 +124,7 @@ git clone https://github.com/SethRobinson/proton.git git clone https://github.com/SethRobinson/RTDink.git ``` - > **Note (contributors):** If building from the `mateusbentes/RTDink` fork, use `https://github.com/mateusbentes/proton.git` instead of the upstream Proton SDK — it contains macOS-specific fixes for window creation, resolution handling, and the app lifecycle that have not yet been merged upstream. + 2. Install **SDL2** and **SDL2_mixer** frameworks: From 91b7958868d0f02fe8d1949a9a29ec0a7cb569b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:36:07 +0000 Subject: [PATCH 097/106] chore: sync master from test_mac_arm64 [skip ci] --- INSTALL.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index c58d6a9..fb905f1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -124,8 +124,6 @@ git clone https://github.com/SethRobinson/proton.git git clone https://github.com/SethRobinson/RTDink.git ``` - - 2. Install **SDL2** and **SDL2_mixer** frameworks: **Option A — DMG frameworks** (recommended, works on all Macs, required for universal binary): From fa02422b3d5b2f1b1a8d4313ec8e9dcf73ca76af Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:42:44 +0000 Subject: [PATCH 098/106] chore: sync master from test_mac_arm64 [skip ci] --- source/App.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index a76a21a..1c8bf53 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -1187,7 +1187,14 @@ void App::OnScreenSizeChange() UpdateTitleBar(); -#if defined(WINAPI) || defined(PLATFORM_OSX) +#ifdef WINAPI + GetApp()->GetVar("fullscreen")->Set(uint32(g_bIsFullScreen)); + GetApp()->GetVar("videox")->Set(uint32(GetPrimaryGLX())); + GetApp()->GetVar("videoy")->Set(uint32(GetPrimaryGLY())); +#ifdef _DEBUG + LogMsg("Got OnScreenSizeChange: Setting to %d, %d", uint32(GetPrimaryGLX()), uint32(GetPrimaryGLY())); +#endif +#elif defined(PLATFORM_OSX) GetApp()->GetVar("fullscreen")->Set(uint32(g_bIsFullScreen)); GetApp()->GetVar("video_x")->Set(uint32(GetPrimaryGLX())); GetApp()->GetVar("video_y")->Set(uint32(GetPrimaryGLY())); @@ -1195,7 +1202,6 @@ void App::OnScreenSizeChange() LogMsg("Got OnScreenSizeChange: Setting to %d, %d", uint32(GetPrimaryGLX()), uint32(GetPrimaryGLY())); #endif #endif - } void App::GetServerInfo( string &server, uint32 &port ) From 3ce8eaacc572416485039df8571da9c09b7cf09e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:44:51 +0000 Subject: [PATCH 099/106] chore: sync master from test_mac_arm64 [skip ci] --- source/App.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 1c8bf53..2a0ccf0 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -242,7 +242,7 @@ const char * GetAppName() return "Dink Smallwood HD"; }; -#if defined(RTLINUX) || defined(PLATFORM_LINUX) +#if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) #include @@ -277,6 +277,8 @@ void UpdateViewport(int width, int height) { glLoadIdentity(); } + +#if defined(RTLINUX) || defined(PLATFORM_LINUX) // Linux: SDL owns the window - use SDL fullscreen toggle void OnFullscreenToggleRequestMultiplatform() { SDL_Window* window = GetSDLWindow(); @@ -305,8 +307,9 @@ void OnFullscreenToggleRequestMultiplatform() { SetupFakePrimaryScreenSize(1024, 768); UpdateViewport(width, height); } +#endif // RTLINUX || PLATFORM_LINUX -#elif defined(PLATFORM_OSX) +#if defined(PLATFORM_OSX) // macOS: Cocoa owns the window - implemented in OSXUtils.mm (Objective-C++ required) void OSXToggleFullscreen(); From 830259e11f58ada04404f6e4dbc876fe5267b4d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 17:48:54 +0000 Subject: [PATCH 100/106] chore: sync master from test_mac_arm64 [skip ci] --- source/App.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/App.cpp b/source/App.cpp index 2a0ccf0..c103a20 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -308,6 +308,7 @@ void OnFullscreenToggleRequestMultiplatform() { UpdateViewport(width, height); } #endif // RTLINUX || PLATFORM_LINUX +#endif // RTLINUX || PLATFORM_LINUX || PLATFORM_OSX #if defined(PLATFORM_OSX) From ecdb41c50bbbc91512f951a19391c372d8686025 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Fri, 6 Mar 2026 11:33:32 -0300 Subject: [PATCH 101/106] ci: retrigger build after drawRect init fix From 812d24b43070e8e4d3fb0be2089fa10ba741da54 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 18:05:23 +0000 Subject: [PATCH 102/106] chore: sync master from test_mac_arm64 [skip ci] --- source/App.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index c103a20..1796579 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -725,10 +725,12 @@ bool App::Init() #if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) { - // On macOS Cocoa builds SDL video is not used, so we must call SDL_Init(0) - // before any SDL_InitSubSystem to satisfy SDL's internal state requirements. + // On macOS Cocoa builds SDL video is not used, so we must call SDL_Init + // with SDL_INIT_EVENTS before SDL_InitSubSystem for joystick/gamepad. + // Without SDL_INIT_EVENTS the event queue is not set up and SDL_PeepEvents + // returns nothing, making gamepads invisible. #ifdef PLATFORM_OSX - SDL_Init(0); + SDL_Init(SDL_INIT_EVENTS); #endif GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); } From e7f132363791ded484cd6d7b6ee1217342d9b9b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Mar 2026 18:14:21 +0000 Subject: [PATCH 103/106] chore: sync master from test_mac_arm64 [skip ci] --- source/App.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/App.cpp b/source/App.cpp index 1796579..1122628 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -725,12 +725,13 @@ bool App::Init() #if defined(RTLINUX) || defined(PLATFORM_LINUX) || defined(PLATFORM_OSX) { - // On macOS Cocoa builds SDL video is not used, so we must call SDL_Init - // with SDL_INIT_EVENTS before SDL_InitSubSystem for joystick/gamepad. - // Without SDL_INIT_EVENTS the event queue is not set up and SDL_PeepEvents - // returns nothing, making gamepads invisible. + // On macOS Cocoa builds SDL video is not used. + // Initialize SDL with events + joystick + gamecontroller upfront so the + // IOKit HID manager is set up before GamepadProviderSDL2::Init() runs. + // SDL_InitSubSystem inside GamepadProviderSDL2 will be a no-op for already + // initialized subsystems, so this is safe. #ifdef PLATFORM_OSX - SDL_Init(SDL_INIT_EVENTS); + SDL_Init(SDL_INIT_EVENTS | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER); #endif GetGamepadManager()->AddProvider(new GamepadProviderSDL2()); } @@ -1058,8 +1059,10 @@ void App::Update() // queue without touching the Cocoa window or event loop. SDL_PumpEvents(); SDL_Event ev; + // Drain all joystick/gamepad events in one pass (SDL_JOYAXISMOTION=0x600 + // through SDL_CONTROLLERDEVICEREMAPPED=0x657 covers all pad events) while (SDL_PeepEvents(&ev, 1, SDL_GETEVENT, - SDL_JOYAXISMOTION, SDL_CONTROLLERDEVICEREMAPPED) == 1) + SDL_JOYAXISMOTION, SDL_CONTROLLERDEVICEREMAPPED) > 0) { VariantList v; v.Get(0).Set((Entity*)&ev); From d1c6b505187e8ce82f621b8ad43c818dbd509cd2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 7 Mar 2026 10:51:40 +0000 Subject: [PATCH 104/106] chore: sync master from test_mac_arm64 [skip ci] --- OSX/RTDink.xcodeproj/project.pbxproj | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index 824c062..eb1a8e3 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1660,7 +1660,8 @@ GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_ALL_NO_LIB, NDEBUG, - C_GL_MODE, +C_GL_MODE, + PLATFORM_OSX, ); GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -1705,7 +1706,8 @@ RT_PNG_SUPPORT, RT_IPV6, RT_JPG_SUPPORT, - C_GL_MODE, +C_GL_MODE, + PLATFORM_OSX, RT_USE_SDL_AUDIO, ); INFOPLIST_FILE = Info.plist; @@ -1818,7 +1820,8 @@ GCC_PREPROCESSOR_DEFINITIONS = ( _DEBUG, BOOST_ALL_NO_LIB, - C_GL_MODE, +C_GL_MODE, + PLATFORM_OSX, RT_JPG_SUPPORT, RT_IPV6, RT_PNG_SUPPORT, @@ -1863,7 +1866,8 @@ GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_ALL_NO_LIB, NDEBUG, - C_GL_MODE, +C_GL_MODE, + PLATFORM_OSX, RT_CUSTOM_LOGMSG, RT_JPG_SUPPORT, RT_IPV6, From c4f2c0cf43fba9fac4d9d5e31e09820e1e477e0e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 9 Mar 2026 00:08:24 +0000 Subject: [PATCH 105/106] chore: sync master from test_mac_arm64 [skip ci] --- OSX/RTDink.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index eb1a8e3..ac5136e 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -1407,7 +1407,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Create symlinks if proton is cloned inside the repo (MacInCloud layout)\n# This makes ../../shared and ../../proton work from OSX/ dir\nPROTON_INSIDE=\"$SRCROOT/../proton\"\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_SIBLING=\"$SRCROOT/../../proton\"\n\nif [ -d \"$PROTON_INSIDE\" ]; then\n if [ ! -d \"$SHARED_SIBLING\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE/shared\"\n ln -sf \"$PROTON_INSIDE/shared\" \"$SHARED_SIBLING\"\n fi\n if [ ! -d \"$PROTON_SIBLING\" ]; then\n echo \"Creating proton symlink: $PROTON_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$PROTON_SIBLING\"\n fi\nfi\n\n# Fix MyOpenGLView.mm: replace (NSOpenGLPixelFormatAttribute)nil with (NSOpenGLPixelFormatAttribute)0\n# This is a hard error on ARM64 clang - nil is a pointer, can't cast to 32-bit uint\nMYOPENGLVIEW=\"$SRCROOT/../../shared/OSX/app/MyOpenGLView.mm\"\nif [ -f \"$MYOPENGLVIEW\" ]; then\n if grep -q '(NSOpenGLPixelFormatAttribute)nil' \"$MYOPENGLVIEW\"; then\n sed -i '' 's/(NSOpenGLPixelFormatAttribute)nil/(NSOpenGLPixelFormatAttribute)0/g' \"$MYOPENGLVIEW\"\n echo \"Patched MyOpenGLView.mm: replaced nil cast with 0\"\n fi\nfi\n\n# Create SDL2/SDL_mixer.h compatibility symlink for SDL2_mixer.framework\nSDL2_MIXER_HEADERS=\"$HOME/Library/Frameworks/SDL2_mixer.framework/Headers\"\nSDL2_HEADERS=\"$HOME/Library/Frameworks/SDL2.framework/Headers\"\nif [ -d \"$SDL2_MIXER_HEADERS\" ] && [ -d \"$SDL2_HEADERS\" ]; then\n if [ ! -f \"$SDL2_HEADERS/SDL_mixer.h\" ]; then\n ln -sf \"$SDL2_MIXER_HEADERS/SDL_mixer.h\" \"$SDL2_HEADERS/SDL_mixer.h\"\n echo \"Created SDL_mixer.h symlink in SDL2.framework/Headers\"\n fi\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; + shellScript = "# Create symlinks if proton is cloned inside the repo (MacInCloud layout)\n# This makes ../../shared and ../../proton work from OSX/ dir\nPROTON_INSIDE=\"$SRCROOT/../proton\"\nSHARED_SIBLING=\"$SRCROOT/../../shared\"\nPROTON_SIBLING=\"$SRCROOT/../../proton\"\n\nif [ -d \"$PROTON_INSIDE\" ]; then\n if [ ! -d \"$SHARED_SIBLING\" ]; then\n echo \"Creating shared symlink: $SHARED_SIBLING -> $PROTON_INSIDE/shared\"\n ln -sf \"$PROTON_INSIDE/shared\" \"$SHARED_SIBLING\"\n fi\n if [ ! -d \"$PROTON_SIBLING\" ]; then\n echo \"Creating proton symlink: $PROTON_SIBLING -> $PROTON_INSIDE\"\n ln -sf \"$PROTON_INSIDE\" \"$PROTON_SIBLING\"\n fi\nfi\n\n\n# Create SDL2/SDL_mixer.h compatibility symlink for SDL2_mixer.framework\nSDL2_MIXER_HEADERS=\"$HOME/Library/Frameworks/SDL2_mixer.framework/Headers\"\nSDL2_HEADERS=\"$HOME/Library/Frameworks/SDL2.framework/Headers\"\nif [ -d \"$SDL2_MIXER_HEADERS\" ] && [ -d \"$SDL2_HEADERS\" ]; then\n if [ ! -f \"$SDL2_HEADERS/SDL_mixer.h\" ]; then\n ln -sf \"$SDL2_MIXER_HEADERS/SDL_mixer.h\" \"$SDL2_HEADERS/SDL_mixer.h\"\n echo \"Created SDL_mixer.h symlink in SDL2.framework/Headers\"\n fi\nfi\n\n# Generate pnglibconf.h\nLIBPNG=\"$SRCROOT/../../shared/Irrlicht/source/Irrlicht/libpng\"\nif [ -d \"$LIBPNG\" ] && [ ! -f \"$LIBPNG/pnglibconf.h\" ] && [ -f \"$LIBPNG/pnglibconf.h.prebuilt\" ]; then\n cp \"$LIBPNG/pnglibconf.h.prebuilt\" \"$LIBPNG/pnglibconf.h\"\n echo \"Copied pnglibconf.h from $LIBPNG\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ From 2891564a2d00b1a659a17ce4b0544a9fc34f7023 Mon Sep 17 00:00:00 2001 From: Mateus Sales Bentes Date: Wed, 11 Mar 2026 23:08:23 -0300 Subject: [PATCH 106/106] Add macOS GameController files to OSX Xcode project --- OSX/RTDink.xcodeproj/project.pbxproj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/OSX/RTDink.xcodeproj/project.pbxproj b/OSX/RTDink.xcodeproj/project.pbxproj index ac5136e..70c8df0 100644 --- a/OSX/RTDink.xcodeproj/project.pbxproj +++ b/OSX/RTDink.xcodeproj/project.pbxproj @@ -8,6 +8,9 @@ /* Begin PBXBuildFile section */ 5D21B9E11FA6C31D00B12CB3 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9CE1FA6C31B00B12CB3 /* png.c */; }; + AA000009000000000000AA01 /* GamepadProviderGCController.mm in Sources */ = {isa = PBXBuildFile; fileRef = AA00000A000000000000AA01 /* GamepadProviderGCController.mm */; }; + AA00000B000000000000AA01 /* GamepadGCController.mm in Sources */ = {isa = PBXBuildFile; fileRef = AA00000C000000000000AA01 /* GamepadGCController.mm */; }; + AA00000D000000000000AA01 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA00000E000000000000AA01 /* GameController.framework */; }; 5D21B9E21FA6C31D00B12CB3 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9CF1FA6C31B00B12CB3 /* pngerror.c */; }; 5D21B9E31FA6C31D00B12CB3 /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D01FA6C31B00B12CB3 /* pngtrans.c */; }; 5D21B9E41FA6C31D00B12CB3 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D21B9D11FA6C31B00B12CB3 /* pngrutil.c */; }; @@ -249,6 +252,11 @@ 256AC3F00F4B6AF500CF3369 /* RTDink_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTDink_Prefix.pch; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + AA00000A000000000000AA01 /* GamepadProviderGCController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = GamepadProviderGCController.mm; path = ../../shared/Gamepad/GamepadProviderGCController.mm; sourceTree = SOURCE_ROOT; }; + AA00000F000000000000AA01 /* GamepadProviderGCController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadProviderGCController.h; path = ../../shared/Gamepad/GamepadProviderGCController.h; sourceTree = SOURCE_ROOT; }; + AA00000C000000000000AA01 /* GamepadGCController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = GamepadGCController.mm; path = ../../shared/Gamepad/GamepadGCController.mm; sourceTree = SOURCE_ROOT; }; + AA000010000000000000AA01 /* GamepadGCController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GamepadGCController.h; path = ../../shared/Gamepad/GamepadGCController.h; sourceTree = SOURCE_ROOT; }; + AA00000E000000000000AA01 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = /System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; 5D21B9CE1FA6C31B00B12CB3 /* png.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = png.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/png.c; sourceTree = ""; }; 5D21B9CF1FA6C31B00B12CB3 /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pngerror.c; sourceTree = ""; }; 5D21B9D01FA6C31B00B12CB3 /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = ../../../shared/Irrlicht/source/Irrlicht/libpng/pngtrans.c; sourceTree = ""; }; @@ -625,6 +633,7 @@ AFD4D88A113C504F00C2DE76 /* OpenGL.framework in Frameworks */, AF9DBBC6113C611C00D05754 /* QuartzCore.framework in Frameworks */, 5DDE02A012B4F50D000C5CC0 /* libz.dylib in Frameworks */, + AA00000D000000000000AA01 /* GameController.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -638,6 +647,7 @@ AFD4D889113C504F00C2DE76 /* OpenGL.framework */, AF9DBBC5113C611C00D05754 /* QuartzCore.framework */, 5DDE029F12B4F50D000C5CC0 /* libz.dylib */, + AA00000E000000000000AA01 /* GameController.framework */, ); name = "Linked Frameworks"; sourceTree = ""; @@ -714,6 +724,10 @@ children = ( 5D21BA0F1FA6C6EE00B12CB3 /* GamepadProvideriCade.cpp */, 5D21BA101FA6C6EE00B12CB3 /* GamepadProvideriCade.h */, + AA00000A000000000000AA01 /* GamepadProviderGCController.mm */, + AA00000F000000000000AA01 /* GamepadProviderGCController.h */, + AA00000C000000000000AA01 /* GamepadGCController.mm */, + AA000010000000000000AA01 /* GamepadGCController.h */, 5D21BA041FA6C3DD00B12CB3 /* GamepadiCade.cpp */, 5D21BA001FA6C3DC00B12CB3 /* GamepadiCade.h */, 5D21B9F81FA6C34500B12CB3 /* Gamepad.cpp */, @@ -1484,6 +1498,8 @@ 5D21BA111FA6C6EE00B12CB3 /* GamepadProvideriCade.cpp in Sources */, AA000005000000000000AA01 /* GamepadProviderSDL2.cpp in Sources */, AA000007000000000000AA01 /* GamepadSDL2.cpp in Sources */, + AA000009000000000000AA01 /* GamepadProviderGCController.mm in Sources */, + AA00000B000000000000AA01 /* GamepadGCController.mm in Sources */, AA000004000000000000AA01 /* AudioManagerSDL.cpp in Sources */, 5D70C0D812B72BE700A1AB17 /* TextBoxRenderComponent.cpp in Sources */,