Skip to content

Add macOS ARM64 (Apple Silicon) support#1

Merged
csinkers merged 4 commits into
csinkers:masterfrom
abedegno:master
May 15, 2026
Merged

Add macOS ARM64 (Apple Silicon) support#1
csinkers merged 4 commits into
csinkers:masterfrom
abedegno:master

Conversation

@abedegno
Copy link
Copy Markdown
Contributor

@abedegno abedegno commented Apr 7, 2026

Summary

  • Add pre-built libadlmidi.dylib for osx-arm64 runtime
  • Add OSPlatform.OSX handling in DllImportFixture.cs and TestApp/Program.cs

Test plan

  • Builds on macOS (Apple M4 Pro, .NET 10)
  • Native library loads successfully via P/Invoke
  • XMI music files convert and play in Godot 4.6.1 mono project
  • Verify no regression on Windows/Linux

abedegno added 2 commits April 7, 2026 23:51
- Add libadlmidi.dylib for osx-arm64 (built from libADLMIDI source)
- Add OSPlatform.OSX handling in DllImportFixture.cs and TestApp
@csinkers
Copy link
Copy Markdown
Owner

csinkers commented May 9, 2026

Looks good, would you be able to add some info on the macOS build process to the readme.md? I'd like to add a github workflow at some point that will grab the libADLMIDI library at a particular commit and build it + commit so we have a more auditable / verifiable native build system, so some macOS steps would definitely help me write that in the absence of any suitable hardware.

@abedegno
Copy link
Copy Markdown
Contributor Author

@csinkers

Pushed a new commit adding a macOS build section to the README. Verified end-to-end by building libADLMIDI HEAD (commit 73d046d) with CMake 4.2.1 / Apple clang 17 on macOS arm64 - produces a working libADLMIDI.dylib with the same install name and dependencies as the shipped binary.

Two things worth flagging for the CI workflow you're planning:

  1. WITH_MUS_SUPPORT is no longer a recognised cmake variable in current libADLMIDI - it just emits a "manually-specified variable not used" warning. I dropped it from the new macOS section; you may want to drop it from the Linux section too.
  2. Three new emulators (ESFMU, MAME, YMFM) default to ON in current libADLMIDI. The macOS section I added explicitly disables them to match the "Nuked only" intent, but the existing Linux/Windows commands don't - so those binaries are silently shipping with three extra emulators that aren't exposed by the .NET Emulator enum. Probably worth adding -DUSE_ESFMU_EMULATOR=OFF -DUSE_MAME_EMULATOR=OFF -DUSE_YMFM_EMULATOR=OFF to the Linux command (and the Windows checklist) when you write the CI workflow, to keep all three platforms consistent.

Matches the cmake flags now documented in README:
Nuked emulator only; DOSBox, Opal, JAVA, ESFMu, MAME, YMFM
all disabled; embedded banks off. Reduces dylib size from
539184 to 339488 bytes; the wrapper only uses Nuked at runtime
so the smaller binary is functionally equivalent.

Built from libADLMIDI 98eb128 (Wohlstand/libADLMIDI master).
@csinkers
Copy link
Copy Markdown
Owner

Perfect, thanks!

@csinkers csinkers merged commit 2ac5640 into csinkers:master May 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants