packaging

Hi:

I created an executable in c++ and done a main.py that calls it.

Then I tried to use packp3d to create a p3d with all the data but i found that almost every p3d file fails with:

EDIT: yes, before posting I checked the forum and seen a lot of references to the same bug, but the solutions did not work for me, as the folders are not correct.

*The especified process was not found (in spanish)

so, it seems that something is wrong, specially when I have the panda3d-1.7.0 directory on E:\panda3d-1.7.0 directory. I searched the registry and I have not found any hard coded reference to c:, so, how can i fix this??

the %PATH% environment variable is:

finally, the only thing I want is to create a standalone executable without the panda3d libraries. So I thougth to first, create the p3d package, then using pdeploy for the executable. Is this the way to achieve this??

thanks in advance!!

Ah, I see what is happening. This is our bug, my apologies.

First, you should ignore the pathnames. They are meaningless; the pathnames reported are the ones on the machine that actually built Panda3D (at CMU), not the ones on the machine that is running Panda3D (that is, your machine). So the fact that it reports c:\ instead of e:\ is meaningless.

But, the actual problem is due to code like this:

try:
  from libp3visionModules import *
except ImportError, err:
  if "DLL loader cannot find" not in str(err):
    raise

We have code like this in the PandaModules import chain. This is attempting to silently ignore DLL load errors, while raising an exception for other kinds of import errors. But it is failing in your case because in the Spanish-language Windows, the error message does not contain the text “DLL loader cannot find”, so it is not getting silently ignored as it should.

As a temporary workaround, perhaps you can include the vision package with -r vision on the packp3d command line.

David

Actually, on second look, this isn’t the problem at all. That text is generated by a raise statement elsewhere within our code, not from the operating system; so there’s no confusion caused by the Spanish-language Windows.

So it seems that the problem is that libp3vision.dll was actually found, but could not be loaded for some reason. Are you writing code that in fact depends on the vision library, and had you already specified -r vision? Because otherwise, it shouldn’t have downloaded at all, and it wouldn’t have raised this error message.

If that’s the case, then the underlying problem is probably just something wrong with the way we have packaged libp3vision.dll.

David

Hi!

As far as I know, im not using anything like libp3vision in my code just:

I tried to packp3d with -r vision but appeared the same problem.

also, this failure happens not only in packp3d but also in pdeploy, so it looks like some configuration problem I have.

Any clue?

Thanks, and sorry for the inconvenience, but I don’t have any idea on how to fix this.

Oh, I’m sorry. I just realized that you were talking about a C++ executable, not a pure Python program.

I don’t think we have completely solved all of the issues related to packaging up a C++ application yet. This will probably have to wait till 1.8.0 or so.

But the good news is that it’s not difficult to package up a C++ application on your own using standard packaging tools, like NSIS for instance.

David

hi,

I would have made my own distribution of the game, but I found that the game has dependencies of the configuration of the panda, so, I can’t execute it on a system without the panda3d framework installed and configured.

That’s the reason I tried to use packp3d and pdeploy to create a exe with the framework integrated on standalone.

if a move the app to another pc, and copy the panda dlls to it, it shows me the error:
“display(warning): unable to load: path not found”
known pipe types:
(all display modules loaded)
no graphics pipe is available!
your config.prc file must name at least one valid panda display library via load-display or aux-display"

I checked the prc, but I don’t know what else I can do.

Just install a suitable Config.prc file in your client installation directory. It should include at least the line:

load-display pandagl

or whatever API you wish to load by default. You might also need to include the line:

plugin-path .

And, although I don’t think this is necessary, you might need to pre-set the environment variable $PANDA_PRC_PATH to the value “.” when you start the client application.

David