Re: [pygame] EXE: Narrowing Down the Problem

2009-09-18 Thread René Dudfield
did you read the previous reply to your post?  There's a link in there
to a working setup.py for python2.6 + pygame.

cheers,


Re: [pygame] EXE: Narrowing Down the Problem

2009-09-18 Thread Kris Schnee
On Fri, 18 Sep 2009 08:10:06 +0100, René Dudfield ren...@gmail.com
wrote:
 did you read the previous reply to your post?  There's a link in there
 to a working setup.py for python2.6 + pygame.
 
 cheers,

Yes, thanks. The link to
http://blog.thadeusb.com/2009/04/15/pygame-font-and-py2exe/.

I tried the advice at the top of that page -- copying DLLs -- and that
didn't help. I tried the setup.py and that crashed. “can’t copy
‘installer.nsi’: doesn’t exist or not a regular file”. Odd
considering that installer.nsi isn't on the computer at all. I even got a
Tkinter warning at some point in running that, which is doubly odd because
I don't use Tkinter in my code, haven't used it since installing Python,
and deleted the build directory from previous attempts at this. I tried
asking around on a forum as well, but the advice consisted of that same
link.

This is all with a minimal Pygame program, with a freshly installed copy of
Python, Pygame and Py2EXE, on two different computers, one of which has
built EXEs fine before. And I did manage (when experimenting on the other
last night) to make an EXE if I hacked the entire widget interface out of
my program to eliminate font module references.

Could it be that I'm doing something wrong with the basic steps involved?
-Copy the .py files used in the program to C:\Python26
-Have a setup.py in that directory too
-Open a command prompt and go to C:\Python26
-Type python setup.py py2exe
-Go to C:\Python26\dist
-Copy relevant graphics c. directories into C:\Python26\dist; N/A for test
program
-Type the program's name as an EXE
-Copy *.dll from C:\Python26\libs\site-packages\pygame when that doesn't
work, along with freesansbold.ttf, and try again.

Or could there be some interference caused by other software on my laptop
*and* on a just-bought netbook? I'm trying to find an explanation here as
to whether I'm doing something basically wrong in the process of building
this, or whether I'm genuinely running the same software with the same
commands and getting a completely different result from everyone else.



Re: [pygame] EXE: Narrowing Down the Problem

2009-09-18 Thread James Paige
On Fri, Sep 18, 2009 at 03:36:35PM +, Kris Schnee wrote:
 Could it be that I'm doing something wrong with the basic steps involved?

I can't tell you if this is causing your problems, but you definitely 
don't want to be copying your .py file or anything else into C:\Python26

You should not be manually modofying that directory or anything in it.

 -Copy the .py files used in the program to C:\Python26
 -Have a setup.py in that directory too
 -Open a command prompt and go to C:\Python26

Your program should be somewhere else. I usually keep mine in My 
Documents\src\projectname

 -Type python setup.py py2exe
 -Go to C:\Python26\dist
 -Copy relevant graphics c. directories into C:\Python26\dist; N/A for test
 program
 -Type the program's name as an EXE
 -Copy *.dll from C:\Python26\libs\site-packages\pygame when that doesn't
 work, along with freesansbold.ttf, and try again.

I don't know whether working in the C:\python26 directory could be 
interfering with the operation of py2exe, but it is not impossible.

I have done all of my py2exe packaging using python 2.5
If I get a chance to upgrade to 2.6 I'll let you know if your simple 
text case works for me.

---
James Paige