pret / pokeplatinum

Decompilation of Pokémon Platinum
164 stars 56 forks source link

INSTALL.md updates for macOS #246

Closed jahndan closed 3 weeks ago

jahndan commented 3 weeks ago

I plan on resolving this issue with a PR soon, but am opening this to summarize what I've found so far and to ask a few questions.

I'm not sure how much detail I should add to the macOS section of INSTALL.md: should I explicitly write out the brew install commands with the dependencies if said dependencies vary based on the version of macOS? should I include instructions to configure PATH in zsh to shadow apple clang (and its aliases) with another compiler?


the command realpath doesn't exist on macOS Monterey or earlier (only available in /usr/bin from Ventura onwards)

subproject knarc does not build on apple clang 14.0.0 (Monterey) because it is not c++20 compliant (not sure if the version of apple clang bundled with xcode cmdline tools for Ventura/Sonoma is c++20 compliant enough to build knarc)

apple clang is very annoying because it has unremovable aliases gcc and g++—meaning any other compiler masquerading as gcc (whether it's homebrew gcc or homebrew clang) must be earlier in path than /usr/bin, since meson looks for gcc/g++ first and will find one if apple clang is installed

libpng can't build from source during configuration when it's not already already installed (for nitrogfx)

also there's some configurations I can't currently test (if no one else gets around to it, I can probably test on macOS 13 by the end of the summer because I was planning on updating soon anyway)


INSTALL.md

Mac OSX (<=10.14)

is this supposed to be for macOS Mojave and older? (if this works on those, i'll add a supplementary section for more recent versions instead of replacing this entirely)


macOS 13 Ventura (and higher?)

macOS 12 Monterey (and lower?)

homebrew gcc-14 as c++20 compliant compiler

homebrew clang-18 as c++20 compliant compiler


working configurations:

failing configurations:

configurations left to test:

mid-kid commented 3 weeks ago

The CC and CXX variables are the de-facto way to pick a compiler. You can also use meson's --native-file option. https://mesonbuild.com/Cross-compilation.html

Still, I think it should be explored to downgrade the c++ standard requirements.

But, most importantly, are you sure you can run mwccarm.exe on your particular version of mac?