Index: /code/branches/resource2/CMakeLists.txt
===================================================================
--- /code/branches/resource2/CMakeLists.txt	(revision 5640)
+++ /code/branches/resource2/CMakeLists.txt	(revision 5641)
@@ -47,5 +47,5 @@
 
 # Configure media directory location and installation
-INCLUDE(Media)
+ADD_SUBDIRECTORY(media)
 
 # Create the actual project
Index: /code/branches/resource2/bin/CMakeLists.txt
===================================================================
--- /code/branches/resource2/bin/CMakeLists.txt	(revision 5640)
+++ /code/branches/resource2/bin/CMakeLists.txt	(revision 5641)
@@ -45,5 +45,5 @@
   SEt(_default_subdir) # No default subdir
 ENDIF()
-STRING(REPLACE "/" "\\" ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY})
+STRING(REPLACE "/" "\\" RUNTIME_LIBRARY_DIRECTORY_WINDOWS ${RUNTIME_LIBRARY_DIRECTORY})
 FOREACH(_subdir ${_subdirs})
   GET_FILENAME_COMPONENT(CURRENT_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_subdir} ABSOLUTE)
@@ -69,4 +69,4 @@
 # Make a symlink to be able to run from the root directory when installing copyable on Unix
 IF(UNIX AND INSTALL_COPYABLE)
-  INSTAll(CODE "EXECUTE_PROCESS(COMMAND ln -sf ${ORXONOX_RUNTIME_INSTALL_PATH}/${ORXONOX_EXECUTABLE_NAME} ${CMAKE_INSTALL_PREFIX}/orxonox)")
+  INSTAll(CODE "EXECUTE_PROCESS(COMMAND ln -sf ${RUNTIME_INSTALL_DIRECTORY}/${ORXONOX_EXECUTABLE_NAME} ${CMAKE_INSTALL_PREFIX}/orxonox)")
 ENDIF()
Index: /code/branches/resource2/bin/client1.bat.in
===================================================================
--- /code/branches/resource2/bin/client1.bat.in	(revision 5640)
+++ /code/branches/resource2/bin/client1.bat.in	(revision 5641)
@@ -1,4 +1,4 @@
 title @PROJECT_NAME@
-path @ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
+path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --client --writingPathSuffix client1
 pause
Index: /code/branches/resource2/bin/client2.bat.in
===================================================================
--- /code/branches/resource2/bin/client2.bat.in	(revision 5640)
+++ /code/branches/resource2/bin/client2.bat.in	(revision 5641)
@@ -1,4 +1,4 @@
 title @PROJECT_NAME@
-path @ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
+path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --client --writingPathSuffix client2
 pause
Index: /code/branches/resource2/bin/dedicated.bat.in
===================================================================
--- /code/branches/resource2/bin/dedicated.bat.in	(revision 5640)
+++ /code/branches/resource2/bin/dedicated.bat.in	(revision 5641)
@@ -1,4 +1,4 @@
 title @PROJECT_NAME@
-path @ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
+path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --dedicated --writingPathSuffix dedicated
 pause
Index: /code/branches/resource2/bin/run.bat.in
===================================================================
--- /code/branches/resource2/bin/run.bat.in	(revision 5640)
+++ /code/branches/resource2/bin/run.bat.in	(revision 5641)
@@ -1,4 +1,4 @@
 title @PROJECT_NAME@
-path @ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
+path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@
 pause
Index: /code/branches/resource2/bin/server.bat.in
===================================================================
--- /code/branches/resource2/bin/server.bat.in	(revision 5640)
+++ /code/branches/resource2/bin/server.bat.in	(revision 5641)
@@ -1,4 +1,4 @@
 title @PROJECT_NAME@
-path @ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
+path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --server --writingPathSuffix server
 pause
Index: /code/branches/resource2/bin/standalone.bat.in
===================================================================
--- /code/branches/resource2/bin/standalone.bat.in	(revision 5640)
+++ /code/branches/resource2/bin/standalone.bat.in	(revision 5641)
@@ -1,4 +1,4 @@
 title @PROJECT_NAME@
-path @ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
+path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --standalone --writingPathSuffix standalone
 pause
Index: /code/branches/resource2/cmake/BuildConfig.cmake
===================================================================
--- /code/branches/resource2/cmake/BuildConfig.cmake	(revision 5640)
+++ /code/branches/resource2/cmake/BuildConfig.cmake	(revision 5641)
@@ -40,6 +40,6 @@
 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_LIBRARY_PATH})
 SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_ARCHIVE_PATH})
-# Do not set doc and media, rather check in the two subdirectories
-# whether they concur with the DEFAULT_..._PATH
+SET(CMAKE_DOC_OUTPUT_DIRECTORY     ${CMAKE_BINARY_DIR}/${DEFAULT_DOC_PATH})
+# Media directories are only inputs
 SET(CMAKE_CONFIG_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR}/${DEFAULT_CONFIG_PATH})
 SET(CMAKE_LOG_OUTPUT_DIRECTORY     ${CMAKE_BINARY_DIR}/${DEFAULT_LOG_PATH})
@@ -50,6 +50,6 @@
 # Sets where to find the external libraries like OgreMain.dll at runtime
 # On Unix you should not have to change this at all.
-IF(NOT ORXONOX_RUNTIME_LIBRARY_DIRECTORY)
-  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+IF(NOT RUNTIME_LIBRARY_DIRECTORY)
+  SET(RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
 ENDIF()
 
@@ -126,35 +126,26 @@
 ENDIF()
 
-IF(INSTALL_COPYABLE)
-  # Note the relative paths. They will be resolved at runtime.
-  # For CMake operations CMAKE_INSTALL_PREFIX is always appended.
-  SET(ORXONOX_RUNTIME_INSTALL_PATH ${DEFAULT_RUNTIME_PATH})
-  SET(ORXONOX_LIBRARY_INSTALL_PATH ${DEFAULT_LIBRARY_PATH})
-  SET(ORXONOX_ARCHIVE_INSTALL_PATH ${DEFAULT_ARCHIVE_PATH})
-  SET(ORXONOX_DOC_INSTALL_PATH     ${DEFAULT_DOC_PATH})
-  SET(ORXONOX_MEDIA_INSTALL_PATH   ${DEFAULT_MEDIA_PATH})
-  SET(ORXONOX_CONFIG_INSTALL_PATH  ${DEFAULT_CONFIG_PATH})
-  SET(ORXONOX_LOG_INSTALL_PATH     ${DEFAULT_LOG_PATH})
-
-ELSEIF(UNIX) # Apple too?
-  # Using absolute paths
-  SET(ORXONOX_RUNTIME_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/bin)
-  SET(ORXONOX_LIBRARY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/orxonox)
-  SET(ORXONOX_ARCHIVE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/orxonox/static)
-  SET(ORXONOX_DOC_INSTALL_PATH     ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox)
-  SET(ORXONOX_MEDIA_INSTALL_PATH   ${CMAKE_INSTALL_PREFIX}/share/orxonox)
-  # These two paths are user and therefore runtime dependent --> only set relatively
-  SET(ORXONOX_CONFIG_INSTALL_PATH  ${DEFAULT_CONFIG_PATH})
-  SET(ORXONOX_LOG_INSTALL_PATH     ${DEFAULT_LOG_PATH})
-
-ELSEIF(WIN32)
-  SET(ORXONOX_RUNTIME_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_RUNTIME_PATH})
-  SET(ORXONOX_LIBRARY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH})
-  SET(ORXONOX_ARCHIVE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH})
-  SET(ORXONOX_DOC_INSTALL_PATH     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH})
-  SET(ORXONOX_MEDIA_INSTALL_PATH   ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MEDIA_PATH})
+# Default installation paths
+SET(RUNTIME_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_RUNTIME_PATH})
+SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH})
+SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH})
+SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH})
+SET(MEDIA_INSTALL_DIRECTORY   ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MEDIA_PATH})
+SET(CONFIG_INSTALL_DIRECTORY  ${CMAKE_INSTALL_PREFIX}/${DEFAULT_CONFIG_PATH})
+SET(LOG_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LOG_PATH})
+
+IF(NOT INSTALL_COPYABLE)
+  IF(UNIX) # Apple too?
+    # Using absolute paths
+    SET(RUNTIME_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)
+    SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox)
+    SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox/static)
+    SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox)
+    SET(MEDIA_INSTALL_DIRECTORY   ${CMAKE_INSTALL_PREFIX}/share/orxonox)
+  ENDIF()
+
   # Leave empty because it is user and therefore runtime dependent
-  SET(ORXONOX_CONFIG_INSTALL_PATH  ${DEFAULT_CONFIG_PATH})
-  SET(ORXONOX_LOG_INSTALL_PATH     ${DEFAULT_LOG_PATH})
+  SET(CONFIG_INSTALL_DIRECTORY)
+  SET(LOG_INSTALL_DIRECTORY)
 ENDIF()
 
@@ -170,5 +161,9 @@
 
 # the RPATH to be used when installing
-SET(CMAKE_INSTALL_RPATH ${ORXONOX_LIBRARY_INSTALL_PATH})
+IF(INSTALL_COPYABLE)
+  SET(CMAKE_INSTALL_RPATH ${DEFAULT_LIBRARY_PATH})
+ELSE()
+  SET(CMAKE_INSTALL_RPATH ${LIBRARY_INSTALL_DIRECTORY})
+ENDIF()
 
 # add the automatically determined parts of the RPATH
Index: /code/branches/resource2/cmake/GenerateToluaBindings.cmake
===================================================================
--- /code/branches/resource2/cmake/GenerateToluaBindings.cmake	(revision 5640)
+++ /code/branches/resource2/cmake/GenerateToluaBindings.cmake	(revision 5641)
@@ -30,5 +30,5 @@
  #    TOLUA_PARSER_SOURCE - Lua file with the parser source code
  #    TOLUA_PARSER_DEPENDENCIES - All the dependent lua files
- #    ORXONOX_RUNTIME_LIBRARY_DIRECTORY - Working directory
+ #    RUNTIME_LIBRARY_DIRECTORY - Working directory
  #
 
@@ -74,5 +74,5 @@
     DEPENDS           ${TOLUA_PARSER_DEPENDENCIES}
     IMPLICIT_DEPENDS  ${_implicit_dependencies}
-    WORKING_DIRECTORY ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
+    WORKING_DIRECTORY ${RUNTIME_LIBRARY_DIRECTORY}
     COMMENT "Generating tolua bind files for package ${_tolua_package}"
   )
Index: de/branches/resource2/cmake/Media.cmake
===================================================================
--- /code/branches/resource2/cmake/Media.cmake	(revision 5640)
+++ 	(revision )
@@ -1,51 +1,0 @@
- #
- #             ORXONOX - the hottest 3D action shooter ever to exist
- #                             > www.orxonox.net <
- #
- #        This program is free software; you can redistribute it and/or
- #         modify it under the terms of the GNU General Public License
- #        as published by the Free Software Foundation; either version 2
- #            of the License, or (at your option) any later version.
- #
- #       This program is distributed in the hope that it will be useful,
- #        but WITHOUT ANY WARRANTY; without even the implied warranty of
- #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- #                 GNU General Public License for more details.
- #
- #   You should have received a copy of the GNU General Public License along
- #      with this program; if not, write to the Free Software Foundation,
- #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- #
- #
- #  Author:
- #    Reto Grieder
- #  Description:
- #    Finds the media directory and configures it's installation.
- #
-
-# Specify media directory
-GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_MEDIA_PATH} ABSOLUTE)
-FIND_PATH(MEDIA_PATH resources.cfg
-  PATHS
-    ${CMAKE_SOURCE_DIR}/${DEFAULT_MEDIA_PATH}
-    ${_search_path_1}
-  NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
-)
-
-# For consistency with other variables for config, log, bin, etc.
-SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${MEDIA_PATH})
-
-IF(NOT CMAKE_MEDIA_OUTPUT_DIRECTORY)
-  MESSAGE(STATUS "Warning: Media directory not found. If you want to compile while downloading the media files, you will have to recompile about four files afterwards and relink everything. Default location is orxonox_root/media")
-  # Temporary override to the default location.
-  SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/media)
-ENDIF()
-
-
-################ Installation #################
-
-INSTALL(
-  DIRECTORY ${CMAKE_MEDIA_OUTPUT_DIRECTORY}/
-  DESTINATION ${ORXONOX_MEDIA_INSTALL_PATH}
-  REGEX "\\.svn$|_svn$|backToPNG" EXCLUDE
-)
Index: /code/branches/resource2/cmake/PackageConfig.cmake
===================================================================
--- /code/branches/resource2/cmake/PackageConfig.cmake	(revision 5640)
+++ /code/branches/resource2/cmake/PackageConfig.cmake	(revision 5641)
@@ -1,4 +1,27 @@
-# General package configuration. Merely sets the include paths.
-# Library files are treated separately.
+ #
+ #             ORXONOX - the hottest 3D action shooter ever to exist
+ #                             > www.orxonox.net <
+ #
+ #        This program is free software; you can redistribute it and/or
+ #         modify it under the terms of the GNU General Public License
+ #        as published by the Free Software Foundation; either version 2
+ #            of the License, or (at your option) any later version.
+ #
+ #       This program is distributed in the hope that it will be useful,
+ #        but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #                 GNU General Public License for more details.
+ #
+ #   You should have received a copy of the GNU General Public License along
+ #      with this program; if not, write to the Free Software Foundation,
+ #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #
+ #
+ #  Author:
+ #    Reto Grieder
+ #  Description:
+ #    General package configuration. Merely sets the include paths.
+ #    Library files are treated separately.
+ #
 
 # Check package version info
Index: /code/branches/resource2/cmake/PackageConfigMSVC.cmake
===================================================================
--- /code/branches/resource2/cmake/PackageConfigMSVC.cmake	(revision 5640)
+++ /code/branches/resource2/cmake/PackageConfigMSVC.cmake	(revision 5641)
@@ -47,5 +47,5 @@
 
   # Also the directory with the runtime libraries
-  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
+  SET(RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
 
   # Sets the library path for the FIND_LIBRARY
Index: /code/branches/resource2/cmake/PackageConfigMinGW.cmake
===================================================================
--- /code/branches/resource2/cmake/PackageConfigMinGW.cmake	(revision 5640)
+++ /code/branches/resource2/cmake/PackageConfigMinGW.cmake	(revision 5641)
@@ -40,5 +40,5 @@
 
   # Also the directory with the runtime libraries
-  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
+  SET(RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
 
   # Sets the library path for the FIND_LIBRARY
Index: /code/branches/resource2/cmake/TargetUtilities.cmake
===================================================================
--- /code/branches/resource2/cmake/TargetUtilities.cmake	(revision 5640)
+++ /code/branches/resource2/cmake/TargetUtilities.cmake	(revision 5641)
@@ -175,7 +175,7 @@
   IF(NOT _arg_STATIC AND NOT _arg_NO_INSTALL)
     INSTALL(TARGETS ${_target_name}
-      RUNTIME DESTINATION ${ORXONOX_RUNTIME_INSTALL_PATH}
-      LIBRARY DESTINATION ${ORXONOX_LIBRARY_INSTALL_PATH}
-      #ARCHIVE DESTINATION ${ORXONOX_ARCHIVE_INSTALL_PATH}
+      RUNTIME DESTINATION ${RUNTIME_INSTALL_DIRECTORY}
+      LIBRARY DESTINATION ${LIBRARY_INSTALL_DIRECTORY}
+      #ARCHIVE DESTINATION ${ARCHIVE_INSTALL_DIRECTORY}
     )
   ENDIF()
Index: /code/branches/resource2/doc/api/CMakeLists.txt
===================================================================
--- /code/branches/resource2/doc/api/CMakeLists.txt	(revision 5640)
+++ /code/branches/resource2/doc/api/CMakeLists.txt	(revision 5641)
@@ -76,6 +76,5 @@
   INSTALL(
     FILES ${DOXY_CONFIG} ${CMAKE_CURRENT_BINARY_DIR}/doxy.log
-    DESTINATION ${ORXONOX_DOC_INSTALL_PATH}/api
-    OPTIONAL
+    DESTINATION ${DOC_INSTALL_DIRECTORY}/api OPTIONAL
   )
   # Install command always needs the directory
@@ -85,5 +84,5 @@
   INSTALL(
     DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
-    DESTINATION ${ORXONOX_DOC_INSTALL_PATH}/api
+    DESTINATION ${DOC_INSTALL_DIRECTORY}/api
   )
 ENDIF(DOXYGEN_FOUND)
Index: /code/branches/resource2/media/CMakeLists.txt
===================================================================
--- /code/branches/resource2/media/CMakeLists.txt	(revision 5641)
+++ /code/branches/resource2/media/CMakeLists.txt	(revision 5641)
@@ -0,0 +1,65 @@
+ #
+ #             ORXONOX - the hottest 3D action shooter ever to exist
+ #                             > www.orxonox.net <
+ #
+ #        This program is free software; you can redistribute it and/or
+ #         modify it under the terms of the GNU General Public License
+ #        as published by the Free Software Foundation; either version 2
+ #            of the License, or (at your option) any later version.
+ #
+ #       This program is distributed in the hope that it will be useful,
+ #        but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #                 GNU General Public License for more details.
+ #
+ #   You should have received a copy of the GNU General Public License along
+ #      with this program; if not, write to the Free Software Foundation,
+ #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #
+ #
+ #  Author:
+ #    Reto Grieder
+ #  Description:
+ #    Finds the external media directory and configures the media installation.
+ #    Default search paths are: ../../media and ../media_extern
+ #
+
+# For dev runs we've got two media directory. The one from the other repository root folder
+# is called EXTERNAL_MEDIA
+SET(MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+SET(MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
+
+# Specify media directory
+GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_MEDIA_PATH} ABSOLUTE)
+FIND_PATH(EXTERNAL_MEDIA_DIRECTORY resources.oxr
+  PATHS
+    ${CMAKE_SOURCE_DIR}/media_extern
+    ${_search_path_1}
+  NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
+)
+
+IF(NOT EXTERNAL_MEDIA_DIRECTORY)
+  MESSAGE(STATUS "Warning: External media directory not found. If you want to compile while downloading the media files, you will have to recompile about four files afterwards and relink everything. \\n You can specify your own folder with the MEDIA_DIRECTORY variable. Default location for the path is orxonox_root/media_extern")
+  # Temporary override to the default location.
+  SET(EXTERNAL_MEDIA_DIRECTORY ${CMAKE_SOURCE_DIR}/media_extern)
+ENDIF()
+
+
+################ Installation #################
+
+# Internal directory
+INSTALL(
+  DIRECTORY ${MEDIA_DIRECTORY}/
+  DESTINATION ${MEDIA_INSTALL_DIRECTORY}
+  REGEX "\\.svn$|_svn$|CMakeLists.txt|InstallScript.cmake" EXCLUDE
+)
+# External directory
+INSTALL(
+  DIRECTORY ${EXTERNAL_MEDIA_DIRECTORY}/
+  DESTINATION ${MEDIA_INSTALL_DIRECTORY}
+  REGEX "\\.svn$|_svn$|resources\\.oxr" EXCLUDE
+)
+# Configure the install scripts (variables not available during installation)
+CONFIGURE_FILE(MediaInstallScript.cmake ${CMAKE_CURRENT_BINARY_DIR}/MediaInstallScript.cmake @ONLY)
+# Join both resources.oxr files
+INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/MediaInstallScript.cmake)
Index: /code/branches/resource2/media/MediaInstallScript.cmake
===================================================================
--- /code/branches/resource2/media/MediaInstallScript.cmake	(revision 5641)
+++ /code/branches/resource2/media/MediaInstallScript.cmake	(revision 5641)
@@ -0,0 +1,37 @@
+ #
+ #             ORXONOX - the hottest 3D action shooter ever to exist
+ #                             > www.orxonox.net <
+ #
+ #        This program is free software; you can redistribute it and/or
+ #         modify it under the terms of the GNU General Public License
+ #        as published by the Free Software Foundation; either version 2
+ #            of the License, or (at your option) any later version.
+ #
+ #       This program is distributed in the hope that it will be useful,
+ #        but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #                 GNU General Public License for more details.
+ #
+ #   You should have received a copy of the GNU General Public License along
+ #      with this program; if not, write to the Free Software Foundation,
+ #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #
+ #
+ #  Author:
+ #    Reto Grieder
+ #  Description:
+ #    Joins both resources.oxr files together
+ #  Caution:
+ #    Variables are declared with @...@ because they don't exist anymore
+ #    during the installation. But we still require variables (_external_file)
+ #    so we can only replace @...@ but not ${...}
+ #
+
+# Write some comment
+FILE(APPEND @MEDIA_INSTALL_DIRECTORY@/resources.oxr "\n\n\n <!-- ----------------------------------------- -->")
+FILE(APPEND @MEDIA_INSTALL_DIRECTORY@/resources.oxr     "\n <!-- Content from the external media directory -->")
+FILE(APPEND @MEDIA_INSTALL_DIRECTORY@/resources.oxr     "\n <!-- ----------------------------------------- -->\n\n")
+
+# Append the external file
+FILE(READ   @EXTERNAL_MEDIA_DIRECTORY@/resources.oxr _external_file)
+FILE(APPEND @MEDIA_INSTALL_DIRECTORY@/resources.oxr ${_external_file})
Index: /code/branches/resource2/src/SpecialConfig.h.in
===================================================================
--- /code/branches/resource2/src/SpecialConfig.h.in	(revision 5640)
+++ /code/branches/resource2/src/SpecialConfig.h.in	(revision 5641)
@@ -70,43 +70,53 @@
 
 // Handle default ConfigValues
-namespace orxonox
+namespace orxonox { namespace specialConfig
 {
+    // DEFAULT RELATIVE PATHS (might not be used at all)
+    const char defaultRuntimePath[] = "@DEFAULT_RUNTIME_PATH@";
+    const char defaultLibraryPath[] = "@DEFAULT_LIBRARY_PATH@";
+    const char defaultArchivePath[] = "@DEFAULT_ARCHIVE_PATH@";
+    const char defaultDocPath[]     = "@DEFAULT_DOC_PATH@";
+    const char defaultMediaPath[]   = "@DEFAULT_MEDIA_PATH@";
+    const char defaultConfigPath[]  = "@DEFAULT_CONFIG_PATH@";
+    const char defaultLogPath[]     = "@DEFAULT_LOG_PATH@";
+
     // INSTALLATION PATHS
-    const char ORXONOX_RUNTIME_INSTALL_PATH[] = "@ORXONOX_RUNTIME_INSTALL_PATH@";
-    const char ORXONOX_MEDIA_INSTALL_PATH[]   = "@ORXONOX_MEDIA_INSTALL_PATH@";
-    /* Config and Log path might be relative because they could be user and therefore runtime dependent */
-    const char ORXONOX_CONFIG_INSTALL_PATH[]  = "@ORXONOX_CONFIG_INSTALL_PATH@";
-    const char ORXONOX_LOG_INSTALL_PATH[]     = "@ORXONOX_LOG_INSTALL_PATH@";
+    const char runtimeInstallDirectory[]    = "@RUNTIME_INSTALL_DIRECTORY@";
+    const char mediaInstallDirectory[]      = "@MEDIA_INSTALL_DIRECTORY@";
+    const char configInstallDirectory[]     = "@CONFIG_INSTALL_DIRECTORY@";
+    const char logInstallDirectory[]        = "@LOG_INSTALL_DIRECTORY@";
 
     // DEVELOPMENT RUN PATHS
-    const char ORXONOX_MEDIA_DEV_PATH[]       = "@CMAKE_MEDIA_OUTPUT_DIRECTORY@";
+    const char mediaDevDirectory[]          = "@MEDIA_DIRECTORY@";
+    const char externalMediaDevDirectory[]  = "@EXTERNAL_MEDIA_DIRECTORY@";
 #ifdef CMAKE_CONFIGURATION_TYPES
-    const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
-    const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@/"    BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
+    const char configDevDirectory[]         = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
+    const char logDevDirectory[]            = "@CMAKE_LOG_OUTPUT_DIRECTORY@/"    BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
 #else
-    const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@";
-    const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@";
+    const char configDevDirectory[]         = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@";
+    const char logDevDirectory[]            = "@CMAKE_LOG_OUTPUT_DIRECTORY@";
 #endif
+
 #ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char ORXONOX_DEP_LIB_PATH[]         = "@DEP_LIBRARY_DIR@";
+    const char dependencyLibraryDirectory[] = "@DEP_LIBRARY_DIR@";
 #endif
 
     // OGRE PLUGINS
 #ifdef NDEBUG
-    const char ORXONOX_OGRE_PLUGINS[] = "@OGRE_PLUGINS_RELEASE@";
+    const char ogrePlugins[] = "@OGRE_PLUGINS_RELEASE@";
 #  ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = ".";
+    const char ogrePluginsDirectory[] = ".";
 #  else
-    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = "@OGRE_PLUGINS_FOLDER_RELEASE@";
+    const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_RELEASE@";
 #  endif
 #else
-    const char ORXONOX_OGRE_PLUGINS[] = "@OGRE_PLUGINS_DEBUG@";
+    const char ogrePlugins[] = "@OGRE_PLUGINS_DEBUG@";
 #  ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = ".";
+    const char ogrePluginsDirectory[] = ".";
 #  else
-    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
+    const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
 #  endif
 #endif
-}
+} }
 
 /**
Index: /code/branches/resource2/src/core/Core.cc
===================================================================
--- /code/branches/resource2/src/core/Core.cc	(revision 5640)
+++ /code/branches/resource2/src/core/Core.cc	(revision 5641)
@@ -85,5 +85,5 @@
     Core* Core::singletonPtr_s  = 0;
 
-    SetCommandLineArgument(mediaPath, "").information("Path to the media/data files");
+    SetCommandLineArgument(externalMediaPath, "").information("Path to the external media files");
     SetCommandLineOnlyArgument(writingPathSuffix, "").information("Additional subfolder for config and log files");
     SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
@@ -110,7 +110,11 @@
             this->setConfigValues();
 
-            // Possible media path override by the command line
-            if (!CommandLine::getArgument("mediaPath")->hasDefaultValue())
-                tsetMediaPath(CommandLine::getValue("mediaPath"));
+            // External media directory only exists for dev runs
+            if (Core::isDevelopmentRun())
+            {
+                // Possible media path override by the command line
+                if (!CommandLine::getArgument("externalMediaPath")->hasDefaultValue())
+                    tsetExternalMediaPath(CommandLine::getValue("externalMediaPath"));
+            }
         }
 
@@ -145,12 +149,4 @@
                 .description("If true, all random actions are different each time you start the game")
                 .callback(this, &CoreConfiguration::initializeRandomNumberGenerator);
-
-            // Only show this config value for development builds
-            if (Core::isDevelopmentRun())
-            {
-                SetConfigValue(mediaPathString_, mediaPath_.string())
-                    .description("Relative path to the game data.")
-                    .callback(this, &CoreConfiguration::mediaPathChanged);
-            }
         }
 
@@ -183,13 +179,4 @@
 
         /**
-        @brief
-            Callback function if the media path has changed.
-        */
-        void mediaPathChanged()
-        {
-            mediaPath_ = boost::filesystem::path(this->mediaPathString_);
-        }
-
-        /**
             @brief Sets the language in the config-file back to the default.
         */
@@ -205,16 +192,7 @@
             The new media path
         */
-        void tsetMediaPath(const std::string& path)
-        {
-            if (Core::isDevelopmentRun())
-            {
-                ModifyConfigValue(mediaPathString_, tset, path);
-            }
-            else
-            {
-                // Manual 'config' value without the file entry
-                mediaPathString_ = path;
-                this->mediaPathChanged();
-            }
+        void tsetExternalMediaPath(const std::string& path)
+        {
+            mediaPath_ = boost::filesystem::path(path);
         }
 
@@ -236,5 +214,4 @@
         std::string language_;                          //!< The language
         bool bInitializeRandomNumberGenerator_;         //!< If true, srand(time(0)) is called
-        std::string mediaPathString_;                   //!< Path to the data/media file folder as string
 
         //! Path to the parent directory of the ones above if program was installed with relativ pahts
@@ -242,4 +219,5 @@
         boost::filesystem::path executablePath_;        //!< Path to the executable
         boost::filesystem::path mediaPath_;             //!< Path to the media file folder
+        boost::filesystem::path externalMediaPath_;     //!< Path to the media file folder
         boost::filesystem::path configPath_;            //!< Path to the config file folder
         boost::filesystem::path logPath_;               //!< Path to the log file folder
@@ -423,7 +401,7 @@
     }
 
-    /*static*/ void Core::tsetMediaPath(const std::string& path)
-    {
-        getInstance().configuration_->tsetMediaPath(path);
+    /*static*/ void Core::tsetExternalMediaPath(const std::string& path)
+    {
+        getInstance().configuration_->tsetExternalMediaPath(path);
     }
 
@@ -435,4 +413,13 @@
     {
         return getInstance().configuration_->mediaPath_.string() + '/';
+    }
+
+    /*static*/ const boost::filesystem::path& Core::getExternalMediaPath()
+    {
+        return getInstance().configuration_->externalMediaPath_;
+    }
+    /*static*/ std::string Core::getExternalMediaPathString()
+    {
+        return getInstance().configuration_->externalMediaPath_.string() + '/';
     }
 
@@ -574,7 +561,8 @@
             COUT(1) << "Running from the build tree." << std::endl;
             Core::bDevRun_ = true;
-            configuration_->mediaPath_  = ORXONOX_MEDIA_DEV_PATH;
-            configuration_->configPath_ = ORXONOX_CONFIG_DEV_PATH;
-            configuration_->logPath_    = ORXONOX_LOG_DEV_PATH;
+            configuration_->mediaPath_  = specialConfig::mediaDevDirectory;
+            configuration_->externalMediaPath_ = specialConfig::externalMediaDevDirectory;
+            configuration_->configPath_ = specialConfig::configDevDirectory;
+            configuration_->logPath_    = specialConfig::logDevDirectory;
         }
         else
@@ -582,5 +570,5 @@
 #ifdef INSTALL_COPYABLE // --> relative paths
             // Also set the root path
-            boost::filesystem::path relativeExecutablePath(ORXONOX_RUNTIME_INSTALL_PATH);
+            boost::filesystem::path relativeExecutablePath(specialConfig::defaultRuntimePath);
             configuration_->rootPath_ = configuration_->executablePath_;
             while (!boost::filesystem::equivalent(configuration_->rootPath_ / relativeExecutablePath, configuration_->executablePath_)
@@ -591,11 +579,11 @@
 
             // Using paths relative to the install prefix, complete them
-            configuration_->mediaPath_  = configuration_->rootPath_ / ORXONOX_MEDIA_INSTALL_PATH;
-            configuration_->configPath_ = configuration_->rootPath_ / ORXONOX_CONFIG_INSTALL_PATH;
-            configuration_->logPath_    = configuration_->rootPath_ / ORXONOX_LOG_INSTALL_PATH;
+            configuration_->mediaPath_  = configuration_->rootPath_ / specialConfig::defaultMediaPath;
+            configuration_->configPath_ = configuration_->rootPath_ / specialConfig::defaultConfigPath;
+            configuration_->logPath_    = configuration_->rootPath_ / specialConfig::defaultLogPath;
 #else
             // There is no root path, so don't set it at all
 
-            configuration_->mediaPath_  = ORXONOX_MEDIA_INSTALL_PATH;
+            configuration_->mediaPath_  = specialConfig::mediaInstallDirectory;
 
             // Get user directory
@@ -610,6 +598,6 @@
             userDataPath /= ".orxonox";
 
-            configuration_->configPath_ = userDataPath / ORXONOX_CONFIG_INSTALL_PATH;
-            configuration_->logPath_    = userDataPath / ORXONOX_LOG_INSTALL_PATH;
+            configuration_->configPath_ = userDataPath / specialConfig::defaultConfigPath;
+            configuration_->logPath_    = userDataPath / specialConfig::defaultLogPath;
 #endif
         }
Index: /code/branches/resource2/src/core/Core.h
===================================================================
--- /code/branches/resource2/src/core/Core.h	(revision 5640)
+++ /code/branches/resource2/src/core/Core.h	(revision 5641)
@@ -91,15 +91,19 @@
             static void  resetLanguage();
 
-            static void tsetMediaPath(const std::string& path);
-            //! Returns the path to the config files as boost::filesystem::path
+            static void tsetExternalMediaPath(const std::string& path);
+            //! Returns the path to the data files as boost::filesystem::path
             static const boost::filesystem::path& getMediaPath();
+            //! Returns the path to the external data files as boost::filesystem::path
+            static const boost::filesystem::path& getExternalMediaPath();
             //! Returns the path to the config files as boost::filesystem::path
             static const boost::filesystem::path& getConfigPath();
             //! Returns the path to the log files as boost::filesystem::path
             static const boost::filesystem::path& getLogPath();
+            //! Returns the path to the data files as std::string
             //! Returns the path to the root folder as boost::filesystem::path
             static const boost::filesystem::path& getRootPath();
-            //! Returns the path to the data files as std::string
             static std::string getMediaPathString();
+            //! Returns the path to the external data files as std::string
+            static std::string getExternalMediaPathString();
             //! Returns the path to the config files as std::string
             static std::string getConfigPathString();
Index: /code/branches/resource2/src/core/GraphicsManager.cc
===================================================================
--- /code/branches/resource2/src/core/GraphicsManager.cc	(revision 5640)
+++ /code/branches/resource2/src/core/GraphicsManager.cc	(revision 5641)
@@ -115,7 +115,7 @@
         SetConfigValue(ogreConfigFile_,  "ogre.cfg")
             .description("Location of the Ogre config file");
-        SetConfigValue(ogrePluginsFolder_, ORXONOX_OGRE_PLUGINS_FOLDER)
+        SetConfigValue(ogrePluginsDirectory_, specialConfig::ogrePluginsDirectory)
             .description("Folder where the Ogre plugins are located.");
-        SetConfigValue(ogrePlugins_, ORXONOX_OGRE_PLUGINS)
+        SetConfigValue(ogrePlugins_, specialConfig::ogrePlugins)
             .description("Comma separated list of all plugins to load.");
         SetConfigValue(ogreLogFile_,     "ogre.log")
@@ -198,8 +198,8 @@
     {
         // just to make sure the next statement doesn't segfault
-        if (ogrePluginsFolder_ == "")
-            ogrePluginsFolder_ = ".";
-
-        boost::filesystem::path folder(ogrePluginsFolder_);
+        if (ogrePluginsDirectory_ == "")
+            ogrePluginsDirectory_ = ".";
+
+        boost::filesystem::path folder(ogrePluginsDirectory_);
         // Do some SubString magic to get the comma separated list of plugins
         SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, '(', ')', false, '\0');
Index: /code/branches/resource2/src/core/GraphicsManager.h
===================================================================
--- /code/branches/resource2/src/core/GraphicsManager.h	(revision 5640)
+++ /code/branches/resource2/src/core/GraphicsManager.h	(revision 5641)
@@ -98,5 +98,5 @@
         // config values
         std::string         ogreConfigFile_;           //!< ogre config file name
-        std::string         ogrePluginsFolder_;        //!< Folder where the Ogre plugins are located
+        std::string         ogrePluginsDirectory_;     //!< Directory where the Ogre plugins are located
         std::string         ogrePlugins_;              //!< Comma separated list of all plugins to load
         std::string         ogreLogFile_;              //!< log file name for Ogre log messages
Index: /code/branches/resource2/src/core/TclBind.cc
===================================================================
--- /code/branches/resource2/src/core/TclBind.cc	(revision 5640)
+++ /code/branches/resource2/src/core/TclBind.cc	(revision 5641)
@@ -127,5 +127,5 @@
 #ifdef DEPENDENCY_PACKAGE_ENABLE
         if (Core::isDevelopmentRun())
-            return (std::string(ORXONOX_DEP_LIB_PATH) + "/tcl");
+            return (std::string(specialConfig::dependencyLibraryDirectory) + "/tcl");
         else
             return (Core::getRootPathString() + "lib/tcl");
Index: /code/branches/resource2/src/orxonox/orxonox.vcproj.user.in
===================================================================
--- /code/branches/resource2/src/orxonox/orxonox.vcproj.user.in	(revision 5640)
+++ /code/branches/resource2/src/orxonox/orxonox.vcproj.user.in	(revision 5641)
@@ -11,5 +11,5 @@
 			<DebugSettings
 				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
-				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
+				Environment="Path=${RUNTIME_LIBRARY_DIRECTORY}"
 				EnvironmentMerge="true"
 			/>
@@ -20,5 +20,5 @@
 			<DebugSettings
 				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
-				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
+				Environment="Path=${RUNTIME_LIBRARY_DIRECTORY}"
 				EnvironmentMerge="true"
 			/>
@@ -29,5 +29,5 @@
 			<DebugSettings
 				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
-				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
+				Environment="Path=${RUNTIME_LIBRARY_DIRECTORY}"
 				EnvironmentMerge="true"
 			/>
@@ -38,5 +38,5 @@
 			<DebugSettings
 				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
-				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
+				Environment="Path=${RUNTIME_LIBRARY_DIRECTORY}"
 				EnvironmentMerge="true"
 			/>
