[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Pygame on Mac Q



Bill,

Okay, first suggestion.. please download/install the latest pygame, my 
distribution isn't the most recent and I made a few small changes to the 
mac features that should make debugging somewhat easier.  sudo python 
setup.py install will work perfectly if you have the developers tools 
installed, and my distribution of the previous version.

I don't know why lesson6 does not work, nor do I really have time to 
look into it... but I would guess that it tries to use some sort of 
texture feature or vertex arrays that aren't supported by my compilation 
of pyOpenGL.  I can't say if they're supported by OS X, or at least the 
ATI drivers, with any authority.. but I *really* don't think they are, 
because I tried pretty hard to get them to work and I couldn't find any 
examples that used them successfully (outside of the python arena, this 
was when I was porting pyOpenGL).

I've never tried idle, but if you have the latest version of pygame 
installed, "/usr/local/bin/python mypythonfile.py" will work as 
expected.  I had to do some nasty undocumented shit, and I have some 
nonworking, even nastier, code to get it to work as just "python 
mypythonfile.py" or "./mypythonfile.py" with #!/usr/bin/env python in 
the top.. but it's some crazy stuff that screws with the stack at 
runtime.  One day I'll come back to it, but I'm pretty busy as of late.

You're not going to find any useful Apple documentation.  Sorry.  Some 
of the stuff I've had to do was reverse engineered from gdb backtraces 
and symbol dumps from libraries.  I also had the occasional tidbit of 
help from the one or two mac gurus that reside in #macdev@opn on 
occasion (I think they work for apple).  If you want to write mac 
applications, you should write them within the carbon or cocoa 
framework, if you do otherwise you're totally on your own..  I found 
this out the really hard way, but hey, at least I got this stuff working 
right?  Vanilla builds of stuff isn't going to be good as of yet, I had 
to make some patches to the 2.2 source code (i.e. the option thing where 
you have the capability to pass argv was my doing) and the SDL source 
code (apple-q, dock icons changing, few other things).  It's my 
understanding that some of my changes have made it into the CVS for both 
of these, but I haven't touched any of this stuff since the release 
you're using.

I've been quite busy working to pay the bills and stuff.  I do plan to 
come back to it all and make another distribution sometime in the sooner 
than later future, but I can't make any guarantees as I've got some more 
freelance projects lined up for next month too so.. time might be short.

-bob


On Wednesday, February 27, 2002, at 12:43 PM, bweiland@chiinc.com wrote:

> Hi,
>
> I have some questions on pygame under Mac OS X.  I downloaded Bob 
> Ippolito's
> very nice distribution and got (some) pygame/pyopengl examples to run
> quickly.  I encountered problems with some examples (e.g., lesson6.py 
> from
> the NeHe demos -- I realize this is actually pyOpengl/glut) where the 
> python
> interpreter on Mac uses the applications directory as the current 
> working
> directory, rather than the python script's directory (which seems to be 
> the
> usual functioning under Unix and Windows).
>
> Since I'd like to stay portable, is there a good way to work around 
> this?
>
> Also, I'm trying to understand Bob's instructions about running from the
> terminal.app vs. the finder -- if I want debugging info, backtrace, 
> etc.,
> what's the right way to achieve this (can't see how to do this even with
> option-click launching)?  Has anyone been successful in getting Idle to
> work?
>
> Finally (sorry, lots of q's), I'm trying to get a better handle on why 
> OS X
> has this seemingly weird dichotomy between Unix functionality and Mac
> functionality (launching a unix process that subsequently creates 
> windows,
> etc. doesn't work well if you don't do things the proper mac way - app
> resources and all that).  Basically, Bob makes a few comments that 
> indicate
> this, but I'm looking for explanation in Apple documentation, and 
> haven't
> found anything too useful.  I'd really like to be able to just build
> unix-style apps (even just use a vanilla unix build of python to invoke 
> SDL,
> etc), and want to understand how to do this (or at least, why I can't).
>
> Thanks for any ideas!
>
> Bill Weiland

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org