nwjs-shell-builder icon indicating copy to clipboard operation
nwjs-shell-builder copied to clipboard

Binaries are gigantic.

Open ryanpcmcquen opened this issue 6 years ago • 4 comments

On my last build I ran out of disk space, because the resulting .zip files were between 30-40 GB for Linux and Mac builds. Is there a config I have messed up somewhere or has something changed in recent versions of nw.js (I am using 0.33.4). Here is my build script: https://github.com/ryanpcmcquen/Simple/blob/master/build_desktop_apps.sh

ryanpcmcquen avatar Sep 26 '18 13:09 ryanpcmcquen

He @ryanpcmcquen last build we used NW was 0.12 to tell the truth :( I am not even sure this script is running.

Maybe try to wget https://github.com/Gisto/nwjs-shell-builder/archive/d4484401a9c5475e9cf9cdd36d3314e5111f5333.zip, I think this is last version I was able to build NW 0.12.

We've switched to electron for newer Gisto because NW was a hell to package. Feel free to ask if anything If I can I'll try to assist.

sanusart avatar Sep 26 '18 17:09 sanusart

On macOS, one way to slim down would be to not have two separate copies at:

Contents/Versions/[version]/nwjs Framework.framework/Versions/A Contents/Versions/[version]/nwjs Framework.framework/Versions/Current

In this case, Current should be a symlink to A.

digason avatar May 24 '19 14:05 digason

On further inspection, there are actually three copies:

Contents/Versions/[version]/nwjs Framework.framework Contents/Versions/[version]/nwjs Framework.framework/Versions/A Contents/Versions/[version]/nwjs Framework.framework/Versions/Current

With the only difference being that the root version also contains:

libffmpeg.dylib libnode.dylib

Which raises the question, is the Versions directory in the app build even needed?

digason avatar May 24 '19 15:05 digason

@ryanpcmcquen @sanusart

The following commit may resolve your build bloat. My macOS builds on a very small project reduced by about 60%

https://github.com/Gisto/nwjs-shell-builder/pull/13/commits/ec644737e7a82758c97f25828500f60a3069acf6

digason avatar May 24 '19 18:05 digason

Resolved in #13

ayushmanchhabra avatar May 26 '23 12:05 ayushmanchhabra