From dfa8f4a7e2bba73d7f1e0dd366619df2a14abd3b Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sun, 25 Dec 2011 16:22:01 +0000 Subject: [PATCH] - bugfix for handling of custom data path (Should not require strange escaping sequence) --- source/glest_game/global/config.cpp | 2 +- source/glest_game/main/main.cpp | 2 +- source/shared_lib/sources/util/properties.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/glest_game/global/config.cpp b/source/glest_game/global/config.cpp index cc9214f66..9f436b112 100644 --- a/source/glest_game/global/config.cpp +++ b/source/glest_game/global/config.cpp @@ -147,7 +147,7 @@ Config::Config(std::pair type, std::pair f #if defined(CUSTOM_DATA_INSTALL_PATH) if(foundPath == false) { - foundPath = tryCustomPath(cfgType, fileName, CUSTOM_DATA_INSTALL_PATH); + foundPath = tryCustomPath(cfgType, fileName, TOSTRING(CUSTOM_DATA_INSTALL_PATH)); } #endif diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 2d5936ff6..674073976 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -2459,7 +2459,7 @@ int glestMain(int argc, char** argv) { #if defined(CUSTOM_DATA_INSTALL_PATH) - if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\n\nCUSTOM_DATA_INSTALL_PATH = [%s]\n\n",CUSTOM_DATA_INSTALL_PATH); + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\n\nCUSTOM_DATA_INSTALL_PATH = [%s]\n\n",TOSTRING(CUSTOM_DATA_INSTALL_PATH)); #endif const int knownArgCount = sizeof(GAME_ARGS) / sizeof(GAME_ARGS[0]); diff --git a/source/shared_lib/sources/util/properties.cpp b/source/shared_lib/sources/util/properties.cpp index a7f701f7c..1326c99fc 100644 --- a/source/shared_lib/sources/util/properties.cpp +++ b/source/shared_lib/sources/util/properties.cpp @@ -215,9 +215,9 @@ std::map Properties::getTagReplacementValues(std::map *mapTag replaceAll(value, "{APPLICATIONPATH}", Properties::applicationPath); #if defined(CUSTOM_DATA_INSTALL_PATH) - replaceAll(value, "$APPLICATIONDATAPATH", CUSTOM_DATA_INSTALL_PATH); - replaceAll(value, "%%APPLICATIONDATAPATH%%", CUSTOM_DATA_INSTALL_PATH); - replaceAll(value, "{APPLICATIONDATAPATH}", CUSTOM_DATA_INSTALL_PATH); + replaceAll(value, "$APPLICATIONDATAPATH", TOSTRING(CUSTOM_DATA_INSTALL_PATH)); + replaceAll(value, "%%APPLICATIONDATAPATH%%", TOSTRING(CUSTOM_DATA_INSTALL_PATH)); + replaceAll(value, "{APPLICATIONDATAPATH}", TOSTRING(CUSTOM_DATA_INSTALL_PATH)); //replaceAll(value, "$COMMONDATAPATH", string(CUSTOM_DATA_INSTALL_PATH) + "/commondata/"); //replaceAll(value, "%%COMMONDATAPATH%%", string(CUSTOM_DATA_INSTALL_PATH) + "/commondata/");