packpanda

I’ve made a short test of this tool.

in
…\fullscreen
I hava a script fullscreen.py

packpanda --game fullscreen

Game           : e:\Programmieren\Spiele\Panda\Tests\fullscreen
Name           : fullscreen
Start Menu     : fullscreen
Main           : e:\Programmieren\Spiele\Panda\Tests\fullscreen\fullscreen.py
Icon           : e:\Programmieren\Spiele\Panda\Tests\fullscreen\fullscreen.ico (
MISSING)
Bitmap         : e:\Programmieren\Spiele\Panda\Tests\fullscreen\fullscreen.bmp (
MISSING)
License        : e:\Programmieren\Spiele\Panda\Tests\fullscreen\LICENSE.TXT (MIS
SING)
Output         : e:\Programmieren\Spiele\Panda\Tests\fullscreen.exe
Install Dir    : C:\fullscreen

Copying the game to e:\Programmieren\Spiele\Panda\Tests\packpanda-TMP...

Compiling BAM and PYC files...
Compiling python .\fullscreen.py

d:\Panda3D-1.1.0\nsis\makensis.exe /V2 /DCOMPRESSOR="lzma" /DNAME="fullscreen" /
DSMDIRECTORY="fullscreen" /DINSTALLDIR="C:\fullscreen" /DOUTFILE="e:\Programmier
en\Spiele\Panda\Tests\fullscreen.exe" /DLICENSE="d:\Panda3D-1.1.0\LICENSE" /DLAN
GUAGE="English" /DRUNTEXT="Play fullscreen" /DIBITMAP="d:\Panda3D-1.1.0\nsis\Con
trib\Modern UI\Graphics\Wizard\nsis.bmp" /DUBITMAP="d:\Panda3D-1.1.0\nsis\Contri
b\Modern UI\Graphics\Wizard\nsis.bmp" /DPANDA="d:\Panda3D-1.1.0" /DPSOURCE="d:\P
anda3D-1.1.0" /DPPGAME="e:\Programmieren\Spiele\Panda\Tests\packpanda-TMP" /DPPM
AIN="fullscreen.py" "d:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi"
packing...
Can't open script "d:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi"

What I’ve done wrong

Congratulations! You found the first major bug in 1.1.0.

For now, the fix is to move this file:

c:\panda3d-1.1.0\direct\packpanda.nsi -> c:\panda3d-1.1.0\direct\src\directscripts\packpanda.nsi

It will be fixed in version 1.1.1.

  • Josh

I think I’ve found the second one too, or is this ok:

$ packpanda --game fullscreen
Game           : e:\Programmieren\Spiele\Panda\Tests\fullscreen
Name           : fullscreen
Start Menu     : fullscreen
Main           : e:\Programmieren\Spiele\Panda\Tests\fullscreen\fullscreen.py
Icon           : e:\Programmieren\Spiele\Panda\Tests\fullscreen\fullscreen.ico (
MISSING)
Bitmap         : e:\Programmieren\Spiele\Panda\Tests\fullscreen\fullscreen.bmp (
MISSING)
License        : e:\Programmieren\Spiele\Panda\Tests\fullscreen\LICENSE.TXT (MIS
SING)
Output         : e:\Programmieren\Spiele\Panda\Tests\fullscreen.exe
Install Dir    : C:\fullscreen

Copying the game to e:\Programmieren\Spiele\Panda\Tests\packpanda-TMP...

Compiling BAM and PYC files...
Compiling python .\fullscreen.py

d:\Panda3D-1.1.0\nsis\makensis.exe /V2 /DCOMPRESSOR="lzma" /DNAME="fullscreen" /
DSMDIRECTORY="fullscreen" /DINSTALLDIR="C:\fullscreen" /DOUTFILE="e:\Programmier
en\Spiele\Panda\Tests\fullscreen.exe" /DLICENSE="d:\Panda3D-1.1.0\LICENSE" /DLAN
GUAGE="English" /DRUNTEXT="Play fullscreen" /DIBITMAP="d:\Panda3D-1.1.0\nsis\Con
trib\Modern UI\Graphics\Wizard\nsis.bmp" /DUBITMAP="d:\Panda3D-1.1.0\nsis\Contri
b\Modern UI\Graphics\Wizard\nsis.bmp" /DPANDA="d:\Panda3D-1.1.0" /DPSOURCE="d:\P
anda3D-1.1.0" /DPPGAME="e:\Programmieren\Spiele\Panda\Tests\packpanda-TMP" /DPPM
AIN="fullscreen.py" "d:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi"
packing...
File: "d:\Panda3D-1.1.0\nsis\Contrib\Modern UI\Graphics\Wizard\nsis.bmp" -> no f
iles found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
   /oname=outfile one_file_only)
Error in macro MUI_WELCOMEFINISHPAGE_INIT on macroline 5
Error in macro MUI_GUIINIT on macroline 2
Error in macro MUI_FUNCTION_GUIINIT on macroline 4
Error in macro MUI_INSERT on macroline 11
Error in macro MUI_LANGUAGEFILE_BEGIN on macroline 4
!include: error in script: "d:\Panda3D-1.1.0\nsis\Contrib\Modern UI\Language fil
es\English.nsh" on line 9
Error in macro MUI_LANGUAGE on macroline 5
Error in script "d:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi" on lin
e 56 -- aborting creation process

Thanks for your help and sorry to bother you with that stuff

This is embarassing. Let me see if I can find the bug…

Forgive me for this stuff. Nobody has ever used this tool but me, so this is really “alpha” testing for this particular tool.

This file contains a bug:

c:\panda3d-1.1.0\direct\src\directscripts\packpanda.py

The line that looks like this:

BITMAP=os.path.join(NSIS,“Contrib”,“Modern UI”,“Graphics”,“Wizard”,“nsis.bmp”)

Should look like this:

BITMAP=os.path.join(NSIS,“Contrib”,“Graphics”,“Wizard”,“nsis.bmp”)

I’ve just added a page to the manual:

“Building a Self-Extracting EXE using packpanda”

For now, it’s completely empty. If you figure this whole thing out, would you be willing to flesh out the manual page?

Ok. I will write it if I figure it out.

I’ve written some lines about it now. But they aren’t very good and not written in perfect english.

Is it working for you?

Yes

I tried it, had the same errors as martin roughly, but next i get this error



packing...
File: "and" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
   /oname=outfile one_file_only)
Error in script "C:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi" on lin
e 110 -- aborting creation process

C:\Documents and Settings\tor\Skrivebord\oogp\cgcmain>

BTW. im trying this on a project built under panda 3d 1.0.5. Will that make any difference?

I’d guess so, there are some migration rules to follow. Does it run well under 1.1.0 in “unpacked” condition?

Hi, as i’m interested in this topic thought i would give some input (but i don’t know how much worth it will add)

here is my code (which runs in panda 1.1.0 and i’m no expert but would guess that this is a basic as it gets!)

import direct.directbase.DirectStart
from pandac.PandaModules import *

# reposition the camera
base.disableMouse()
camera.setPosHpr(Vec3(0,-15,7),Vec3(0,-15,0))

# load a model
Alien = loader.loadModel("Models/alienmodel.egg")
Alien.reparentTo(render)

run()

and this is the error that i get (i have included all the changes outlined in this post)

C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Test>packpanda --game t
estgame
Game           : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Test\t
estgame
Name           : testgame
Start Menu     : testgame
Main           : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Test\t
estgame\testgame.py
Icon           : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Test\t
estgame\testgame.ico (MISSING)
Bitmap         : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Test\t
estgame\testgame.bmp (MISSING)
License        : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Test\t
estgame\LICENSE.TXT
Output         : C:\Documents and Settings\Tony\My Documents\Panda 3d etc\Test\t
estgame.exe
Install Dir    : C:\testgame

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

Compiling BAM and PYC files...
Executing: egg2bam -noabs -ps rel -pd . ".\Models\alienmodel.egg" -o ".\Models\a
lienmodel.bam"

Writing ./Models/alienmodel.bam
Executing: egg2bam -noabs -ps rel -pd . ".\Models\alienmodelwalkanim.egg" -o ".\
Models\alienmodelwalkanim.bam"

Writing ./Models/alienmodelwalkanim.bam
Compiling python .\testgame.py

C:\Panda3D-1.1.0\nsis\makensis.exe /V2 /DCOMPRESSOR="lzma" /DNAME="testgame" /DS
MDIRECTORY="testgame" /DINSTALLDIR="C:\testgame" /DOUTFILE="C:\Documents and Set
tings\Tony\My Documents\Panda 3d etc\Test\testgame.exe" /DLICENSE="C:\Documents
and Settings\Tony\My Documents\Panda 3d etc\Test\testgame\LICENSE.TXT" /DLANGUAG
E="English" /DRUNTEXT="Play testgame" /DIBITMAP="C:\Panda3D-1.1.0\nsis\Contrib\G
raphics\Wizard\nsis.bmp" /DUBITMAP="C:\Panda3D-1.1.0\nsis\Contrib\Graphics\Wizar
d\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\Test\packpanda-TMP" /DPPM
AIN="testgame.py" "C:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi"
packing...
LicenseData expects 1 parameters, got 6.
Usage: LicenseData local_file_that_has_license_text | license_lang_string
Error in script "C:\Panda3D-1.1.0\direct\src\directscripts\packpanda.nsi" on lin
e 61 -- aborting creation process

hope this helps!

-------------fixed----

Update: packpanda still isn’t set up right in 1.2.2. The manual now contains instructions on a temporary fix.