diff --git a/dtool/src/dtoolutil/pandaSystem.cxx b/dtool/src/dtoolutil/pandaSystem.cxx index 3337cb96dc..cb03bd9cf8 100644 --- a/dtool/src/dtoolutil/pandaSystem.cxx +++ b/dtool/src/dtoolutil/pandaSystem.cxx @@ -56,6 +56,27 @@ get_version_string() { return PANDA_VERSION_STR; } +//////////////////////////////////////////////////////////////////// +// Function: PandaSystem::get_package_version_string +// Access: Published, Static +// Description: Returns the version of the Panda3D distributable +// package associated with this build. This version +// string is set by the builder at compile time; +// presumably the person who sets this is also +// responsible for building the indicated distributable +// package version. +// +// If this string is empty, there is no distributable +// package associated with this build, and you should +// probably use a different build of Panda3D to generate +// your distributable applications to ensure +// compatibility. +//////////////////////////////////////////////////////////////////// +string PandaSystem:: +get_package_version_string() { + return PANDA_PACKAGE_VERSION_STR; +} + //////////////////////////////////////////////////////////////////// // Function: PandaSystem::get_major_version // Access: Published, Static diff --git a/dtool/src/dtoolutil/pandaSystem.h b/dtool/src/dtoolutil/pandaSystem.h index af4d081c3f..80c5c25406 100644 --- a/dtool/src/dtoolutil/pandaSystem.h +++ b/dtool/src/dtoolutil/pandaSystem.h @@ -33,6 +33,7 @@ protected: PUBLISHED: static string get_version_string(); + static string get_package_version_string(); static int get_major_version(); static int get_minor_version(); diff --git a/dtool/src/dtoolutil/pandaVersion.h.pp b/dtool/src/dtoolutil/pandaVersion.h.pp index 50ca55392a..c1a7e1cc0e 100644 --- a/dtool/src/dtoolutil/pandaVersion.h.pp +++ b/dtool/src/dtoolutil/pandaVersion.h.pp @@ -60,6 +60,11 @@ $[cdefine PANDA_OFFICIAL_VERSION] /* This is a string indicating who has provided this distribution. */ # define PANDA_DISTRIBUTOR "$[PANDA_DISTRIBUTOR]" +/* The string indicating the version number of the associated Panda3D + distributable package, or empty string if there is no associated + package. */ +# define PANDA_PACKAGE_VERSION_STR "$[PANDA_PACKAGE_VERSION]" + #end pandaVersion.h