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 a way to add files after exporting all files in an EditorExportPlugin #6284

Open
Daylily-Zeleen opened this issue Feb 14, 2023 · 3 comments · May be fixed by godotengine/godot#73276
Open

Comments

@Daylily-Zeleen
Copy link

Daylily-Zeleen commented Feb 14, 2023

Describe the project you are working on

A custom build godot engine.

Describe the problem or limitation you are having in your project

I can do some postprocess and add a description fils in the packed file, because of the EditorExportPlugin has not a way to add file after exporting all files.

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

If it is impolemented, I can collect every exported file in _export_file(), then do some postprocess to dump a description file and add it into the packed file after exporting files finished.

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

  1. Add a virtual method _export_files_end() for EditorExportPlugin.
  2. Let it be called after the step of exporting files finished in EditorExportPlatform::export_project_files().
  3. Then add extra files like the step of exporting files( besides add as a remap file).

Here is my implemention 73276.

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

The export workflow is in the core code, we can't change it in script.

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

The same as above.

@KoBeWi
Copy link
Member

KoBeWi commented Feb 14, 2023

Isn't it the same as _export_end() method? It can be used to copy some files (albeit you need to do it manually)

@Calinou Calinou changed the title Add a way to add files after exporting all files. Add a way to add files after exporting all files in an EditorExportPlugin Feb 14, 2023
@Daylily-Zeleen
Copy link
Author

Daylily-Zeleen commented Feb 15, 2023

Isn't it the same as _export_end() method? It can be used to copy some files (albeit you need to do it manually)

_export_end() just notify user that the export workflow is finished and currently it can't be overrided in c++ directly( I let it can be overrided in c++ by this pr).

_export_end() can't add files in to the packed file( *.pck or *.zip), call add_file() in _export_end() will store file in EditorExportPlugin::extra_files without truely adding into packed file, and will be added in next time to export( the timing is just after _export_begin()).

@KoBeWi
Copy link
Member

KoBeWi commented Feb 15, 2023

Ah by manually adding files I mean you can just copy them outside the PCK and they will still be loaded, but I guess a better way to do so makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants