Skip to content
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

[Idea] Automatic version selection and launch from CLI #24

Open
rdlaitila opened this issue Oct 2, 2023 · 1 comment
Open

[Idea] Automatic version selection and launch from CLI #24

rdlaitila opened this issue Oct 2, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rdlaitila
Copy link

rdlaitila commented Oct 2, 2023

Note this has some overlap with #23.

Just looking to get the idea out in the wild. Obviously the big pain point Godots and other launchers attempt to remedy is the pain of managing so many godot versions and installations. This is being solved quite nicely on the UI side giving the user an easy way to launch projects with the correct version of godot for that project.

However when configuring other tools such as IDE run/debug settings etc those tools expect you to supply paths to the executable to launch (ie: c:\path\to\my\godot.exe myscene.tscn). Its good practice to shove those paths into environment variables so those configurations can be somewhat portable (ie: %GODOT4% myscene.tscn). The trouble comes when moving between projects it becomes messy trying to wrangle the correct path variables for different versions of godot for a project. For instance my %GODOT4% environment variable may be pointing to the correct version of godot for Project A, but not for Project B.

You could generate one global environment variable for each engine version, %GODOT411% %GODOT420% etc. but this tends to get messy.

Would be nice if Godots could be the central launcher/wrapper for invoking the correct engine version for a given project on the CLI:

# Detects required engine version dynamically from project config and launches godot
c:\path\to\godots.exe c:\path\to\project\myscene.tscn 

I could then shove the Godots executable in my env and use it everywhere %GODOTS% -> c:\path\to\godots.exe -> %GODOTS% myscene.tscn

I did a bit of looking in the engine code I don't think godot gives scripts full control or access to program arguments, such a feature may require a separate wrapping script or program to call into godots to do the version selection and then invoke the godot engine and entrypoint scene/script.

Thanks for wonderful tool!

@MakovWait MakovWait added the enhancement New feature or request label Oct 8, 2023
@MakovWait
Copy link
Owner

MakovWait commented Nov 2, 2023

Added CLI.
Now it is possible to create editor process and pass args to it with:

godots exec -- c:\path\to\project\myscene.tscn 

but sadly, I haven't found any possibilities to replace the process or set the ENV variable with Godots, so for your case the CLI may not be so useful.

@MakovWait MakovWait added the help wanted Extra attention is needed label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants