-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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 "Pack Project as ZIP..." to Project menu #99781
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This improves usability and export by exposing something hidden in the export system.
Did not do a thorough review and did not do testing.
Interesting. Especially when asking for MRPs. |
I was hoping to test the web editor today, but unfortunately ran into some strange issues with running it. I've asked for assistance with it in some other places, and will give a shot at building from master just in case my PR introduced bugs, but otherwise I won't be able to test the web editor for now 😅 |
I tried it here and from what i can see in the code it looks fine to me, with three notes:
Aside from the above, i think it'd be useful functionality to have. I also tried to build the web-based editor but for some reason it wouldn't run (both Firefox Developer Edition and Falkon wouldn't work, stopping at godot's logo with an error about trying to call |
Thanks for testing it! To address your notes:
If these are pre-defined/hard-coded directories that would exist in any project that's been exported, then I definitely agree they should be excluded by default. I was thinking of having it ignore Git-related files as an option as well. Parsing
This was copied from the "Download Project Source" code, and I think I've also seen some other functions in Godot that just output their error messages to the console window. That being said, a
Yep, I'm aware. I'm happy with the current overall state of the PR (that is, I don't foresee myself needing to check intermediate commits), so I'll probably squash what I have so far. I often prefer to keep the commits separate so I can check intermediate versions, then squash them once the PR is closer to being merged.
That may have been the same error message I was getting, that prevented me from testing the web editor! If I don't see an issue open for it, I'll open one. Thanks again! |
ab02185
to
fdf2937
Compare
Co-authored-by: A Thousand Ships <[email protected]>
Closes godotengine/godot-proposals#227.
This PR adds a menu item, "Pack Project as ZIP...", to the Project menu in the menu bar. Clicking it opens a file save location dialog, which defaults to the same directory as the project's folder. Clicking "Save" packs the contents of the project, except for the
.godot
folder, into a ZIP file at that location.Most of the code for this is from the WebToolsEditorPlugin class, since it was already implementing most of this functionality. The relevant code has been pulled out of that class and into a new class with static methods, ProjectZIPPacker. Both WebToolsEditorPlugin and this new menu item simply use ProjectZIPPacker to accomplish their task.
Notes
.godot
folder is not present, other hidden files/directories like.git
,.gitignore
, etc are included.To Do
#define
s for this perhaps?)