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 scaffolding functionality to the Godot binary #9306

Open
adamscott opened this issue Mar 15, 2024 · 5 comments
Open

Add scaffolding functionality to the Godot binary #9306

adamscott opened this issue Mar 15, 2024 · 5 comments

Comments

@adamscott
Copy link
Member

adamscott commented Mar 15, 2024

Describe the project you are working on

Writing a tutorial for using the godot-cpp-template.

Describe the problem or limitation you are having in your project

The godot-cpp template is somewhat difficult to use. It takes into account that you create a project from scratch with the intent of having a GDExtension, which is quite specific.

Telling people to use the godot-cpp template is somewhat vain, as it would be as difficult to explain as the existing godot-cpp tutorial.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add a new tool in the Godot binary that setups a project in the current directory.
It could be

  • a new Godot project;
  • a godot-cpp project;
  • any other bindings...

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Here how the Godot binary tool could work:

Tool summon

The tool could be summoned with the scaffold keyword after the binary.

$ godot scaffold

It would differ from other existing tools as --doctool as godot scaffold is intended to be felt as a command line app as its own.

Specific help

godot scaffold --help would display the scaffold help, not the general help.

The help could list all the parameters needed for each scaffold module.

Godot Engine v4.3.dev.custom_build.0cab68afd (2024-03-15 19:15:14 UTC) - https://godotengine.org
Free and open source software under the terms of the MIT license.
(c) 2014-present Godot Engine contributors. (c) 2007-present Juan Linietsky, Ariel Manzur.

Usage:
  godot scaffold [type] [options]

General options:
  -h, --help                           Display this help message.
  --version                            Display the version string.
  -v, --verbose                        Use verbose stdout mode.
  --quiet                              Quiet mode, silences stdout messages. Errors are still displayed.
  --no-header                          Do not print engine version and rendering method header on startup.
  --no-interactive                          Do not start the interactive scaffold builder.

godot type options:
  --title                               Project title.

godot-cpp type options:
  --title                               Project title.

Interactive scaffold

Launching godot scaffold without any parameters would launch the interactive scaffold tool. The builder would be launched for every missing parameter, except when --no-interactive would be added as a parameter.

Which scaffold would you like to use?
  Base Godot project
> godot-cpp project
Name of your project
> 
Project directory
(./name_of_my_project) > 

And such.

Declarative scaffold

It would be possible to pass all the parameters a scaffold needs after the scaffold keyword, bypassing the need for an interactive prompt.

If this enhancement will not be used often, can it be worked around with a few lines of script?

This PR is in part essentially the command line equivalent of using the project manager to create a project.

Is there a reason why this should be core and not an add-on in the asset library?

This kind of functionality isn't made for the asset library.

@Calinou Calinou changed the title Scaffolding functionnality to the Godot binary Add scaffolding functionnality to the Godot binary Mar 15, 2024
@Calinou
Copy link
Member

Calinou commented Mar 15, 2024

I think it should be an option (godot --scaffold <type> or godot --new <type>) as opposed to a subcommand, as we currently don't use any subcommands in Godot's CLI syntax.

@Gallilus
Copy link

About "any other bindings..." How would third-party bindings create/register their scaffold?

@passivestar
Copy link

Related: #9188

@aaronfranke
Copy link
Member

Instead of a command-line option, I believe it should just be a button in the editor. Make it as simple as possible. This is what I've implemented in this PR godotengine/godot#90979

@Calinou
Copy link
Member

Calinou commented Apr 24, 2024

Instead of a command-line option, I believe it should just be a button in the editor. Make it as simple as possible. This is what I've implemented in this PR godotengine/godot#90979

I'd say it should be both, for automation purposes 🙂

@Mickeon Mickeon changed the title Add scaffolding functionnality to the Godot binary Add scaffolding functionality to the Godot binary Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants