From 798066a05ba8c94d8fd83782533dadc65d31e4c8 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 30 Apr 2020 21:43:31 +0200 Subject: [PATCH] dtool: remove outdated plugin-specific settings --- dtool/src/dtoolbase/pandaVersion.h.in | 10 --- dtool/src/dtoolutil/pandaSystem.cxx | 104 -------------------------- dtool/src/dtoolutil/pandaSystem.h | 9 --- dtool/src/prc/configPageManager.cxx | 21 ------ 4 files changed, 144 deletions(-) diff --git a/dtool/src/dtoolbase/pandaVersion.h.in b/dtool/src/dtoolbase/pandaVersion.h.in index ecaed20cd7..4854ae47df 100644 --- a/dtool/src/dtoolbase/pandaVersion.h.in +++ b/dtool/src/dtoolbase/pandaVersion.h.in @@ -61,13 +61,3 @@ /* 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@" - -/* 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@" diff --git a/dtool/src/dtoolutil/pandaSystem.cxx b/dtool/src/dtoolutil/pandaSystem.cxx index 79a8e5206b..62185a8307 100644 --- a/dtool/src/dtoolutil/pandaSystem.cxx +++ b/dtool/src/dtoolutil/pandaSystem.cxx @@ -31,11 +31,6 @@ PandaSystem() : { _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 add_system("stdfloat-double"); #endif @@ -86,75 +81,6 @@ get_version_string() { 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 * the first number of the dotted triple returned by get_version_string(). It @@ -465,33 +391,3 @@ reset_system_names() { _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; - } -} diff --git a/dtool/src/dtoolutil/pandaSystem.h b/dtool/src/dtoolutil/pandaSystem.h index 712b61e834..640338edbc 100644 --- a/dtool/src/dtoolutil/pandaSystem.h +++ b/dtool/src/dtoolutil/pandaSystem.h @@ -30,9 +30,6 @@ protected: PUBLISHED: 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_minor_version(); @@ -85,9 +82,6 @@ PUBLISHED: private: 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 SystemTags; typedef pmap Systems; typedef pvector SystemNames; @@ -96,9 +90,6 @@ private: SystemNames _system_names; bool _system_names_dirty; - std::string _package_version_string; - std::string _package_host_url; - static PandaSystem *_global_ptr; public: diff --git a/dtool/src/prc/configPageManager.cxx b/dtool/src/prc/configPageManager.cxx index 27afc3c395..c6672deddf 100644 --- a/dtool/src/prc/configPageManager.cxx +++ b/dtool/src/prc/configPageManager.cxx @@ -722,27 +722,6 @@ void ConfigPageManager:: 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. ConfigVariableEnum text_encoding ("text-encoding", TextEncoder::E_utf8,