packpanda

hi!

unfortunately i have a problem with the packpanda utility. in which directory do i have to call packpanda. in the directory of my game or in c:\panda3D1.6.2 ?
when i type the command “packpanda --dir myGame” unfortunately nothing happens in both directorys.

i need quick help! :slight_smile:

When you say “nothing happens”, don’t you mean there was an error message printed? The error message would explain why it didn’t work. Without that we can’t even begin to guess what went wrong.

David

no, there is no error message. when i type this command in and press return there appear no textlines like in the manual. the prgramm simply goes back to the directory i was in before and nothing happens…

maybe i’m doing something wrong. can somebody explain this process for dummys? :slight_smile:

here is a screenshot of what i made… it would be great if somebody could help!

did you make sure you read the entire manual page?
did you set up the files neccessary for packing?
to me, it seems you’r missing a lot of parameters such as the version number

in the manual is written that the only file which is really neccessary is main.py. the directory contains this file, a installer.bmp image and a licence.txt file.

when i write:

packpanda --dir myGame --name “someName” --version 1.0.0

the result is the same like in the screenshot.

Maybe packpanda.py doesn’t run correctly at all. Can you try to run the panda3ddir\direct\src\directscripts\packpanda.py script directly instead of running “packpanda”?

If that still doesn’t work, and are certain that you’re using it right, you can try to analyze the packpanda.py script and put “print” statements in it to see where it fails.

hm… i have no “src” dirctory in direct. but how could i start packpanda directly? is there maybe an older version oh panda3d which i can use where packpanda is running withot an error?

ok, i started packpanda now directly from the directscripts folder. my command was:

python packpanda.py --dir c:\myGame

but the result was the same. please help!!!

Can you even run python at all? What happens if you just type the command “python”? If that doesn’t run, you’ll have to figure that out before you can get packpanda to work.

David

hi!

python runs good… i can play my game, too. but packpanda unfortunately makes nothing. does this utility work on your system?
it would be really great if anybody could help me with this problem today!!
if it works on your system, would it be possible that i send my game to you and you would make the .exe file for me? that would be really great! i even would give you money for converting my game into an .exe file. i need this tomorrow!!! :slight_smile:

Try giving the full path to packpanda, something like:

python c:\panda3d-1.6.2\direct\src\directscripts\packpanda.py --dir c:\myGame

David

unfortunately nothing…

if anybody want to earn money for converting my game in an .exe. please write me!

finally it worked on another computer to get the .exe file :slight_smile: it’s really strange because my computer is really doing nothing when i call this utility…

Hello!

I’m trying to pack my Panda3D-Map-Editor with packpanda, too!
I can start the script with all tags, but everytime there’s this error:#

Copying the game to C:\Panda3D\bin\packpanda-TMP...

Compiling BAM and PYC files...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Panda3D\direct\src\directscripts\packpanda.py", line 281, in <module>

    CompileFiles(".")
  File "C:\Panda3D\direct\src\directscripts\packpanda.py", line 259, in CompileF
iles
    CompileFiles(os.path.join(file, x))
  File "C:\Panda3D\direct\src\directscripts\packpanda.py", line 250, in CompileF
iles
    if (string.endswith(".egg")):
AttributeError: 'module' object has no attribute 'endswith'

Actually, I know, what it means, but how to fix it? The proplem is in here:

...
def CompileFiles(file):
    if (os.path.isfile(file)):
        if (string.endswith(".egg")): # here!!!!
            egg2bam(file, file[:-4]+'.bam')
        elif (string.endswith(".egg.pz")):#here!!!
            egg2bam(file, file[:-7]+'.bam')
        elif (string.endswith(".py")):
            py2pyc(file)
        else: pass
    elif (os.path.isdir(file)):
        for x in os.listdir(file):
            CompileFiles(os.path.join(file, x))
...

actually it should be file.name, but there is no instance of file, so I can’t call file.name…
Help!

This problem has already been fixed a while ago. I recommend upgrading your version of Panda3D 1.6.2, or at least 1.5.4.

solutuion:

def CompileFiles(filename):
    if (os.path.isfile(filename)):
        if (filename.endswith(".egg")):
            egg2bam(filename, filename[:-4]+'.bam')
        elif (filename.endswith(".egg.pz")):
            egg2bam(filename, filename[:-7]+'.bam')
        elif (filename.endswith(".py")):
            py2pyc(filename)
        else: pass
    elif (os.path.isdir(filename)):
        for x in os.listdir(filename):
            CompileFiles(os.path.join(filename, x))

but, I don’t get an exe-file… why?
There’s just this one: packpanda.nsi
what shall I do?

Oh, sorry! :blush:
I’ll do it right now!