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 support for running commands before playing the project from the editor #12191

Closed
Calinou opened this issue Oct 17, 2017 · 5 comments
Closed

Comments

@Calinou
Copy link
Member

Calinou commented Oct 17, 2017

When using GDNative, it is often desired to compile the attached library (or libraries) before starting up the project (e.g. by pressing F5 in the editor).

Adding support for defining one or several commands to run before playing the project will make using GDNative more convenient (and there would be less risk to forget recompiling the library, thus wondering why things don't work as expected).

However, should the commands be stored in the editor, or in the project, considering that some of the user-defined commands may not work in a cross-platform manner (which is a bad thing for collaborative projects)?

@TeddyDD
Copy link

TeddyDD commented Oct 18, 2017

Godot has feature tags that could be used to store appropriate command per platform

@neikeq
Copy link
Contributor

neikeq commented Oct 18, 2017

Maybe what you want is something like EditorNode's build callback to be exposed to scripts?

@juan-garcia-m
Copy link

juan-garcia-m commented Nov 21, 2017

This could be done by assigning a script instead.
This way we can call the external script any way we want, for example by calling an executable or by connecting to a server, etc.
Instead of having to press F5 it could also be done automatically on resource change, this way the file resource can be provided to the script.

@akien-mga akien-mga removed this from the 3.0 milestone Jan 6, 2018
@Calinou
Copy link
Member Author

Calinou commented Jun 14, 2020

Closing in favor of godotengine/godot-proposals#119, as feature proposals are now tracked in the Godot proposals repository.

@willnationsdev
Copy link
Contributor

FYI: This is actually what EditorPlugin::build() is for, iirc. Every EditorPlugin's build() function is called when the editor tries to run a scene. All of them have to return true or else the editor stops running the scene prematurely. This allows you to create an EditorPlugin to run GDNative build commands and the like. I expect to make this a more integrated component of my godotengine/godot-proposals#119 implementation.

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

7 participants