-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Linux/BSD platform: Change export name and fix bsd
feature tag
#76996
base: master
Are you sure you want to change the base?
Linux/BSD platform: Change export name and fix bsd
feature tag
#76996
Conversation
d00852f
to
e91d89b
Compare
if (E == "linuxbsd") { | ||
presets.insert("linux"); | ||
presets.insert("bsd"); | ||
} |
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.
Perhaps we should keep only linuxbsd
in the list (without linux
, bsd
and other "sub-platforms")? Project Settings UI now allows feature tags that are not in the list.
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.
Fixing the bsd
feature tag is great, thanks!
e91d89b
to
4c317e9
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.
It looks good to me, but I have not tested this and I don't know all the implications of these changes.
platform->set_name("Linux/X11"); | ||
platform->set_os_name("Linux"); | ||
platform->set_name("Linux/BSD"); | ||
platform->set_os_name("LinuxBSD"); |
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.
What was the reasoning behind having both name
and os_name
?
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.
set_name()
sets the name displayed in the list of platforms. set_os_name()
sets rather a technical name (I did not find it displayed somewhere in the interface). Also, a feature tag is formed from os_name
(converted to lower case).
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.
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.
Yeah, Linux and BSD are not compatible systems.
Binaries for Linux do not work on BSD, and vice versa, they have different OS APIs, they are not the same platform even if they share a good amount of source code.
And we must be able to detect which platform we are in if we want gdextensions to work (and not end up trying to load a linux shared library on BSD).
As I mentioned in the other PR, we might be able to simply add another exporter dedicated to BSD.
That part is good so I would suggest extracting it to a separate PR so we can merge it for 4.1. The rest I'm not convinced yet. We only provide Linux export templates so calling the export preset Linux/BSD is IMO wrong. And I haven't reviewed all the implications of the other changes but I'm not sure they go in the right direction. The various BSD platforms we support are only working if you compile export templates for each of them manually, and use those as custom export templates. Currently you have to reuse the Linux/X11 export preset for that, which is sub par, but I'm not sure the approach taken here makes it better. |
Done: #78272. |
1.
TheExtracted to #78272.bsd
feature tag now includes all BSD systems, not just "other BSDs" (than FreeBSD, OpenBSD and NetBSD). See #76990.Outdated
godot/platform/linuxbsd/os_linuxbsd.cpp
Lines 203 to 215 in a1a1022
godot/platform/linuxbsd/os_linuxbsd.cpp
Lines 488 to 504 in a1a1022
2. The display name of the platform has been changed. X11 left as Wayland is not yet supported.
The term "Linux/BSD" is already in use:
godot/platform/linuxbsd/export/export_plugin.cpp
Lines 341 to 347 in a1a1022
Docs:
Perhaps we should replace the parentheses with brackets?
3. Added 2 feature tags to the dropdown list.
linux
∪bsd
=linuxbsd
,linux
⋂bsd
= ∅.freebsd
,openbsd
andnetbsd
are supported but not added to the list due to their rarity.