[PyQt] Re: py2app generates huge files (200MB)

Hans-Peter Jansen hpj at urpla.net
Sun Jun 28 00:01:57 BST 2009


Am Samstag, 27. Juni 2009 schrieb Michael Held:
> hi again,
>
> I think I did not fully understood it: of course can I compress
> everything and put it on a website/ftp. but is there a way to run an app
> with compressed parts, e.g. resources or a lot of Python scripts? but
> this is maybe not the right forum to discuss about...

Sure, there is: it's called PyInstaller, and has the ability to pack 
everything into one file or one dir, extracting it on the fly, with minimal 
consequences for the code (data files like translations has to cope with 
the "dynamic relocation").

While I advertise this project here, I'm fighting with two issues ATM:
 - it opens an (unwanted) terminal window, everytime I start my app 
   (although I deactivated the "run in terminal window" for all 3 kinds
   of Python Launcher types), and echos something silly into it, e.g. 
   /path/to/my/app; exit
 - I cannot create an .app bundle from the image: is does work fine, when
   started directly (apart from the terminal window problem), but not when
   the .app is executed: the icon jumps for a few seconds, and that's it.

BTW, my app (an sdi main window with just a few tabs atm) claims to be an 
universal binary for both archs is 16 MB in one file format, and that's not 
yet compressed with upx/lzma. I haven't tested the intel arch, though.

Since it still includes stuff like chinese, japanese, korean and taiwan 
codecs, there's still room for improvement, I guess. 

Let's hope, that Giovanni is able to fix these issues soon (I started 
playing with PyInstaller this Friday, and reported them yesterday), then 
this is far superior to py2app. 

We'll see,
Pete


More information about the PyQt mailing list