-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
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
8e0c6b4
to
6c4c76a
Compare
6c4c76a
to
ab4e824
Compare
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.
Tested locally with the Platformer 3D demo, it works as expected.
Thanks for the review! 😄 I'm hoping to check what the result of a project export is (i.e., if there are extra folders created that we may want to automatically exclude), but it looks like I may be running into a bug with loading export templates. I'm going to try rebasing on a recent commit from Edit: Indeed, it seems I'm unable to add an export template - issue has been filed #99907 |
I was finally able to get export templates working, but in my case (doing a macOS testing export) it doesn't appear to have created any |
a33b17c
to
d8d9c50
Compare
For the Web platform, we will need to ask the OS first if they want to handle it first. Because we need the native file saver instead of the internal one, as saving the file internally doesn't make the file downloadable necessarily, which defeats the purpose. And the PR should remove the existing "Pack project as ZIP" that exists for the Web platform (in Tools). |
Those sound like good changes to make, to me. Unfortunately it looks like with the branch based off of the latest I saw on the RocketChat you'd reported this bug to them: emscripten-core/emscripten#23046 but it appears to only have been assigned so far, so I may need to wait for that to be fixed before I can make further progress on this PR... |
Is this still the case? I tested 4.4.dev7 on Linux/Firefox and it seems to run ok for me. |
I just tried it again on 1aaf20b, and this time got the error:
This is running in Google Chrome Version 131.0.6778.205 (Official Build) (x86_64) on macOS Sequoia 15.2, where the web editor was compiled with Emscripten 3.1.64:
The command used to compile was:
|
I'm having the same issue. I'm investigating. |
Apply suggestions from code review Co-authored-by: A Thousand Ships <[email protected]> Fix includes Update editor/editor_node.cpp Co-authored-by: Hugo Locurcio <[email protected]>
d8d9c50
to
6b33037
Compare
Thanks for looking into it - I'm happy to hear, at least, that it isn't a weird issue isolated to my computer 😅 I rebased the branch and fixed merge conflicts. The now-redundant web ZIP export still needs to be removed, which we can do once we have the base web editor build working again. I'll be out of town until the 14th, and I may not be able to do a lot of work on it until I return. I will certainly try my best to do whatever I can, though! |
Let's merge this for now, and solve the redundant option for the Web editor once we actually get the Web editor to run again. |
Sounds good, thanks! |
Thanks! |
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?)