[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Compilation
Hey, Try this:
I use it for all my programs when ready for distribution. What it does it
converts your .Py to an exe file which can be run like any normal program.
Its the only Compilation/Exe creation program that I have found that is
still being supported.
From: Zack Baker
Sent: Friday, February 17, 2012 4:44 PM
Subject: Re: [pygame] Compilation
So could you just resend an email with the command exactly how it would as
oppear because that looks a littled funky. Let's assume that the game is
called helloworld.py and put it in the trunk folder or wherever. Thank you!
On Feb 17, 2012, at 4:17 PM, Sam Bull <sam.hacking@xxxxxxxx> wrote:
On Thu, 2012-02-16 at 18:52 -0700, Ian Mallett wrote:
I am unaware of any other binary distribution techniques for Python on
Mac other than py2app.
[Sent from wrong address, so re-posting]
Pyinstaller? It claims to be cross-platform. It's also the only one that
I've managed to get working without much hassle. I've only tested it on
Linux myself though.
To create a frozen binary on my system, all I need to run is:
python ~/.pyinstaller-1.5.1/pyinstaller.py --onefile -o pyinstaller
That's with pyinstaller installed in a hidden folder in my home
directory. The -o argument is the output directory. So this compiles my
game located at "trunk/pacman.py" into a single binary, saving it into
the "pyinstaller" folder.
I've not managed to have any success with alternatives like py2app or
Oh, and one caveat, the exit() function doesn't work with Pyinstaller,
use sys.exit() instead.
Sam Bull <sambull.org>