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

Add --run command line argument to run a project when pointing to project.godot #98897

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Nov 6, 2024

This allows running the project directly without having to edit the rest of the command line.
I've had to juggle a lot with the command line over the years, so hopefully this will allow us to spare our Alt + Backspace keys a bit 🙂

Previously, to run a project instead of opening it in the editor, you would have to change the following:

godot path/to/project.godot
# Or:
godot --path path/to/

Into:

godot --path path/to/
# Or:
godot --path path/to/ --editor

You can now do the following:

godot path/to/project.godot --run

It is still possible to specify a scene to run directly with this approach (scene path is relative to the project root):

godot path/to/project.godot path/to/scene.tscn --run

When not specifying --run, the above command will open the scene in the editor (this also works in master).

@Calinou Calinou requested a review from a team as a code owner November 6, 2024 14:15
@Calinou Calinou added this to the 4.4 milestone Nov 6, 2024
@Repiteo Repiteo modified the milestones: 4.4, 4.x Jan 20, 2025
…project.godot`

This allows running the project directly without having to edit the
rest of the command line.

Previously, to run a project instead of opening it in the editor,
you would have to change the following:

    godot path/to/project.godot
    # Or:
    godot --path to

Into:

    godot --path path/to/
    # Or:
    godot --path path/to/ --editor

You can now do the following:

    godot path/to/project.godot --run

It is still possible to specify a scene to run directly with this approach
(scene path is relative to the project root):

    godot path/to/project.godot path/to/scene.tscn --run

When not specifying `--run`, the above command will open the scene in the editor.
@Calinou Calinou force-pushed the cli-add-run-argument branch from 9dc7f0d to ff89ab3 Compare January 22, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants