Zipped apps are common way to publish apps :) OS X can unzipp them and users can run the app. Another way is to make a disk image (DMG) and place the app in the disk image. Compressed DMG has the size close to a ZIP archive, and can have nice installer (a.k.a. copy to Applications), readmes etc.<br>
<br>15MB Zipped is the "ok" size :) <br><br>As for the PyQt4 installer - you have to compile it, but the final py2app made app doesn't require for the user to install anything. The app will run on it's own :)<br>
<br><br><div class="gmail_quote">W dniu 27 czerwca 2009 14:03 użytkownik Michael Held <span dir="ltr"><<a href="mailto:michael.held@bc.biol.ethz.ch">michael.held@bc.biol.ethz.ch</a>></span> napisał:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi piotr,<br>
<br>
yes, it looks like PyQt4 is using a lot of Pythons standard packages, so<br>
all the files in Contents/Resources/lib/python2.6/lib-dynload are most<br>
probably needed...<br>
<br>
I zipped and got 70MB with Qt debug files (from 200MB)<br>
and 15MB without (from 43MB).<br>
is there a way to provide an .app file with zipped content which is<br>
unzipped on the fly?<br>
<br>
currently there is not installer for PyQt4.5 on MacOS available, right?!<br>
I was compiling everything from scratch (I am also working with<br>
Stackless Python 2.6.2). I guess there is a way to compile PyQt4 in<br>
universal mode... somehow ;-)<br>
<br>
thanks a lot again! :-)<br>
<div class="im">cheers<br>
michael<br>
<br>
<br>
piotr maliński wrote:<br>
</div><div class="im">> Debug libraries don't get excluded by "excludes" list so they will have<br>
> to be removed. Also the package includes everything needed to run it -<br>
> also some Python components.<br>
> /Contents/Resources/lib/ 9,5 MB in my case<br>
> /Contents/Frameworks/ 24,8 MB<br>
><br>
> And it zipps to 12MB<br>
><br>
> Note that the resulting binary has some symlinks (in libs for example)<br>
> and calculating size on Mac OS X will count the symlinked (alias) files<br>
> in :) So check zipped size :)<br>
><br>
> If you used Qt with Qt Creator or custom Qt compilation on Intel Mac<br>
> then you have Intel-only Qt and you will get Intell only App. If you<br>
> used the Qt DMG without Qt Creator then you got Universal Qt and your<br>
> app will be universal and DOUBLE size :) (22-24MB Zipped for<br>
> qtcore/qtgui app).<br>
><br>
><br>
> 2009/6/27 Michael Held <<a href="mailto:michael.held@bc.biol.ethz.ch">michael.held@bc.biol.ethz.ch</a><br>
</div><div><div></div><div class="h5">> <mailto:<a href="mailto:michael.held@bc.biol.ethz.ch">michael.held@bc.biol.ethz.ch</a>>><br>
><br>
> hi piotr,<br>
><br>
> thanks a lot for your help!<br>
><br>
> aral balkan writes on his page that one "can remove the Qt debug files".<br>
> these are ~150MB in my case and the *biggest* part of the problem.<br>
> I guess I need to write a "better" Qt4 recipe for pyapp or I have to add<br>
> some kind of clean-up step after the execution of py2app...<br>
><br>
> furthermore Contents/Resources/lib/python2.6/lib-dynload contains ~14MB<br>
> of python packages which are not used by my "empty" script (and I assume<br>
> PyQt4 is not using those as well...<br>
><br>
> again, I am happy with a 40MB .app file but a 200MB file just to much<br>
> overhead.<br>
><br>
> does anybody know how to tweak the PyQt4 recipe of py2app? I had a short<br>
> look on the code but could not find the right script.<br>
> or would it be helpful to work with the latest svn revision instead the<br>
> released version 0.3.6?<br>
><br>
> cheers<br>
> michael<br>
><br>
><br>
><br>
> piotr maliński wrote:<br>
> > check out my tutorial:<br>
> > <a href="http://www.rkblog.rk.edu.pl/w/p/building-mac-os-x-applications-py2app/" target="_blank">http://www.rkblog.rk.edu.pl/w/p/building-mac-os-x-applications-py2app/</a><br>
> ><br>
> > QtCore/QtGui app zipped should be about 12MB intel-only (22MB if<br>
> you use<br>
> > Universal Qt - thus making universal py2app application)<br>
> ><br>
> > 2009/6/27 Michael Held <<a href="mailto:michael.held@bc.biol.ethz.ch">michael.held@bc.biol.ethz.ch</a><br>
> <mailto:<a href="mailto:michael.held@bc.biol.ethz.ch">michael.held@bc.biol.ethz.ch</a>><br>
> > <mailto:<a href="mailto:michael.held@bc.biol.ethz.ch">michael.held@bc.biol.ethz.ch</a><br>
> <mailto:<a href="mailto:michael.held@bc.biol.ethz.ch">michael.held@bc.biol.ethz.ch</a>>>><br>
> ><br>
> > hi pyqt,<br>
> ><br>
> > I am using PyQt4.5 and py2app 0.3.6 on MacOS 10.5<br>
> ><br>
> > > from setuptools import setup<br>
> > ><br>
> > > APP = ['MyApp.py']<br>
> > > DATA_FILES = []<br>
> > > OPTIONS = {'argv_emulation': True,<br>
> > > 'includes': [],<br>
> > > }<br>
> > ><br>
> > > setup(<br>
> > > app=APP,<br>
> > > data_files=DATA_FILES,<br>
> > > options={'py2app': OPTIONS},<br>
> > > setup_requires=['py2app'],<br>
> > > )<br>
> ><br>
> > running this setup.py PyQt4, sip and the Qt framework are<br>
> detected and<br>
> > the app runs fine,<br>
> ><br>
> > *BUT* the app is 200MB (TWOHUNDRET MEGABYTES) big and its<br>
> doing nothing<br>
> > but opening an empty QFrame.<br>
> > I looked into the app-contents and found a lot of debug stuff<br>
> for the<br>
> > QtGui/QtCore Frameworks.<br>
> ><br>
> > after deleting these files the app was still running fine and<br>
> only 42MB<br>
> > big (I found a lot of Pyhton libs/packages in there which are<br>
> not used<br>
> > at all)<br>
> ><br>
> > 42MB for an "empty program" is ok, since all my scripts will<br>
> not add<br>
> > much size, but 200MB is just *too big*.<br>
> > it looks like py2app is including a lot of unnecessary stuff...<br>
> > could stackless Python 2.6.2 is the problem?<br>
> ><br>
> > thanks a lot for your help!<br>
> > michael<br>
> ><br>
> > _______________________________________________<br>
> > PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
> <mailto:<a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>><br>
</div></div>> > <mailto:<a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<div><div></div><div class="h5">> <mailto:<a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>>><br>
> > <a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
> ><br>
> ><br>
><br>
> _______________________________________________<br>
> PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
> <mailto:<a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>><br>
> <a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
><br>
><br>
<br>
_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
</div></div></blockquote></div><br>