Distributing Panda3D Applications
To produce a distributable C++ Panda3D application, it is recommended to build Panda3D from source with optimizations enabled. This disables assertion messages and other debugging aids to create a more optimized, slimmer and faster version of Panda3D. You can also choose to omit the features of Panda3D that you don’t need, or exclude the third-party packages that have incompatible licensing terms.
You can do so by checking out the source code of Panda3D and running the
makepanda.py
build script with the --optimize 4
flag. Run it with
--help
to see a list of packages and components that can be excluded.
After building Panda3D from source, it will be necessary to take the files
in the built/bin
directory (and, on platforms other than Windows, the
built/lib
directory) and ship them together with the executable file of
the game. You can alternatively choose to compile Panda3D statically, using
the --static
flag. This allows you to link the Panda3D libraries into the
executable, obviating the need to ship them separately. However, this method
is only advisable if the application consists of a single executable, and is
not divided up into multiple libraries or executable files that all use the
Panda3D API.
The rest of this section focuses on explaining the distribution tools available to Python users of the engine, and is not relevant for C++ users.