fbs icon indicating copy to clipboard operation
fbs copied to clipboard

Could fbs work with UPX and minimize freeze size?

Open liuh886 opened this issue 5 years ago • 1 comments

Thanks your great job. I still have an issue about fbs.

I create a blank project by fbs in minimal virtualenv, and got a 92.8 MB folder after freeze. Looks like half size (about 45 MB) is PyQt5 folder, and the rest are xxx.dll or something else.

I start coding with numpy, pandas and matplotlib, the size is over 200 MB.

So far, I did't find any option about UPX setting, the spec files of Pyinstaller is always "UPX=false".

My app is quite small, only hundred lines, Is there any good idea about minimized package size?

liuh886 avatar Feb 28 '19 12:02 liuh886

fbs currently doesn't support UPX. But you can write a custom build script to invoke fbs.freeze.run_pyinstaller with extra_args that enable UPX. But I don't think it will significantly change the size of the frozen app.

I think that you will get better results by simply deleting some of the .dll files from your target/MyApp folder. You'll have to see which DLLs can be deleted this way, with your app still working. Once you have identified DLLs that can be deleted, you can again write a custom build script that overwrites the freeze command, invokes fbs's built-in one, then deletes the DLLs.

mherrmann avatar Mar 04 '19 07:03 mherrmann