Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2009, 2:13:29 PM (15 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/media/CMakeLists.txt

    r2685 r2702  
    2424 #
    2525
     26# This directory has to concur with the name set in BuildConfig.cmake
     27IF(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}/${DEFAULT_MEDIA_PATH}")
     28  MESSAGE(FATAL_ERROR "Value of DEFAULT_MEDIA_PATH does not concur with the name of the media directory in the source tree")
     29ENDIF()
     30
    2631# Specify media directory
    2732GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../media ABSOLUTE)
    28 FIND_PATH(ORXONOX_MEDIA_DEV_PATH resources.cfg
     33FIND_PATH(CMAKE_MEDIA_OUTPUT_DIRECTORY resources.cfg
    2934  PATHS
    3035    ${CMAKE_CURRENT_SOURCE_DIR}
    3136    ${_search_path_1}
    3237)
    33 IF(NOT ORXONOX_MEDIA_DEV_PATH)
     38IF(NOT CMAKE_MEDIA_OUTPUT_DIRECTORY)
    3439  MESSAGE(STATUS "Warning: Media directory not found. If you want to compile while downloading the media files, you must specify the directory by Hand BEFORE compiling! Default location is orxonox_root/media")
    3540  # Temporary override to the default location.
    36   SET(ORXONOX_MEDIA_DEV_PATH ${CMAKE_SOURCE_DIR}/media)
    37   SET(ORXONOX_MEDIA_DEV_PATH ${CMAKE_SOURCE_DIR}/media PARENT_SCOPE)
     41  SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/media)
     42  SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/media PARENT_SCOPE)
    3843ENDIF()
    3944
     
    4954
    5055INSTALL(
    51   DIRECTORY ${ORXONOX_MEDIA_DEV_PATH}/
     56  DIRECTORY ${CMAKE_MEDIA_OUTPUT_DIRECTORY}/
    5257  DESTINATION ${ORXONOX_MEDIA_INSTALL_PATH}
    5358  REGEX "\\.svn$|_svn$|backToPNG|${TCL_EXCLUDE_PATTERN}" EXCLUDE
Note: See TracChangeset for help on using the changeset viewer.