-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
class OS: Implement funcs for fetching distribution name and version #5022
Comments
No, I don't think There could be On Windows, it's also debatable whether
The X11 platform was renamed to
The OSX platform was recently renamed to macOS in 4.0. This also can't be backported to 3.x for compatibility reasons. Footnotes
|
I find your mentions and suggestions totally fine. For Windows, I'd also prefer the actual version numbers. EDIT: If we go with your suggestions, then there should be no |
@Calinou: ok, I finished rewriting the proposal. It should not break compatibility now. |
Implemented by godotengine/godot#65525. |
Describe the project you are working on
Videogame - features bug reporting, therefore requires collecting system info
Describe the problem or limitation you are having in your project
get_name
returns for Linux and BSD systemsX11
(in Godot 3) orlinuxbsd
(in Godot 4), but not a better fitting value such as the distribution nameDescribe the feature / enhancement and how it helps to overcome the problem or limitation
Picking up on godotengine/godot#31895
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
new funcs
OS.get_version() String
OS.get_distribution_name() String
Add OS.get_distribution_name for Linux and BSD
This func returns for Linux and BSD the value
X11
in Godot 3,linuxbsd
in Godot 4.Even the name change in Godot 4 basically only lists the OS family name (joined together). But these families have many members, which do their own thing:
Ubuntu
,Manjaro
,OpenBSD
, etc.Therefore, there is the suggestion to add a
OS.get_distribution_name()
func, which returns values such asUbuntu
,Mageaia
,Manjaro
,Ubuntu
,Linux Mint
,Arch Linux
,Linux Mint
etc. (i.e. distribution names for Linux OS family)OpenBSD
,FreeBSD
, etc. (i.e. distribution names for BSD OS family)Proposed API func description:
Add OS.get_version
If this enhancement will not be used often, can it be worked around with a few lines of script?
Cannot be worked around with a few lines. Would require system calls which are OS-specific.
Is there a reason why this should be core and not an add-on in the asset library?
This is about improving collecting system info for video games, apps and Godot itself (at least giving Godot the potential to copy&paste system data in github issues - which should be approached in a separate proposal).
The text was updated successfully, but these errors were encountered: