pandapack problem

Hello everyone :slight_smile:

I have a little problem with “pandapack”.

I want to use it, but when i write “pandapack --dir Mygame”, it’s not work.
it’s just write me :
“cannot locate the root of the panda tree”.
(I put the directory file 'Mygame" into “C:\Panda3D-1.4.1\bin”, with just a main.py file)

what i can do to build a windows installer with pandapack ?

thanks in advance :slight_smile:

You could try it like this:

(1) assuming you are in an arbitrary directory

c:/Foo/Bar

(2) make a subdirectory “Mygame”:

c:/Foo/Bar/Mygame

(3) place your game script(s) and resources (models, textures, config files, …) in this directory:

c:/Foo/Bar/Mygame/main.py

(4) Change to the directory BELOW your game and run packpanda:

cd c:/Foo/Bar
packpanda --dir Mygame

Still problems? Then please report the full traceback that packpanda gives you.

enn0x

Hello.

Thanks for the replay enn0x, but it’s now work for me :frowning:

packpanda give me the same message
("“cannot locate the root of the panda tree”).

This is strange. Using grap to search through the panda source I found that this is error message is created by the Panda3D-version of the Python interpreter (ppython.exe, found in direct/src/directbase/ppython.cxx). [Moderator: ppython.exe is deprecated, use python.exe]

Can you run any Panda3D script using ppython, for example your game?

If yes one idea would be to use the python script direct/src/directscripts/makepanda.py (contained in Panda3D source distribution) and not the binary one bin/makepanda.exe (contained in the binary distribution).

enn0x

-> yes, I can run my game script with ppython.exe .

-> you mean to use the python script with ppython.exe ?
if yes, it’s not work, i just take the makepanda.py (and packpanda.py) and i open ppython.exe -->

 import makepanda

the ppython.exe closed immediately when I done that.
I’ve also tried with packpanda, but ppython closed again.

Maybe i must to change somethink in the packpanda script or makepanda script ?

and, by the way, are there an other thing to build a panda3d EXE in a easy way ?

thanks in advance

Um… forget makepanda.py, has been a typo. I meant packpanda.py of course. After all we are talking about packing panda.

And I didn’t mean IMPORT but RUN the script, like this for example:

>>> ppython C:/pandapath/direct/src/directscripts/packpanda.py --dir Mygame

I think you have to run this script from the same place as you would run the binary packpanda.exe. I didn’t check if this works though.

enn0x

I don’t understand somethink. :blush:

I must, in first, open ppython.exe, right ? :stuck_out_tongue:
this one ->
img406.imageshack.us/my.php?image=ppythonst9.jpg

and after, I must to write in ppython.exe

run C:/pandapath/direct/src/directscripts/packpanda.py --dir Mygame

or

C:/pandapath/direct/src/directscripts/packpanda.py --dir Mygame

right ?

If I do that, it write me :

Traceback <most recent call last> 
File "<stdin>", line 1, in ?
SyntaxError : invalid syntax

.

Maybe I do something wrong ?

thanks in advance

Guys, please stop using ppython.exe. Or at least, please stop talking about it. It’s deprecated.

@Josh

Why?

I mean, this is what I have gathered by reading this forum over some month:
-> both files, ppython.exe and python.exe, contained in Panda3D, are identical.
-> they are NOT the original Python interpreter from www.python.org, but a Panda3D version which sets some environment information before launching the python interpreter.

Did I miss something? Because if the python.exe that ships with Panda3D is not the original python.exe, then it is very much misleading to name it python.exe. What is the reason for this spoofing?

If you really have to remove ppython.exe in one of the next releases then PLEASE PLEASE PLEASE do not make the installer add Panda3D 's python directory to the windows PATH!!! This messes up the search path of ever user who wants to have another Python distribution installed, e.g. standard Python 2.5: Installing Python 2.5 and then Panda3D 1.4.2 works, because python.exe will be found in Python 2.5. But the other way round, installing Panda3D 1.4.2 and then Python 2.5 means trouble.

@TJ_COMBO

There are two ways to work with Python:

(1) Interactive. To do this you open a command prompt and then you type

C:\> \python.exe

Now you can enter a line of python code, hit enter, and the Python interpreter executes this line of code.

(2) Run a script. To do this you open a command prompt (again), but then you type something else:

C:\> python.exe myscript.py

where “myscript.py” is a text file containing some lines of Python code. Of course if your script is in some other directory then you have to tell Python the (absolute or relative) path to your Python script.

Hmm… reading my previous post again I think this has been a bit misleading, because of the automatic text wrap. If you copy&past the text in the code block to a text file you will see that it actually is ONE line.

enn0x

YEAHHH !
it works !
thank you very much for your help :slight_smile:

Glad to hear so :slight_smile:

But this is just a workaround. There must be a reason why your packpanda.exe doesn’t work. I’m afraid I can’t help here. Josh and drwr are your best chance. Let’s wait if they know more.

enn0x