From 97b693052cd5da228016afa6b31f07970b37569a Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 19 Mar 2012 23:54:56 +0200 Subject: Flatten share/ and user/ in the source and for the RUN_IN_PLACE build --- src/CMakeLists.txt | 3 ++- src/main.cpp | 5 ----- src/porting.cpp | 23 ++++++++++++----------- src/subgame.cpp | 5 ----- 4 files changed, 14 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 448f2f6b8..16ab45c5c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -313,7 +313,8 @@ endif() if(BUILD_CLIENT) install(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../share/" DESTINATION ${SHAREDIR}) + #install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../sounds/base/pack" DESTINATION "${SHAREDIR}/sounds/base/") + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../textures/base/pack" DESTINATION "${SHAREDIR}/textures/base/") if(USE_GETTEXT) foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES}) diff --git a/src/main.cpp b/src/main.cpp index 35595e5aa..75ff569aa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1034,12 +1034,7 @@ int main(int argc, char *argv[]) // Check if the world is found from the default directory, and if // not, see if the legacy world directory exists. world_path = porting::path_user + DIR_DELIM + "worlds" + DIR_DELIM + "world"; -#ifdef RUN_IN_PLACE - std::string legacy_world_path = porting::path_user + DIR_DELIM + - ".." + DIR_DELIM + "world"; -#else std::string legacy_world_path = porting::path_user + DIR_DELIM + "world"; -#endif if(!fs::PathExists(world_path) && fs::PathExists(legacy_world_path)){ errorstream<<"Warning: Using legacy world directory \"" <" len = GetEnvironmentVariable("APPDATA", buf, buflen); @@ -247,7 +248,7 @@ void initializePaths() //path_share = std::string(INSTALL_PREFIX) + "/share/" + PROJECT_NAME; if (!fs::PathExists(path_share)) { dstream<<"WARNING: system-wide share not found at \""< getAvailableWorlds() } // Check old world location do{ -#ifdef RUN_IN_PLACE - std::string fullpath = porting::path_user + DIR_DELIM + ".." - + DIR_DELIM + "world"; -#else std::string fullpath = porting::path_user + DIR_DELIM + "world"; -#endif if(!fs::PathExists(fullpath)) break; std::string name = "Old World"; -- cgit v1.2.3