0

I recently finished up a small game I wrote in python, using pygame, at the request of some of my friends. Currently, I have the .pyw game file, and an assets folder containing all files used in the program. I used py2exe to distribute the game, which worked fine, although it still does not seem very user friendly to people downloading the game. One of my friends requested a mac version of it, and although I know about py2app, I am unsure of how to use it, and whether or not it is the best way to package my game. Basically, I want a single file that I can send to any mac user, so they can easily use the program I have made, while preferably not seeing the source code. I have googled around for a simple solution, but have not found one. If anyone could give a very simple explanation of how to easily do this, that would be great. Please keep in mind I am fairly new to programming, and may not understand all the programming lingo, so if you could keep it simple, I would appreciate it. Thanks in advance.

pjs
  • 17,381
  • 4
  • 25
  • 47
  • OS X has python installed natively. Unless you wrote this in python 3 then that shouldn't be a problem. – komaromy Dec 29 '14 at 03:10
  • Yeah, can you expand on what you mean by "a mac user who does not have python installed"? Oh, I see - it looks like Python 3 is required for PyGame: http://www.pygame.org/wiki/macintosh – Peter Dec 29 '14 at 03:11
  • 1
    The main thing is, I would rather not have the source code available in the distribution. Also, I would like to have the modules I use, such as pygame, included in the distribution. – jonathan m Dec 29 '14 at 03:47
  • @jonathanm - python is trivial to *decompile* the byte code. your concern about distributing the source code means you should probably pick a different language and runtime that is not so transparent by nature. –  Dec 29 '14 at 18:16

1 Answers1

0

The answer to How can I distribute python programs? suggests Pyinstaller which looks promising, although I have not tried it myself.

See this tutorial by Irwin Kwan to see how Pyinstaller can actually be used with Pygame. He describes a procedure for preparing a Windows executable as well as one for OS X.

Gino Mempin
  • 19,150
  • 23
  • 79
  • 104
Peter
  • 2,476
  • 1
  • 23
  • 32
  • I appreciate the answer, and I don't see why it should be down-voted. Thanks. – jonathan m Jan 10 '15 at 23:37
  • Good, I'm glad at least it wasn't you :-) Some folks just get a kick out of downvoting I guess - which I don't even mind as long as they at least have the cojones to give a coherent (perhaps even constructive) piece of criticism at the same time. At any rate, have you found a workable solution yet? – Peter Jan 11 '15 at 00:51