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

Re: [pygame] Distributing a Pygame game on Linux



Hi,

Try pyinstaller. Works for me in setup where i build binaries on Slackware and distribute to tar packages. So far i had no complains on other distros.

Hope it helps.
Bart

On May 12, 2013 7:24 PM, "Kevin Locoh" <rayman3640@xxxxxxxxx> wrote:
Hi all,

I've been wondering how to best distribute a game made with Pygame on Linux. On Windows, cx_Freeze works very well, and I assume it would be just the same on Mac OS. But on Linux, it's perfectly useless because of the various distros I'd have to build the game for. I could ship a tarball with the sources, but still, it's quite difficult for the users to deal with so many dependencies (Pygame, and hence the SDL, Numpy sometimes…). In my case, I can't even relie on the repos and tell the players to install a few packages with Aptitude: I use Python 3 and a pre-release of Pygame 1.9.2 (so as to use Surfarray, not available for Python 3 with Pygame 1.9.1), and these versions aren't even in the repos. So, what's the best way to distribute a game for Linux?

I've thought of a few possibilites I could try:
  • Making some generic DEB and RPM packages, and hope they can cover most distributions. I don't know whether a RPM built on Ubuntu will work on Fedora though…
  • Using Setuptools/Distribute and Python eggs. From what I've read, it is quite powerful. Provided the Setuptools script point to the Pygame Mercurial repo and to any other required dependency, it will build them from the sources on its own. The only limit is the SDL. It doesn't seem that Setuptools can install a C library, so the user will have to install it by himself. But that seems more reasonable already, the SDL 1.2 being widely available on most distros. Or I could add the SDL to the sources and tweak the setup script so that it builds it if needed. In this way, I would have a completely standalone game, with the same sources regardless of the distribution. Has anyone tried his hand at it? I'd love to hear some feedback.
Thanks in advance for your help!
Kevin