Closed frostney closed 6 years ago
@kibook It would be great if you could take a look since you as you authored #18 that introduces some the changes this pull request is touching on.
Not sure if it's worth to specify this specifally for MACOS
instead of DARWIN
. I'm happy for suggestions.
According to these vague wiki pages:
http://wiki.lazarus.freepascal.org/Target_MacOS http://wiki.lazarus.freepascal.org/Target_Darwin
Darwin is for the relevant MacOS X; however i guess both flags will be set anyways, therefore it's irrelevant.
Weirdly enough, it seems the MACOS
directive doesn't seem to work in that case. I'll investigate this a bit more.
Edit: It seems MACOS
isn't set on current macOS systems as it seems to be a flag for classic Mac systems (https://en.wikipedia.org/wiki/Classic_Mac_OS): https://www.freepascal.org/docs-html/prog/progap7.html#x316-331000G
MacOS (Darwin) is classified as a UNIX subset, but macOS doesn't use X11 as its window system. See https://support.apple.com/en-gb/HT201341
If X libraries are referenced, the resulting binary needs to be linked against X11. Since Cocoa already provides everything that's needed, this adds extra complexity on the developer and the user. (Compiled executables will force users to install third-party apps that are not endorsed by Apple)
Tested on macOS High Sierra 10.13.3