godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.13k stars 92 forks source link

Redesign export template #9891

Open CsloudX opened 4 months ago

CsloudX commented 4 months ago

Describe the project you are working on

NoGame App

Describe the problem or limitation you are having in your project

I'm use godot make application, for my project, I have 2 export: MainApp.exe and FacEditor.exe. For now godot export, it take MainApp.exe(70M)+FacEditor.exe(70M)=140M space.

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

Split ExportTemplate.exe to Start.exe(10M)+Godot.dll(60M). Note: 10M and 60M was my guess space size. Godot.dll was on the windows, linux maybe was Godot.so Godot.dll was the core functions. Start.exe was the export infomations. for my project. it take MainApp.exe(10M)+FacEditor.exe(10M)+Godot.dll(60M)=80M space. If my project has many exports, it will increase much space.

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

/

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

Not, it can't

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

It can't be addons

AThousandShips commented 4 months ago

Can you please add some more details on how this would be done? This is very vague

bruvzg commented 4 months ago

See https://github.com/godotengine/godot-proposals/issues/6267 and https://github.com/godotengine/godot/pull/90510.

Currently, you can use a single executable for multiple exports by creating shortcuts / wrappers to run specific PCK, export process only modify non-essential EXE resources such as icon and version info, all project data is on the PCK.

e.g, if you currently have MainApp.exe, MainApp.pck, FacEditor.exe, and FacEditor.pck you can instead only keep MainApp.exe, MainApp.pck, and FacEditor.pck and add shortcut (or simple wrapper app) to run MainApp.exe --main-pack FacEditor.pck.