[Pythonmac-SIG] Building pythonw OSX app
Bob Ippolito
bob at redivi.com
Mon Mar 1 21:08:53 EST 2004
On Mar 1, 2004, at 8:51 PM, jeffm at cruzio.com wrote:
> Hi,
>
> I've developed a Mac program with MacPython 2.3 and Pygame on OS 10.3.
> It runs from the command line fine, but how should I turn it into a
> stand-alone OSX application?
>
> Thanks,
> Jeff
>
> P.S.
> * I tried "Save as Applet..." from the IDE and BuildApplet. These
> don't work, possibly because my program requires "pythonw" rather than
> "python"?
> * I tried running MacPython-2.3/Extras/Tools/freeze/freeze.py, but it
> gives an error:
> Error: needed directory
> /System/Library/Frameworks/Python.framework/Versions/2.3/include/
> python2.3 not found
> And it's true that there is no "include" directory inside the 2.3
> directory. It gives the same error if I try to build the sample
> hello.py, but the help-recommended solution (do "make install")
> doesn't seem to make sense in any main python directories I can find.
> * I've also seen questions on the web about BuildApplication and
> bundlebuilder, but I haven't found these programs.
bundlebuilder is the only thing you should be trying to use on OS X.
You already have it. It's a module that comes with any OS X build of
Python 2.3. The best resource for bundlebuilder right now is:
http://pythonmac.org/wiki/BundleBuilder
It's quite difficult to do right now for pygame-using applications, so
be prepared to sink some time into it. You will need to include the
entire pygame package (it won't work from a --semi-standalone zip
file), and each dependent framework/library (all of the SDL frameworks,
smpeg, ogg, and vorbis, I believe.. but that may not be quite all of
them). Making an OS X 10.2 compatible bundle will also be VERY
difficult, and requires things that I'm not even willing to attempt or
explain at the moment. For now, If you have to do it, do it on an OS X
10.2 machine.
I'm working on a branch of bundlebuilder that is a lot smarter about
stuff like this (but backwards compatibility is basically impossible
with a regular environment, so don't hold your breath on that one), but
it's not complete enough to make pygame easier to bundle.
If you have an immediate need and your application is open source (or
are willing to pay a small fee), then I'll probably have time to write
an applet-building script for you if you point me at the source.
-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040301/05199741/smime.bin
More information about the Pythonmac-SIG
mailing list