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

Re: [pygame] making game distribution easier, part 1.



On Tue, Dec 8, 2009 at 10:06 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> It would be wonderful to have something like this, but you have difficulties
> with getting the right version and platform for your game's dependencies
> that I don't see how to get around so simply.
>
> what py2exe and py2app did was to go find all your game's python
> dependencies in your site-packages dir, and put them into the binary game
> package. The great thing about that, is that it would take the smallest part
> of the (working and tested) system configuration you have, and put that into
> the package.
>

yeah, those have good and bad things about the approach.  Mostly
people have found it hard to work with, and not very robust.  Also
people can ask others to make their windows .exe for them, or their
.dmg (for mac).

Just copying files in is quite robust.

> So for instance, lets say your game uses wxPython, and in particular you
> developed and tested it with 2.3.0.111 (or whatever).  So you've got your
> system, and it works great, then py2exe/py2app makes a zip that includes all
> your game's code, plus wxPython 2.3.0.111.
>
> So then if wxPython 2.3.1.200 comes out, and breaks your game (lets say a
> bug they fixed in the scroll bar modules makes your level picking screen
> that counted on the bug stop working, so users can't pick levels). With the
> py2exe/py2app thing, the great part is 2.3.0.111 is embedded, so your
> package keeps working.
>


Yeah, this would be a problem.  However, old launchers should be
available mostly.  Also this problem exists now anyway for people on
different platforms.  New versions of modules often break py2app or
py2exe in different ways.


> Also, wxPython 2.3.1.111 has different binary files on Mac OS X and Windows
> and Linux (and for flavors of linux and for unicode vs single-byte strings
> as well). When you installed wxPython, you only got that subset relevant for
> your platform. So to cross build for another platform, you need a different
> install package.
>
> So how would such a simple system as the one you describe get around that
> kind of stuff?
>

This would be a downside of this technique.

For libraries not already installed, you would have to include the
directories inside the launcher.  I guess by trying to copy in the
directories from the site-packages dir... or otherwise.  Otherwise
people can see to get things installed by default.  Or they could make
wx launchers available.  However, I'm not sure that something like wx
would be installed by default in the launchers I make.

To start with, I'm going to just try with numpy, pygame, pyopengl.