packp3d.exe or packp3d.p3d?

from panda3d.org/manual/index.php/Using_packp3d

But the file is named packp3d.exe in Windows, so I get a ‘No such file /c/Panda3D-1.7.0/bin/packp3d.p3d’

It’s a bug in 1.7.0. You need to download packp3d.p3d from http://runtime.panda3d.org/packp3d.p3d, and place it in the bin directory. Then, packp3d.exe should work.

packp3d.exe is simply a wrapper tool that locates the runtime, and runs packp3d.p3d using it. Due to a minor mistake, 1.7.0 doesn’t ship with packp3d.p3d, however.

OK, works now, thanks.
But I can’t run the file by clicking on it.
I have the runtime from here: panda3d.org/download.php?runtime

This doesn’t seem to work as well, I get a “‘panda3d’ is not recognized as an internal or external command, operable program or batch file.”

Yeah, that would require you to put “panda3d” on the PATH. Double-clicking the p3d in explorer should work fine, though.

ok

I have no idea then. The p3d file is about 8 mbyte but only my assets are about 30 mb uncompressed, probably I have a broken file generated?

No, that’s probably not the issue. packp3d does a good job at cutting down size.
What if you run the .p3d file from the command line, specifying the full path to panda3d.exe?

Well I added panda3d runtime to the PATH and it crashes like this, too.
Theres quite a lenghty output in the console, it says my dozens of texture cards are ‘implicitly’ scaled to power of two and just after that is this:

See the Python stack? That’s showing you where the error is in your program. It’s at line 171 of MainMenu.py, where it’s trying to open a file, and it’s getting an I/O error, probably because the file isn’t there.

Most likely you forgot to prefix base.appRunner.MultifileRoot to your filename. (In 1.7.1 this will no longer be necessary.)

David

Well it is, just a simple text file:

open('text.txt', 'r')

Seems to work fine with a bat file or packpanda.

Yes. packp3d is different. It runs in a special environment where the current directory is not the same place as the contents of your p3d file. So you can’t just open files directly from your p3d file, instead, you have to tell Python where they’re found.

Use:

open(base.appRunner.MultifileRoot + '/text.txt', 'r')

As I said, this is required for 1.7.0, but won’t be needed for 1.7.1 and later.

David

well I think its about time I switched to the p3d format.

Today I tried this again and altough I could make a p3d file,
I had a main.py which called other modules in their own ‘src’ directory -this crashed packp3d and I had to move them all to the root folder…

Another thing, can I just include the fmod package inside the p3d file rather than making people download something else after they have downloaded the actual file? And I dont wish to make an installer… just a standalone file

If you reference the package with “-r fmod”, then people will only have to download it once, instead of every time they run your p3d file. That’s a much better solution.

David

I get that, but still, I have my reasons:

  1. What if the person downloads my p3d file on a PC but later wants to use it on another one without access to the internet? Thats pretty possible in my experience.

  2. The chances that the same person will use another game written in panda3d and running inside a p3d file are low: simply because its a relatively new feature and I dont know any other games beside Disneys which use it currently. I think you mean the biggest advantage would be seen in this case- if many games used the same package than you wouldnt have to download the same package over and over again. But as I explained, that advantage isnt very important at least for now.

  3. And finally, I simply dont want to bother people to download other stuff right after they (think) they downloaded the whole game. Again in my personal experience thats not a very pleasant feeling, even if bugged only the 1st time.

So the only advantage of this I see in smaller file sizes.

If you think its better for applications to share packages, you can simply develop this p3d mechanism in such a way that those ‘packages’ are extracted from the main p3d file an placed in a shared folder the 1st time they are run (if specified during creation by devs like me, of course). Of course I’m just guessing, I dont even know if there is a way to have standalone p3d files for now, thats why I posted.

The p3d file, by design, is intended to be run on an Internet-connected machine. (It has to download all of Panda, anyway, so saving yourself the fmod part of the download isn’t going to buy you anything.)

But your concerns are relevant, as well. What you want is the pdeploy tool, which can make a p3d file into a fully self-contained executable file that includes all of Panda and fmod and any referenced packages, and can be run on a machine that lacks an Internet connection.

I don’t believe the pdeploy tool is 100% finished at this point, however. But you are welcome to investigate it in its current form.

David

Oh man, I should learn to scroll the pages down sometimes…

sorry

Alhough it could be added in the -h help menu…

Not much luck with pdeploy.

My game folder is named game, I change my current dir to c:\Users\X\game and then i type:

pdeploy -N "game" -v 1.0.0 game.p3d standalone

And I get

Does game.p3d even exist, then? You need a working .p3d to deploy. You could see pdeploy as a sort of p3d2exe - except that it will generate binaries for Linux and Mac OSX as well.

OK then, I thought thats where you specifiy the generated file name…

Anyway, pdeploy seems to take you to the help menu if you don’t write the input in a special order, form some reason. The example in the manual works.

But I don’t see how pdeploy is going to help me now, seems like the -s (self-contained) mode is only available for installer mode, not standalone mode (the one I’m using). So it still requires internet connection…

And when you run the p3d file some folders are generated in that folder: ‘log’, ‘contents’, ‘certs’, etc

I try to download this file and it says no signature and i cannot get this file.

Hi, welcome to the forums!

You have to right-click the link, and click “Save Target As” or “Save Link As” (depending on the browser).