I’ve been making a light-weight, stand-alone installer for Panda games and I need to know three things regarding Config.prc:

  1. What lib/dll file reads and processes the Config.prc file?
  2. How does that lib/dll know where to find the Config.prc file?
  3. Can Panda programs run without a Config.prc file and just let the script set all the config variables at run-time?
  1. The code to do this is managed by dtool/src/prc, which gets compiled into libdtoolconfig.dll.

  2. There are lots of options. The exact set of rules for locating prc files is decided by the person who builds Panda; see panda/src/doc/howto.use_config.txt for more information. I believe the Windows installer version available for download from this web page bases this decision on the directory in which libdtool.dll was found; it may also search the directory named by $PRC_DIR, and/or the list of directories named by $PRC_PATH.

  3. Sure. Rather than setting them one at a time with setValue(), it is probably better to load a whole file explicitly like this:


Or even a “file” defined within the code like this:

myVariables = """
load-display pandagl
win-size 1024 768
loadPrcFileData('internal', myVariables)


As David says, it’s up to the guy who compiled panda. If you’re using a prepackaged distribution, that’s me. The prepackaged distribution works like this: it starts in whatever directory contains “libdtool.dll” or “,” depending on whether you’re on windows or linux. It looks for an “etc” directory containing PRC files. If it doesn’t find one, it goes up a directory and tries again.

Let’s say, for sake of argument, that libdtool.dll is in:


it looks in these directories, in order:


Also, you see the “airblade” installation on our website? That was created using the same packaging system that we use for panda in general. Would that packaging tool be ok for your game? If so, learn how to use “makepanda.” Then, check out the command-line option “ppgame” (prepackaged game). You may need a hand using the command-line option, it’s not documented. But it may do just what you need.

It’s also possible to access config variables individually:

from pandac.PandaModules import *

just to pick a random example.