8000 Add auto editor version search. by artsich · Pull Request #43 · MakovWait/godots · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add auto editor version search. #43

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

Merged
merged 3 commits into from
Oct 21, 2023
Merged

Conversation

artsich
Copy link
Contributor
@artsich artsich commented Oct 20, 2023

New Argument for godots editor run

The new argument serves as a hint to godots for determining which version of the Godot editor should be launched. This argument represents the path to the project's Godot directory. Initially, Godots will try to open the editor version already bound to the project. If unsuccessful, it will then source the desired version from the version_hint property in the project.godot file.

Note:

  • The path will be ignored if the --name flag is passed.
  • If the project isn't bound to the editor or version_hint does not exist in the project.godot file, the editor will not open.

Usage

  • By default, the working directory will be used:
godots.exe editor run
  • To specify a project directory:
godots.exe editor run "path/to/project/dir"

var editor: LocalEditors.Item = null

if req.name_pattern.is_empty():
var project_path = DirAccess.open(req.working_dir).get_current_dir() + "/project.godot"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DirAccess.open(req.working_dir).get_current_dir().path_join("project.godot")

var result: LocalEditors.Item = null

if FileAccess.file_exists(project_path):
var project_info = Projects.ExternalProjectInfo.new(project_path)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also check if a project with the given project_path exists, and if it does - use the editor bound to it

@MakovWait MakovWait merged commit 9d1ceb6 into MakovWait:main Oct 21, 2023
@artsich artsich deleted the add-auto-command branch October 29, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0