-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Validate engine command line arguments #20000
Comments
Nice issue number, 👍 😢 |
I've started to implement a concept for this, I'm creating a WIP PR soon so we can discuss about the design. Edit: I've still not implemented the mentioned separation of engine arguments from project arguments as I'd like to clarify the syntax for that. |
Would it be possible to introduce a configuration variable for the project that disables the engine specific command line arguments completely? This would mean moving the detection of the mainpack and the loading of the configuration before processing the rest of the arguments. This would very useful if you want to give your game/software a proper command line interface. Requiring the -- is not optimal for that. Especially when you want to overload arguments like "--help" for example. |
I think API-Beast has basically the right idea, but rather than being a project option it should be a build option. That way you can decide for a given build whether or not to include the engine's command-line options or not. They would always be enabled in the editor. When they are, then the "--" symbol will work as described by the original poster. That being said, and not having looked through Godot's source yet, it might be difficult to run the game under some circumstances if the engine's command-line options are disabled since the engine will have already started up before the command-line processing occurs. Though how big of an issue this will be in practice, I have no idea. |
Closing in favor of godotengine/godot-proposals#2797, as feature proposals are now tracked on the Godot proposals repository. |
It was mentioned in #19683 that Godot currently does not validate engine command line arguments.
For this to be done, Godot needs to make sure project-specific arguments are not counted as invalid (as far as I know, it cannot perform that check while initializing, even if started inside a project). Engine arguments would have to be passed before a
--
sequence, and project-specific arguments would be placed after the same sequence. This is common practice in some programs that accept "general" CLI arguments in addition to arguments specific to a project.This would break compatibility with scripts that run projects with project-specific arguments, but ensures a strict separation between engine arguments and project-specific arguments. This would also prevent any conflicts that could arise between those kinds of arguments.
The text was updated successfully, but these errors were encountered: