-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add platform macros #1188
Add platform macros #1188
Conversation
Thanks! I haven't had a chance to do a proper review yet, but I think this is a great idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the flags to the dedicated platform tools in tools
, inside the generate
function.
These are the "equivalent" of upstream Godot configure
functions inside platform/name/detect.py
:
tools/windows.py
tools/linux.py
tools/macos.py
tools/ios.py
- etc.
This will also simplify the code as you can just add the flags there without having to check for the env["platform"]
variables (the generate
function is called only when the given platform is selected).
Yes, I saw this yesterday, but didn't have time to change it. Thanks, will do. |
5fe73f2
to
e1c68e2
Compare
e1c68e2
to
2127a7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my 2 comments, I will open a separate PR to merge the osxcross
tools and reduce confusion.
2127a7d
to
f6098c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now 👍 .
The only thing I'm not sure about is having COREAUDIO_ENABLED
, COREMIDI_ENABLED
on ios/macos, and WASAPI_ENABLED
, WINMIDI_ENABLED
on windows.
Why are they useful? I think those are there to control godot driver internals, and if they can't be disabled on those platforms, then extensions could just check for WINDOWS_ENABLED
/MACOS_ENABLED
.
f6098c1
to
9d9f427
Compare
@Faless I just removed the non-platform related macros! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This looks great to me. I did a quick test, and I can see the Linux defines showing up as expected.
Add platform macros, like
LINUX_ENABLED
andUNIX_ENABLED
on Linux,MACOS_ENABLED
,UNIX_ENABLED
,on macos, andCOREAUDIO_ENABLED
,COREMIDI_ENABLED
WINDOWS_ENABLED
,on Windows.WASAPI_ENABLED
,WINMIDI_ENABLED