Standalone Files

Standalone Files

Hi people

Wondering if you can all help me to achieve this… I’m creating PANDA3D files at the moment (badly!), and was wondering if someone could give me a step by step guide on how to make these files standalone. They don’t have to be a standalone EXE file (although that would be preferred), just set up in a way so they will run on any computer that I take them to, so PANDA3D doesn’t have to be installed to get it to run. I can create a ‘run’ file myself (e.g. one that calls the file to be executed to get the program to run).

Is it possible to tell me what programs I need in order to achieve this? So far all I have is PANDA3D 1.1.0, but I have seen people discuss py2exe, but have looked at this forums and don’t understand them, so that’s why I’m writing this request.

I will also list the files that I want to include in my standalone file, but will give them universal names so that any advice is given can be updated for future projects and by other people who want to do the same as me, and therefore will be able to see where all the coding comes from, and can modify it for their own needs.
The files that I will want to include are (xx/filename shows the directory structure):

Maingame.py
Models/model1.egg
Models/model2.egg
Models/Wall1.jpg
Sounds/sound1.mp3
Sounds/sound2.wav
SFX/SFX1.wav

Hopefully I have included enough information here to get this example working, and hopefully will be able to understand it enough to expand it when I start created bigger files with more models and sounds etc.
If you need any further information about these files, then let me know and I will post the further information requested.

I want to do this as I want to give my creations to people for testing, but don’t want all the hassle of getting them to set up PANDA3D just to play my game – Its not efficient! I don’t mind the method being complicated, as I only have to learn it once (and it only has to be written once), for a ‘lifetime’ of knowledge and enjoyment.

Any help would be very much appreciated, and if an idiot’s step-by-step guide could be created for the above files, it will not only help me but help other people who use this forum as well.
I know it’s not easy and a lot of work, but it would be appreciated by all I’m sure!

Again 1000 thanks for any help that is thrown my way on achieving this!

Tony (PANDA3D Newbie who’s willing to learn!)

We have a handy tool that packages up a panda game into an installer (you know, “the installshield wizard will now bla bla …,” that sort of thing.)

The program you want is called “packpanda.” Here’s a link to the appropriate manual entry:

panda3d.org/manual/index.php/Build … _packpanda

The documentation is very sketchy, but the tool is pretty darn simple to use.

tryed to use this but when i put it

packpanda --game musicBox

i get the following output

C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tutorials\musicBox>pack
panda --game musicBox
Game           : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tutori
als\musicBox\musicBox
Name           : musicBox
Start Menu     : musicBox
Main           : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tutori
als\musicBox\musicBox\musicBox.py
Icon           : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tutori
als\musicBox\musicBox\musicBox.ico (MISSING)
Bitmap         : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tutori
als\musicBox\musicBox\musicBox.bmp (MISSING)
License        : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tutori
als\musicBox\musicBox\LICENSE.TXT (MISSING)
Output         : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tutori
als\musicBox\musicBox.exe
Install Dir    : C:\musicBox

Copying the game to C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tut
orials\musicBox\packpanda-TMP...

Compiling BAM and PYC files...
Executing: egg2bam -noabs -ps rel -pd . ".\models\MusicBox.egg" -o ".\models\Mus
icBox.bam"

Writing ./models/MusicBox.bam
Compiling python .\musicBox.py

C:\Panda3D-1.1.0\nsis\makensis.exe /V2 /DCOMPRESSOR="lzma" /DNAME="musicBox" /DS
MDIRECTORY="musicBox" /DINSTALLDIR="C:\musicBox" /DOUTFILE="C:\Documents and Set
tings\Tony\My Documents\Panda 3d etc\Tutorials\musicBox\musicBox.exe" /DLICENSE=
"C:\Panda3D-1.1.0\LICENSE" /DLANGUAGE="English" /DRUNTEXT="Play musicBox" /DIBIT
MAP="C:\Panda3D-1.1.0\nsis\Contrib\Modern UI\Graphics\Wizard\nsis.bmp" /DUBITMAP
="C:\Panda3D-1.1.0\nsis\Contrib\Modern UI\Graphics\Wizard\nsis.bmp" /DPANDA="C:\
Panda3D-1.1.0" /DPSOURCE="C:\Panda3D-1.1.0" /DPPGAME="C:\Documents and Settings\
Tony\My Documents\Panda 3d etc\Tutorials\musicBox\packpanda-TMP" /DPPMAIN="music
Box.py" "C:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi"
packing...
Can't open script "C:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi"

C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Tutorials\musicBox>

Any ideas for what is wrong?

There are some threads about packpanda use the search function please
discourse.panda3d.org/viewtopic.php?t=884

O, crap, I forgot about that.

I gotta get another panda release out the door.

  • Josh

Yes! yes you do :smiley:

g :wink: