Use 7z to create more efficient ZIP archives
For a full set of Godot 4.1.1 editor + export template builds, this saves 28 MB without affecting decompression times or archive compatibility. Any ZIP decompression software can decompress these 7z-created ZIP archives; they use the standard DEFLATE algorithm.
Creating archives is expected to be about twice as slow as zip -9, but given the bandwidth and download time savings, it's probably worth it.
For Mono builds, size savings are expected to be even larger as these builds are larger in the first place. Future versions will also logically benefit more from this change, as their binaries expected to keep growing over time.
Note: I haven't tested the script locally, so I advise performing a dry run before merging. Both the machine build-release.sh is run on and the macOS machine used for signing releases must have 7z installed and in PATH. On Ubuntu, this can be done using sudo apt install p7zip-full. On Fedora, this can be done using dnf install p7zip. On macOS, this can be done using brew install sevenzip with Homebrew.
- This closes https://github.com/godotengine/godot-website/issues/120.
Before
Official releases as downloaded from https://downloads.tuxfamily.org/godotengine/4.1.1/.
817,195,141 Godot_v4.1.1-stable_export_templates.tpz
47,264,118 Godot_v4.1.1-stable_linux.x86_32.zip
54,436,186 Godot_v4.1.1-stable_linux.x86_64.zip
104,426,977 Godot_v4.1.1-stable_macos.universal.zip
26,028,541 Godot_v4.1.1-stable_web_editor.zip
49,422,199 Godot_v4.1.1-stable_win32.exe.zip
54,161,086 Godot_v4.1.1-stable_win64.exe.zip
After
Official releases downloaded, extracted and recompressed with 7z a -mx9. For the export templates TPZ, both the TPZ itself and ZIP files contained within were recompressed.
797,372,026 Godot_v4.1.1-stable_export_templates.tpz
46,153,580 Godot_v4.1.1-stable_linux.x86_32.zip
53,220,111 Godot_v4.1.1-stable_linux.x86_64.zip
101,821,948 Godot_V4.1.1-stable_macos.universal.zip
25,215,322 Godot_v4.1.1-stable_web_editor.zip
48,186,220 Godot_v4.1.1-stable_win32.exe.zip
52,936,912 Godot_v4.1.1-stable_win64.exe.zip
Needs rebase after #90. Then I'll test and see if I can merge for the next beta.