Re: [pygame] Binary distribution woes
On 9/21/06, Michael Brunton-Spall <[EMAIL PROTECTED]> wrote: On Thu, 2006-09-21 at 08:16 -0700, Bob Ippolito wrote: > On 9/21/06, Chris Ashurst <[EMAIL PROTECTED]> wrote: > > Regarding that... If I develop on a windows box, is there any way for me to > > build a OSX application bundle on my machine? I kind of figure I could > > possibly use Cygwin to make use of Freeze, but I also worry about > > distributing a binary for *nix systems that may use a different endian > > system or blah blah blah. > > No... and no. That possibly explains a lot of the issues I've been having. I've managed to get py2app, a plist implementation and otehr stuff installed but my linux system wasn't having any of it trying to generate the application bundle. I'll try cx_freeze and see if I can get a linux build,a lthought he linux one is the least of my worries, most linux people can understand the console. I can try the py2exe on my windows machine sometime. py2app *could* be made to work cross-platform, because it's pure python, but you'd still need all of the Mac OS X binaries for Python and the dependencies. I have no interest in supporting this. If you want to deploy on the Mac you'll need a Mac to test on anyway. py2exe is very similar to py2app, but you will have to do more work with py2exe because it doesn't include hooks to support pygame. py2exe is not cross-platform code and absolutely must be used on win32. I've used a recipe similar to this for my first attempt at a standard bdist_dumb build, but the tar.gz file it generates contains the path ./usr/lib/python2.4/site-packages/ that's fine if I wanted the users to develop an application against my game, but I'd really rather it didn't install my sourcecode on the target machine, but only shipped compiled pyc/pyo objects and a main script, which all unpacked to say ./GameName instead While bdist_dumb is standard, that's not what it's for. cx_Freeze exists for this purpose. -bob
Re: [pygame] Binary distribution woes
On Thu, 2006-09-21 at 08:16 -0700, Bob Ippolito wrote: > On 9/21/06, Chris Ashurst <[EMAIL PROTECTED]> wrote: > > Regarding that... If I develop on a windows box, is there any way for me to > > build a OSX application bundle on my machine? I kind of figure I could > > possibly use Cygwin to make use of Freeze, but I also worry about > > distributing a binary for *nix systems that may use a different endian > > system or blah blah blah. > > No... and no. That possibly explains a lot of the issues I've been having. I've managed to get py2app, a plist implementation and otehr stuff installed but my linux system wasn't having any of it trying to generate the application bundle. I'll try cx_freeze and see if I can get a linux build,a lthought he linux one is the least of my worries, most linux people can understand the console. I can try the py2exe on my windows machine sometime. James Paige said > """ > setup.py for robohunt, run with: > % python setup.py py2app > For the list of available commands, see: > % python setup.py py2app --help > """ > from distutils.core import setup > import py2app > > setup( > name = "robohunt", > app = ['run.py'], > data_files = [('', > ['./images', >'./sound'], > )] > ) I've used a recipe similar to this for my first attempt at a standard bdist_dumb build, but the tar.gz file it generates contains the path ./usr/lib/python2.4/site-packages/ that's fine if I wanted the users to develop an application against my game, but I'd really rather it didn't install my sourcecode on the target machine, but only shipped compiled pyc/pyo objects and a main script, which all unpacked to say ./GameName instead I'll play with py2exe some more tomorrow and see if I can get it working under that, it's a good start. I can always steal time on my artists Mac to use py2app and do the Linux one by hand if necessary. Cheers Micahel Brunton-Spall MIB Games
RE: [pygame] Binary distribution woes
Thanks for clearing that up, I was beginning to go off on a deluded idea that I could happily churn out all sort of binaries for all sorts of systems from my humble windows box :) On 9/21/06, Chris Ashurst <[EMAIL PROTECTED]> wrote: >> Regarding that... If I develop on a windows box, is there any way for me to >> build a OSX application bundle on my machine? I kind of figure I could >> possibly use Cygwin to make use of Freeze, but I also worry about >> distributing a binary for *nix systems that may use a different endian >> system or blah blah blah. > No... and no. CONFIDENTIAL NOTICE: This email including any attachments, contains confidential information belonging to the sender. It may also be privileged or otherwise protected by work product immunity or other legal rules. This information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this emailed information is strictly prohibited. If you have received this email in error, please immediately notify us by reply email of the error and then delete this email immediately.
Re: [pygame] Binary distribution woes
On 9/21/06, Chris Ashurst <[EMAIL PROTECTED]> wrote: Regarding that... If I develop on a windows box, is there any way for me to build a OSX application bundle on my machine? I kind of figure I could possibly use Cygwin to make use of Freeze, but I also worry about distributing a binary for *nix systems that may use a different endian system or blah blah blah. No... and no. On the py2exe site wiki, they have a bunch of recipes for "installing" icons for windows executables (which seem like a bit of a hack by simulating a manifest file), and that's the biggest issue with building windows apps. OSX applications have a more approachable manifest type deal which uses XML. Having never made an OSX distributable, I can't say for certain how complex it was, but from Apple's API, it doesn't seem too bad. You typically don't have to deal much with the plist file for a typical py2app application, because the common stuff is abstracted. -bob
RE: [pygame] Binary distribution woes
Regarding that... If I develop on a windows box, is there any way for me to build a OSX application bundle on my machine? I kind of figure I could possibly use Cygwin to make use of Freeze, but I also worry about distributing a binary for *nix systems that may use a different endian system or blah blah blah. On the py2exe site wiki, they have a bunch of recipes for "installing" icons for windows executables (which seem like a bit of a hack by simulating a manifest file), and that's the biggest issue with building windows apps. OSX applications have a more approachable manifest type deal which uses XML. Having never made an OSX distributable, I can't say for certain how complex it was, but from Apple's API, it doesn't seem too bad. > Using py2exe is similar to py2app... and for unix you'd probably use cx_Freeze. > > You will likely not be able to reasonably get single file executables > out of any of them. On Mac OS X it will be a single application > bundle, which appears as a single file from the Finder, but it's > technically a directory. > > -bob CONFIDENTIAL NOTICE: This email including any attachments, contains confidential information belonging to the sender. It may also be privileged or otherwise protected by work product immunity or other legal rules. This information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this emailed information is strictly prohibited. If you have received this email in error, please immediately notify us by reply email of the error and then delete this email immediately.
Re: [pygame] Binary distribution woes
On Thu, Sep 21, 2006 at 01:36:28PM +0100, Michael Brunton-Spall wrote: > Hi all, > > My game is coming along nicely, and my artist said he'd like to try it > out. He runs Mac OSX, so I figured it would be a good chance to try out > the cross platform abilities of python / pygame. > Well after a lot of fiddling and installing the new python2.4 and pygame > packages, we got the game to work, but to run the game I had to manually > install those packages, and bring up a console, and run the correct > python interpreter on my Game.py. > Suffice to say it ran buetifully, (Thanks pygame!), but thats not really > a great way of distribution a finished game. My artist didn't even know > he had a console and he certianly couldn't use it to run the game. > We tried double clicking on the py file but it openes in the default > python ide instead of running it. > > So I did some digging today, looking at py2app, py2exe, and the > disttools package, ez_setup etc. > It seems incredibly complicated to try to build a binary file. > > What I want isn't too complicated really. (or at least I didn't think > so), I want to be able to build 3 single files, one for MacOSX, one for > unix, and one for Windows. Each should contain my game resources, and > have an icon/application file that is double clickable to start the > game. > > Surely some of the people using pygame here have needed to do this at > some point, and I wondered, given the lack of other information, how > does one approach doing that? > > Cheers > > Michael Brunton-Spall > MIB Games Py2app works great. I have used it on several occasions, both to package my own stuff and to package other peoples stuff. If your game is open-source I would be glad to write a py2app setup.py file for you. If your app is closed source, and you want to do it yourself, I can at least show you an example: """ setup.py for robohunt, run with: % python setup.py py2app For the list of available commands, see: % python setup.py py2app --help """ from distutils.core import setup import py2app setup( name = "robohunt", app = ['run.py'], data_files = [('', ['./images', './sound'], )] ) --- James Paige
Re: [pygame] Binary distribution woes
On 9/21/06, Michael Brunton-Spall <[EMAIL PROTECTED]> wrote: Hi all, My game is coming along nicely, and my artist said he'd like to try it out. He runs Mac OSX, so I figured it would be a good chance to try out the cross platform abilities of python / pygame. Well after a lot of fiddling and installing the new python2.4 and pygame packages, we got the game to work, but to run the game I had to manually install those packages, and bring up a console, and run the correct python interpreter on my Game.py. Suffice to say it ran buetifully, (Thanks pygame!), but thats not really a great way of distribution a finished game. My artist didn't even know he had a console and he certianly couldn't use it to run the game. We tried double clicking on the py file but it openes in the default python ide instead of running it. So I did some digging today, looking at py2app, py2exe, and the disttools package, ez_setup etc. It seems incredibly complicated to try to build a binary file. What I want isn't too complicated really. (or at least I didn't think so), I want to be able to build 3 single files, one for MacOSX, one for unix, and one for Windows. Each should contain my game resources, and have an icon/application file that is double clickable to start the game. Surely some of the people using pygame here have needed to do this at some point, and I wondered, given the lack of other information, how does one approach doing that? Using py2app isn't complicated. There's rather extensive documentation too: http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html Using py2exe is similar to py2app... and for unix you'd probably use cx_Freeze. You will likely not be able to reasonably get single file executables out of any of them. On Mac OS X it will be a single application bundle, which appears as a single file from the Finder, but it's technically a directory. -bob