[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: [Py2exe-users] Error with pygame



Try

http://thadeusb.com/weblog/2009/4/15/pygame_font_and_py2exe

--
Thadeus




On Thu, Oct 28, 2010 at 6:23 PM, Zachary Uram <netrek@xxxxxxxxx> wrote:
Trying to build a pygame app and running into an error.

I have installed: python-2.6.amd64.msi, pygame-1.9.1.win32-py2.6.msi,
and py2exe-0.6.9.win64-py2.6.amd64.exe
Running Windows 7 Ultimate (x64)

Here is my setup program name pygame2exe.py:

##################################################
from distutils.core import setup
import py2exe, pygame
import glob, shutil

setup(windows=["__init__.py"],
name='Netrek Pygame',
version='0.3.1',
description='Netrek Pygame Client',
author='James Cameron',
author_email='',
url="" href="http://www.netrek.org" target="_blank">www.netrek.org',
py_modules=['__init__','cache','cap','client','constants','mercenary','meta','mis','motd','options','rcd','repair','test-cairo','test-keys','util']
)

shutil.copytree('data', 'dist/data')
shutil.copyfile('freesansbold.ttf', 'dist/freesansbold.ttf')
##################################################

I've never done this before so I'd like some feeback. __init__.py is
the main program file and the other python files are cache.py, cap.py,
etc. so I listed them all under "py_modules=" was that correct?

Anyways here is what happens when I try to build:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. ÂAll rights reserved.

C:\Users\Administrator>cd C:\Users\Administrator\Desktop\python\netrek-client-py
game-0.6\netrek

C:\Users\Administrator\Desktop\python\netrek-client-pygame-0.6\netrek>dir
ÂVolume in drive C has no label.
ÂVolume Serial Number is 26DD-5AA7

ÂDirectory of C:\Users\Administrator\Desktop\python\netrek-client-pygame-0.6\net
rek

10/28/2010 Â06:25 PM Â Â<DIR> Â Â Â Â Â.
10/28/2010 Â06:25 PM Â Â<DIR> Â Â Â Â Â..
03/27/2010 Â10:55 PM Â Â Â Â Â Â 6,101 cache.py
05/17/2009 Â09:56 PM Â Â Â Â Â Â 3,587 cap.py
03/27/2010 Â11:21 PM Â Â Â Â Â Â10,585 client.py
10/12/2010 Â03:11 AM Â Â Â Â Â Â 6,691 constants.py
06/30/2008 Â10:39 PM Â Â Â Â Â Â98,600 freesansbold.ttf
03/27/2010 Â06:43 AM Â Â Â Â Â Â 2,777 mercenary.py
12/15/2009 Â02:49 AM Â Â Â Â Â Â 4,423 meta.py
09/19/2010 Â07:57 AM Â Â Â Â Â Â 1,046 mis.py
09/20/2010 Â09:33 PM Â Â Â Â Â Â Â 692 motd.py
02/27/2010 Â07:18 PM Â Â Â Â Â Â 3,414 options.py
06/30/2008 Â10:39 PM Â Â Â Â Â Â 1,078 pygame.ico
10/28/2010 Â06:25 PM Â Â Â Â Â Â Â 514 pygame2exe.py
10/28/2010 Â06:21 PM Â Â Â Â Â Â 5,647 pygame2exe2.py
03/31/2009 Â04:52 AM Â Â Â Â Â Â 7,690 rcd.py
07/07/2008 Â03:11 AM Â Â Â Â Â Â Â 465 repair.py
07/09/2008 Â03:34 AM Â Â Â Â Â Â Â 713 test-cairo.py
03/24/2010 Â10:39 PM Â Â Â Â Â Â Â 374 test-keys.py
02/23/2010 Â09:36 PM Â Â Â Â Â Â 1,229 util.py
10/12/2010 Â03:16 AM Â Â Â Â Â 180,674 __init__.py
      Â19 File(s)    Â336,300 bytes
       2 Dir(s) Â10,690,691,072 bytes free

C:\Users\Administrator\Desktop\python\netrek-client-pygame-0.6\netrek>python
Python 2.6 (r26:66721, Oct Â2 2008, 11:06:43) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> (exit)
Use exit() or Ctrl-Z plus Return to exit
>>> exit()

C:\Users\Administrator\Desktop\python\netrek-client-pygame-0.6\netrek>python
pygame2exe.py py2exe
C:\Python26\lib\site-packages\py2exe\build_exe.py:16:
DeprecationWarning: the sets module is deprecated
Âimport sets
Traceback (most recent call last):
ÂFile "pygame2exe.py", line 2, in <module>
 Âimport py2exe, pygame
ÂFile "C:\Python26\lib\site-packages\pygame\__init__.py", line 95, in <module>
 Âfrom pygame.base import *
ImportError: DLL load failed: %1 is not a valid Win32 application.

Any help would be greatly appreciated.

Zach

<>< http://www.fidei.org ><>

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in ÂU.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Py2exe-users mailing list
Py2exe-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/py2exe-users