Compile panda3d games?

Hey,

Does anybody know if there is a way to compile your panda3d game?
Or is the only way to publish it just let the poor player download panda3d first and run the python file?

Doesn’t packpanda create an executable?

Go to Showcase section and you’ll find it.
discourse.panda3d.org/viewtopic.php?t=1123
Oh, you’ve seen that.

I meant for linux?

dunno which one it is (static or dynamic)… but i think you can deliver all needed libarys with your game. unreal2k series does the same. guess this requires deeper compiling knowledge … knowledge i dont really have :stuck_out_tongue:. but it is possible. somehow…

For linux, you’d want to create an RPM or DEB file. There’s no standard way to do it, as far as I can tell — every distribution is different.

maybe I can hip in the words “LOKI installer”. Might be worth a look (google) - however, that are just things I heard somewhen… Could be of interest - or could be not. :wink:

Regards, Bigfoot29

What I meant to say: is there a way to compile my python file to a binary file?

To answer your question following the “spirit of python”:

“Python is open source, the software you want to write should be open source - so why would you want to compile it?” (kinda this)

There are attempts to create python compilers, but till now none of them is fully useable. Dunno about .NET with its IronPython… but I do have doubt that Panda3D is working there. :wink:

You can “byte compile” your code (like Java does), but that is far from being “secure”/safe from decoding.

Regards, Bigfoot29

I don’t know if I get the question right, but I will try to answer.

First, if you mean “binary” in contrast to “text”, then of course it is possible to compile a file to binary. Python does it all the time, when you import another python text file. And you can do it yourself if you want to:

import py_compile
py_compile.compile( 'filename.py' )

But I don’t think this is what you have in mind. For creating standalone executables or installers you can have a look at the following links:

Linux:
cx_Freeze: http://www.python.net/crew/atuining/cx_Freeze/
Gordon Mcmillans Installer: http://davidf.sjsoft.com/mirrors/mcmillan-inc/install1.html
Freeze: ships with python

Windows:
py2exe: http://www.py2exe.org/
packpanda: ships with panda

Mac:
py2app: http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html

I don’t have a linux box, but perhaps you find out how to use the linux tools.
enn0x

Thanks! :slight_smile:
That was what I meant;)