pygame / distutils

View: New views
5 Messages — Rating Filter:   Alert me  

pygame / distutils

by Adam Walley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, All.

I have been struggling to get things working with pygame. From trawling through newsgroups, repositories, and various other places, I have not found any conclusive method of getting pygame up and running on the WinCE platform. I think half of the problem is that I am unsure about the entire structure of pygame, and which parts need to be tweaked to get things working. So far, I have grasped the following:

- I have the latest pygame source files
- I have or can probably get a working SDL.dll, which is vital to pygame either by downloading someone else's effort or cross-compiling my own from the libSDL sources (I realise that SDL_ttf, mixer, image and others are also useful, but I was just aiming to get the core working first)
- distutils seems to be required to install pygame, but is not available for WinCE

Problems I have not been able to solve yet / would greatly appreciate input & comments on:

- is there already a way to get distutils working with PythonCE? If so, where can it be found? If not, then:
- what exactly does distutils do? I need to know this so that workarounds/manual tests can be done to try and achieve the same results either by tweaking the existing code or writing some alternate code to do this job - after all, if distutils simply copies all the files in the correct file structure, then this can be done manually (at least initially to get things running).
- are there any registry entries that need to be made, or does PythonCE automatically recognise that a new site-package is present and do all the necessary?

I apologise if I am repeating any issues which have already been addressed (please point me in the right direction).

I would be interested to hear from anyone who has succeeded/failed on this. I think pygame is a fantastic tool, and would love to get it working with PythonCE.

Adam.


_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Parent Message unknown Re: pygame / distutils

by Christopher Fairbairn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Sat 26/07/08 05:13 , "Adam Walley" adam.walley@... sent:
> - is there already a way to get distutils working with PythonCE?

There has been recent discussions about this, but at current I don't bieleve there is anything available.

With respect to SDL and pygame it should be fairly easy to get the various python modules compiled. There have been a couple of
releases built for PythonCE in the past and I've personally compiled from source a couple of times.

The SDL project has an additional ZIP file that contains Windows CE (Pocket PC) compatible project files that will allow you to
build a suitable dll.

If you look at the distutils based installation files for the pygame distribution you can determine which source files need to be
compiled into the various python modules (*.pyd). What I did was then manually create project files for Visual Studio to build
these DLLs (you will need a source release of PythonCE itself for this, as to build a module you will require the python header
files).

Once I had all the pygame dlls compiled it was then simply a matter of copying them to the correct folder on the PDA. There was no
registry settings etc involved.

One thing to keep in mind is that some of the sample apps within the Pygame distribution won't work on a PDA without minor
modifications. For example they commonly request a window size which is larger than the PDA's screen, and don't account for the
lack of current working directory support when specifying file names for bitmap resources etc.

Hope this helps,
Christopher Fairbairn

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: pygame / distutils

by Adam Walley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christopher and Jared,
 
Thank you for your comments. Christopher would you agree about the sluggishness once pygame is running on a PDA? I suppose I am not too bothered at the moment. For my purposes just being able to access audio and drawing to screen would be fine - though I'm sure sooner or later speed will be needed too.
 
One additional obstacle I face is some extra fiddling to get the compiling done on PellesC (I do not own VS and I believe the free version does not support WinCE compilation).
 
Anyhow, I will attempt to get something working, and if it gives respectable results I will report back.
 
Thanks again for your input.

Adam
 
On 26/07/2008, Christopher Fairbairn <christopher@...> wrote:
Hi,

On Sat 26/07/08 05:13 , "Adam Walley" adam.walley@... sent:
> - is there already a way to get distutils working with PythonCE?

There has been recent discussions about this, but at current I don't bieleve there is anything available.

With respect to SDL and pygame it should be fairly easy to get the various python modules compiled. There have been a couple of
releases built for PythonCE in the past and I've personally compiled from source a couple of times.

The SDL project has an additional ZIP file that contains Windows CE (Pocket PC) compatible project files that will allow you to
build a suitable dll.

If you look at the distutils based installation files for the pygame distribution you can determine which source files need to be
compiled into the various python modules (*.pyd). What I did was then manually create project files for Visual Studio to build
these DLLs (you will need a source release of PythonCE itself for this, as to build a module you will require the python header
files).

Once I had all the pygame dlls compiled it was then simply a matter of copying them to the correct folder on the PDA. There was no
registry settings etc involved.

One thing to keep in mind is that some of the sample apps within the Pygame distribution won't work on a PDA without minor
modifications. For example they commonly request a window size which is larger than the PDA's screen, and don't account for the
lack of current working directory support when specifying file names for bitmap resources etc.

Hope this helps,
Christopher Fairbairn

_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce


_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: pygame / distutils

by jabapyth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For compilation have you tried CeGCC? (http://cegcc.sourceforge.net/)

Adam Walley wrote:

> Christopher and Jared,
>  
> Thank you for your comments. Christopher would you agree about the
> sluggishness once pygame is running on a PDA? I suppose I am not too
> bothered at the moment. For my purposes just being able to access
> audio and drawing to screen would be fine - though I'm sure sooner or
> later speed will be needed too.
>  
> One additional obstacle I face is some extra fiddling to get the
> compiling done on PellesC (I do not own VS and I believe the free
> version does not support WinCE compilation).
>  
> Anyhow, I will attempt to get something working, and if it gives
> respectable results I will report back.
>  
> Thanks again for your input.
>
> Adam
>  
> On 26/07/2008, *Christopher Fairbairn* <christopher@...
> <mailto:christopher@...>> wrote:
>
>     Hi,
>
>     On Sat 26/07/08 05:13 , "Adam Walley" adam.walley@...
>     <mailto:adam.walley@...> sent:
>     > - is there already a way to get distutils working with PythonCE?
>
>     There has been recent discussions about this, but at current I
>     don't bieleve there is anything available.
>
>     With respect to SDL and pygame it should be fairly easy to get the
>     various python modules compiled. There have been a couple of
>     releases built for PythonCE in the past and I've personally
>     compiled from source a couple of times.
>
>     The SDL project has an additional ZIP file that contains Windows
>     CE (Pocket PC) compatible project files that will allow you to
>     build a suitable dll.
>
>     If you look at the distutils based installation files for the
>     pygame distribution you can determine which source files need to be
>     compiled into the various python modules (*.pyd). What I did was
>     then manually create project files for Visual Studio to build
>     these DLLs (you will need a source release of PythonCE itself for
>     this, as to build a module you will require the python header
>     files).
>
>     Once I had all the pygame dlls compiled it was then simply a
>     matter of copying them to the correct folder on the PDA. There was no
>     registry settings etc involved.
>
>     One thing to keep in mind is that some of the sample apps within
>     the Pygame distribution won't work on a PDA without minor
>     modifications. For example they commonly request a window size
>     which is larger than the PDA's screen, and don't account for the
>     lack of current working directory support when specifying file
>     names for bitmap resources etc.
>
>     Hope this helps,
>     Christopher Fairbairn
>
>     _______________________________________________
>     PythonCE mailing list
>     PythonCE@... <mailto:PythonCE@...>
>     http://mail.python.org/mailman/listinfo/pythonce
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> PythonCE mailing list
> PythonCE@...
> http://mail.python.org/mailman/listinfo/pythonce
>  
_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce

Re: pygame / distutils

by Alexandre Delattre :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've been able to make pygame-ctypes works with SDL.dll and
SDL_Image.dll built from "unofficial" wince project files of SDL, with
very minimal changes.

I'm keen to package this and make it public, but you must note this is
very experimental and  is a bit slow. The constraints explained by
Christopher, especially regarding current directory support, applies
here too.

I did not manage to compile the C version with evc++4 but I'd like to
give a try later with cegcc, unfortunately I do not have the time for
this yet.

Also, before rushing in compilation, it may be interesting to benchmark
pygame and pygame-ctypes on desktop to evaluate if there would be a
really speed gain in using a compiled version.

As pygame is mostly a wrapper around SDL, I found it hard to evaluate
the overhead caused by using ctypes instead of c code. A benchmark would
help us to see clearer.

Regards,
Alexandre
_______________________________________________
PythonCE mailing list
PythonCE@...
http://mail.python.org/mailman/listinfo/pythonce