Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2009, 2:13:29 PM (16 years ago)
Author:
rgrieder
Message:

Completed work on installation:

  • The CMake switch INSTALL_COPYABLE tells whether you will be able to move the installed directory or not. If TRUE then all folders, including log and config directory, will be put into the CMAKE_INSTALL_PREFIX. Furthermore, relative paths are used, which get resolved at run time.
  • If INSTALL_COPYABLE is set to FALSE, the standard operating system directories will be used. That also means on Windows files get written to the Application Data/.orxonox folder instead of Program Files/Orxonox
  • Default configuration is INSTALL_COPYABLE=TRUE for Windows and FALSE for Unix
  • Split OrxonoxConfig.h.in in two to avoid complete recompiles when changing only a path or INSTALL_COPYABLE
  • Added a global constant character: CP_SLASH which stands for cross platform slash, meaning '/' on Unix and '
    ' on Windows
  • Core class now has methods getFooPath(), getFooPathString() and getFooPathPOSIXString() where Foo can be Media, Log or Config
  • getFooPathPOSIXString() will always return a directory formatted with slashes, even on Windows
  • getFooPath() returns a reference to the boost::filesystem::path
  • boost/filesystem.hpp does not get included to Core.h because it has a very large rat tail
  • The platform specific directory stuff gets done in Core::postMainInitialisation()
  • Adjusted all classes using the media path
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem3/src/OrxonoxConfig.h.in

    r2688 r2702  
    180180 * Various Settings
    181181 *-------------------------------*/
    182 /* Set whether we must suffix "ceguilua/" for the CEGUILua.h include */
    183 #cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
    184 
    185 /* Defined if a precompiled depdency package was used. We then copy all libraries
    186    too when installing. */
    187 #cmakedefine DEPENDENCY_PACKAGE_ENABLE
    188 
    189 /* Using MSVC or XCode IDE */
    190 #cmakedefine CMAKE_CONFIGURATION_TYPES
    191 
    192 /* Macros used in the next section */
    193 #define MACRO_CONCATENATE(str1, str2) str1##str2
    194 #define MACRO_QUOTEME_AUX(x) #x
    195 #define MACRO_QUOTEME(x) MACRO_QUOTEME_AUX(x)
    196 
    197 /* Handle default ConfigValues */
     182/* Define a platform independent directory separator */
    198183namespace orxonox
    199184{
    200     const char* const ORXONOX_MEDIA_INSTALL_PATH ("@ORXONOX_MEDIA_INSTALL_PATH_EXEC@/");
    201     const char* const ORXONOX_CONFIG_INSTALL_PATH("@ORXONOX_CONFIG_INSTALL_PATH_EXEC@/");
    202     const char* const ORXONOX_LOG_INSTALL_PATH   ("@ORXONOX_LOG_INSTALL_PATH_EXEC@/");
    203 
    204     const char* const ORXONOX_MEDIA_DEV_PATH     ("@ORXONOX_MEDIA_DEV_PATH@/");
    205 #ifdef CMAKE_CONFIGURATION_TYPES
    206     const char* const ORXONOX_CONFIG_DEV_PATH    ("@ORXONOX_CONFIG_DEV_PATH@/" MACRO_QUOTEME(CMAKE_BUILD_TYPE) "/");
    207     const char* const ORXONOX_LOG_DEV_PATH       ("@ORXONOX_LOG_DEV_PATH@/"    MACRO_QUOTEME(CMAKE_BUILD_TYPE) "/");
     185#ifdef ORXONOX_PLATFORM_WINDOWS
     186    const char CP_SLASH('\\');
    208187#else
    209     const char* const ORXONOX_CONFIG_DEV_PATH    ("@ORXONOX_CONFIG_DEV_PATH@/");
    210     const char* const ORXONOX_LOG_DEV_PATH       ("@ORXONOX_LOG_DEV_PATH@/");
    211 #endif
    212    
    213     /* OGRE Plugins */
    214 #ifdef NDEBUG
    215     const char* const ORXONOX_OGRE_PLUGINS("@OGRE_PLUGINS_RELEASE@");
    216 #  ifdef DEPENDENCY_PACKAGE_ENABLE
    217     const char* const ORXONOX_OGRE_PLUGINS_FOLDER(".");
    218 #  else
    219     const char* const ORXONOX_OGRE_PLUGINS_FOLDER("@OGRE_PLUGINS_FOLDER_RELEASE@");
    220 #  endif
    221 #else
    222     const char* const ORXONOX_OGRE_PLUGINS("@OGRE_PLUGINS_DEBUG@");
    223 #  ifdef DEPENDENCY_PACKAGE_ENABLE
    224     const char* const ORXONOX_OGRE_PLUGINS_FOLDER(".");
    225 #  else
    226     const char* const ORXONOX_OGRE_PLUGINS_FOLDER("@OGRE_PLUGINS_FOLDER_DEBUG@");
    227 #  endif
     188    const char CP_SLASH('/')
    228189#endif
    229190}
    230191
     192
    231193#endif /* _OrxonoxConfig_H__ */
Note: See TracChangeset for help on using the changeset viewer.