dtool: remove outdated plugin-specific settings

This commit is contained in:
rdb 2020-04-30 21:43:31 +02:00
parent 6ad9eeb5a1
commit 798066a05b
4 changed files with 0 additions and 144 deletions

View File

@ -61,13 +61,3 @@
/* This is a string indicating who has provided this distribution. */ /* This is a string indicating who has provided this distribution. */
#define PANDA_DISTRIBUTOR "@PANDA_DISTRIBUTOR@" #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@"
/* The string indicating the URL from which the associated Panda3D
distributable package may be downloaded, or empty string if there
is no associated package. */
#define PANDA_PACKAGE_HOST_URL "@PANDA_PACKAGE_HOST_URL@"

View File

@ -31,11 +31,6 @@ PandaSystem() :
{ {
_system_names_dirty = false; _system_names_dirty = false;
// These are settable via Config.prc, but only in development (!NDEBUG)
// mode, and only if they are not already defined.
_package_version_string = "";
_package_host_url = "";
#ifdef STDFLOAT_DOUBLE #ifdef STDFLOAT_DOUBLE
add_system("stdfloat-double"); add_system("stdfloat-double");
#endif #endif
@ -86,75 +81,6 @@ get_version_string() {
return PANDA_VERSION_STR; return PANDA_VERSION_STR;
} }
/**
* Returns the version of the Panda3D distributable package that provides this
* build of Panda.
*
* When the currently-executing version of Panda was loaded from a
* distributable package, such as via the browser plugin, then this string
* will be nonempty and will contain the corresponding version string. You
* can build applications that use this particular version of Panda by
* requesting it in the pdef file, using "panda3d", this version string, and
* the download host provided by get_package_host_url().
*
* If this string is empty, then the currently-executing Panda was built
* independently, and is not part of a distributable package.
*
* @deprecated Runtime/plugin environment has been removed, this now always
* returns an empty string.
*/
string PandaSystem::
get_package_version_string() {
#ifdef NDEBUG
return "";
#else
return get_global_ptr()->_package_version_string;
#endif
}
/**
* Returns the URL of the download server that provides the Panda3D
* distributable package currently running. This can be used, along with the
* get_package_version_string(), to uniquely identify the running version of
* Panda among distributable Panda versions.
*
* See get_package_version_string() for more information.
*
* This string is set explicitly at compilation time. Normally, it should be
* set to a nonempty string only when building a Panda3D package for
* distribution.
*
* @deprecated Runtime/plugin environment has been removed, this now always
* returns an empty string.
*/
string PandaSystem::
get_package_host_url() {
#ifdef NDEBUG
return "";
#else
return get_global_ptr()->_package_host_url;
#endif
}
/**
* Returns the current version of Panda's Core API, expressed as a string of
* dot-delimited integers. There are usually four integers in this version,
* but this is not guaranteed.
*
* The Core API is used during the runtime (plugin) environment only. This
* may be the empty string if the current version of Panda is not built to
* provide a particular Core API, which will be the normal case in a
* development SDK. However, you should not use this method to determine
* whether you are running in a runtime environment or not.
*
* @deprecated Runtime/plugin environment has been removed, this now always
* returns an empty string.
*/
string PandaSystem::
get_p3d_coreapi_version_string() {
return "";
}
/** /**
* Returns the major version number of the current version of Panda. This is * Returns the major version number of the current version of Panda. This is
* the first number of the dotted triple returned by get_version_string(). It * the first number of the dotted triple returned by get_version_string(). It
@ -465,33 +391,3 @@ reset_system_names() {
_system_names_dirty = false; _system_names_dirty = false;
} }
/**
* Loads the value returned by get_package_version_string(). This is intended
* to be called by ConfigPageManager to preload the value from the panda-
* package-version config variable, for developer's convenience. This has no
* effect if the PANDA_PACKAGE_VERSION_STR configure variable is defined at
* compilation time. This also has no effect in NDEBUG mode.
*/
void PandaSystem::
set_package_version_string(const string &package_version_string) {
_package_version_string = "";
if (_package_version_string.empty()) {
_package_version_string = package_version_string;
}
}
/**
* Loads the value returned by get_package_host_url(). This is intended to be
* called by ConfigPageManager to preload the value from the panda-package-
* host-url config variable, for developer's convenience. This has no effect
* if the PANDA_PACKAGE_HOST_URL configure variable is defined at compilation
* time. This also has no effect in NDEBUG mode.
*/
void PandaSystem::
set_package_host_url(const string &package_host_url) {
_package_host_url = "";
if (_package_host_url.empty()) {
_package_host_url = package_host_url;
}
}

View File

@ -30,9 +30,6 @@ protected:
PUBLISHED: PUBLISHED:
static std::string get_version_string(); static std::string get_version_string();
static std::string get_package_version_string();
static std::string get_package_host_url();
static std::string get_p3d_coreapi_version_string();
static int get_major_version(); static int get_major_version();
static int get_minor_version(); static int get_minor_version();
@ -85,9 +82,6 @@ PUBLISHED:
private: private:
void reset_system_names(); void reset_system_names();
void set_package_version_string(const std::string &package_version_string);
void set_package_host_url(const std::string &package_host_url);
typedef pmap<std::string, std::string> SystemTags; typedef pmap<std::string, std::string> SystemTags;
typedef pmap<std::string, SystemTags> Systems; typedef pmap<std::string, SystemTags> Systems;
typedef pvector<std::string> SystemNames; typedef pvector<std::string> SystemNames;
@ -96,9 +90,6 @@ private:
SystemNames _system_names; SystemNames _system_names;
bool _system_names_dirty; bool _system_names_dirty;
std::string _package_version_string;
std::string _package_host_url;
static PandaSystem *_global_ptr; static PandaSystem *_global_ptr;
public: public:

View File

@ -722,27 +722,6 @@ void ConfigPageManager::
config_initialized() { config_initialized() {
Notify::config_initialized(); Notify::config_initialized();
#ifndef NDEBUG
ConfigVariableString panda_package_version
("panda-package-version", "local_dev",
PRC_DESC("This can be used to specify the value returned by "
"PandaSystem::get_package_version_str(), in development mode only, "
"and only if another value has not already been compiled in. This "
"is intended for developer convenience, to masquerade a development "
"build of Panda as a different runtime version. Use with caution."));
ConfigVariableString panda_package_host_url
("panda-package-host-url", "",
PRC_DESC("This can be used to specify the value returned by "
"PandaSystem::get_package_host_url(), in development mode only, "
"and only if another value has not already been compiled in. This "
"is intended for developer convenience, to masquerade a development "
"build of Panda as a different runtime version. Use with caution."));
PandaSystem *panda_sys = PandaSystem::get_global_ptr();
panda_sys->set_package_version_string(panda_package_version);
panda_sys->set_package_host_url(panda_package_host_url);
#endif // NDEBUG
// Also set up some other low-level things. // Also set up some other low-level things.
ConfigVariableEnum<TextEncoder::Encoding> text_encoding ConfigVariableEnum<TextEncoder::Encoding> text_encoding
("text-encoding", TextEncoder::E_utf8, ("text-encoding", TextEncoder::E_utf8,