Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 20, 2009, 5:32:04 PM (15 years ago)
Author:
rgrieder
Message:

Fixed install target:

  • log and config file go a to separate folder each
  • The SignalHandler crash log is now "orxonox_crash.log" to avoid opening the file twice which might result in problems
  • moved tcl scripts to media/tcl8.#/ as a temporary solution. I've also created a ticket to fix this.
  • UPDATE YOUR MEDIA REPOSITORY
  • orxonox.log pre-main gets written to either %TEMP% (windows) or /tmp (Unix) and when the path was set, the content is copied.
  • removed Settings class and moved media path to Core
  • media, log and config path are now all in Core where only the media path can be configured via ini file or command line
  • Core::isDevBuild() tells whether we are running in the build or the installation directory (determined by the presence of "orxonox_dev_build.kepp_me" in the binary dir)
  • renamed Settings::getDataPath to Core::getMediaPath
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem3/src/core/Core.h

    r2662 r2685  
    4444#include "util/OutputHandler.h"
    4545
     46// Only allow main to access setDevBuild, so we need a forward declaration
     47int main(int, char**);
     48
    4649namespace orxonox
    4750{
     
    4952    class _CoreExport Core : public OrxonoxClass
    5053    {
     54        friend int ::main(int, char**); // sets isDevBuild_s
     55
    5156        public:
    5257            Core();
    5358            ~Core();
    5459            void setConfigValues();
    55             void debugLevelChanged();
    56             void languageChanged();
    5760
    5861            static Core& getInstance() { assert(Core::singletonRef_s); return *Core::singletonRef_s; }
     
    6265            static const std::string& getLanguage();
    6366            static void  resetLanguage();
     67
     68            static bool isDevBuild() { return Core::isDevBuild_s; }
     69
     70            static const std::string& getMediaPath()
     71            { assert(singletonRef_s); return singletonRef_s->mediaPath_; }
     72            static void tsetMediaPath(const std::string& path)
     73            { assert(singletonRef_s); singletonRef_s->_tsetMediaPath(path); }
     74            static const std::string& getConfigPath() { return configPath_s; }
     75            static const std::string& getLogPath()    { return logPath_s; }
    6476
    6577            // fast access global variables.
     
    7991            void resetLanguageIntern();
    8092            void initializeRandomNumberGenerator();
     93            void debugLevelChanged();
     94            void languageChanged();
     95            void mediaPathChanged();
     96            void _tsetMediaPath(const std::string& path);
     97
     98            static void setDevBuild();
    8199
    82100            int softDebugLevel_;                            //!< The debug level
     
    85103            int softDebugLevelShell_;                       //!< The debug level for the ingame shell
    86104            std::string language_;                          //!< The language
    87             bool bInitializeRandomNumberGenerator_;          //!< If true, srand(time(0)) is called
     105            bool bInitializeRandomNumberGenerator_;         //!< If true, srand(time(0)) is called
     106            std::string mediaPath_;                         //!< Path to the data/media file folder
    88107
    89108            static bool bShowsGraphics_s;                   //!< global variable that tells whether to show graphics
     
    93112            static bool bIsMaster_s;
    94113
     114            static bool isDevBuild_s;                       //!< True for builds in the build directory (not installed)
     115            static std::string configPath_s;                //!< Path to the config file folder
     116            static std::string logPath_s;                   //!< Path to the log file folder
     117
    95118            static Core* singletonRef_s;
    96119    };
Note: See TracChangeset for help on using the changeset viewer.