Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 21, 2009, 2:17:09 PM (15 years ago)
Author:
landauf
Message:

renamed plugins as modules

Location:
code/branches/libraries/src/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/libraries/src/core/Core.cc

    r5665 r5666  
    250250        boost::filesystem::path rootPath_;
    251251        boost::filesystem::path executablePath_;        //!< Path to the executable
    252         boost::filesystem::path pluginPath_;            //!< Path to the plugins
     252        boost::filesystem::path modulePath_;            //!< Path to the modules
    253253        boost::filesystem::path mediaPath_;             //!< Path to the media file folder
    254254        boost::filesystem::path configPath_;            //!< Path to the config file folder
     
    272272        this->dynLibManager_.reset(new DynLibManager());
    273273
    274         // Load plugins
     274        // Load modules
    275275        try
    276276        {
    277277            // We search for helper files with the following extension
    278             std::string pluginextension = ".plugin";
    279             size_t pluginextensionlength = pluginextension.size();
     278            std::string moduleextension = ORXONOX_MODULE_EXTENSION;
     279            size_t moduleextensionlength = moduleextension.size();
    280280
    281281            // Search in the directory of our executable
    282             boost::filesystem::path searchpath = this->configuration_->pluginPath_;
    283 
    284             // Add that path to the PATH variable in case a plugin depends on another one
     282            boost::filesystem::path searchpath = this->configuration_->modulePath_;
     283
     284            // Add that path to the PATH variable in case a module depends on another one
    285285            std::string pathVariable = getenv("PATH");
    286             putenv(const_cast<char*>(("PATH=" + pathVariable + ";" + configuration_->pluginPath_.string()).c_str()));
     286            putenv(const_cast<char*>(("PATH=" + pathVariable + ";" + configuration_->modulePath_.string()).c_str()));
    287287
    288288            boost::filesystem::directory_iterator file(searchpath);
     
    295295
    296296                // Check if the file ends with the exension in question
    297                 if (filename.size() > pluginextensionlength)
     297                if (filename.size() > moduleextensionlength)
    298298                {
    299                     if (filename.substr(filename.size() - pluginextensionlength) == pluginextension)
     299                    if (filename.substr(filename.size() - moduleextensionlength) == moduleextension)
    300300                    {
    301301                        // We've found a helper file - now load the library with the same name
    302                         std::string library = filename.substr(0, filename.size() - pluginextensionlength);
     302                        std::string library = filename.substr(0, filename.size() - moduleextensionlength);
    303303                        boost::filesystem::path librarypath = searchpath / library;
    304304
     
    309309                        catch (const std::exception& e)
    310310                        {
    311                             COUT(1) << "Couldn't load plugin \"" << librarypath.string() << "\": " << e.what() << std::endl;
     311                            COUT(1) << "Couldn't load module \"" << librarypath.string() << "\": " << e.what() << std::endl;
    312312                        }
    313313                        catch (...)
    314314                        {
    315                             COUT(1) << "Couldn't load plugin \"" << librarypath.string() << "\"" << std::endl;
     315                            COUT(1) << "Couldn't load module \"" << librarypath.string() << "\"" << std::endl;
    316316                        }
    317317                    }
     
    323323        catch (const std::exception& e)
    324324        {
    325             COUT(1) << "An error occurred while loading plugins: " << e.what() << std::endl;
     325            COUT(1) << "An error occurred while loading modules: " << e.what() << std::endl;
    326326        }
    327327        catch (...)
    328328        {
    329             COUT(1) << "An error occurred while loading plugins." << std::endl;
    330         }
    331 
    332         // Parse command line arguments AFTER the plugins have been loaded (static code!)
     329            COUT(1) << "An error occurred while loading modules." << std::endl;
     330        }
     331
     332        // Parse command line arguments AFTER the modules have been loaded (static code!)
    333333        CommandLine::parseCommandLine(cmdLine);
    334334
     
    574574    /**
    575575    @brief
    576         Retrievs the executable path and sets all hard coded fixed path (currently only plugin path)
     576        Retrievs the executable path and sets all hard coded fixed path (currently only the module path)
    577577        Also checks for "orxonox_dev_build.keep_me" in the executable diretory.
    578578        If found it means that this is not an installed run, hence we
     
    631631
    632632        /////////////////////
    633         // SET PLUGIN PATH //
     633        // SET MODULE PATH //
    634634        /////////////////////
    635635
     
    638638            COUT(1) << "Running from the build tree." << std::endl;
    639639            Core::bDevRun_ = true;
    640             configuration_->pluginPath_ = ORXONOX_PLUGIN_DEV_PATH;
     640            configuration_->modulePath_ = ORXONOX_MODULE_DEV_PATH;
    641641        }
    642642        else
     
    654654                ThrowException(General, "Could not derive a root directory. Might the binary installation directory contain '..' when taken relative to the installation prefix path?");
    655655
    656             // Plugin path is fixed as well
    657             configuration_->pluginPath_ = configuration_->rootPath_ / ORXONOX_PLUGIN_INSTALL_PATH;
     656            // Module path is fixed as well
     657            configuration_->modulePath_ = configuration_->rootPath_ / ORXONOX_MODULE_INSTALL_PATH;
    658658
    659659#else
    660660
    661661            // There is no root path, so don't set it at all
    662             // Plugin path is fixed as well
    663             configuration_->pluginPath_ = ORXONOX_PLUGIN_INSTALL_PATH;
     662            // Module path is fixed as well
     663            configuration_->modulePath_ = ORXONOX_MODULE_INSTALL_PATH;
    664664
    665665#endif
  • code/branches/libraries/src/core/DynLib.cc

    r5631 r5666  
    6464    {
    6565        // Log library load
    66         COUT(2) << "Loading plugin " << mName << std::endl;
     66        COUT(2) << "Loading module " << mName << std::endl;
    6767
    6868                std::string name = mName;
     
    8686    {
    8787        // Log library unload
    88         COUT(4) << "Unloading plugin " << mName << std::endl;
     88        COUT(4) << "Unloading module " << mName << std::endl;
    8989
    9090        if( DYNLIB_UNLOAD( m_hInst ) )
Note: See TracChangeset for help on using the changeset viewer.