From f5ed11d46e2b8723edc75fc05f454f15ecc39f41 Mon Sep 17 00:00:00 2001 From: vl Date: Mon, 17 May 2010 12:02:21 +0200 Subject: [PATCH 1/2] Removed: compilation of nelns (not needed to run a ryzom shard) Changed: don't compile in final version (easier to debug and test) --- code/ryzom/tools/scripts/linux/make_all | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/ryzom/tools/scripts/linux/make_all b/code/ryzom/tools/scripts/linux/make_all index 0185176f3..618a5bf2a 100755 --- a/code/ryzom/tools/scripts/linux/make_all +++ b/code/ryzom/tools/scripts/linux/make_all @@ -17,7 +17,7 @@ init #### BUILD NEL ############################################################################## -CFLAGS="-DFINAL_VERSION=1" CXXFLAGS="-DFINAL_VERSION=1" $RYZOM_PATH/tools/scripts/linux/build init nel --disable-3d --disable-samples --disable-tools >>$LOG_INFO 2>>$LOG_ERROR +$RYZOM_PATH/tools/scripts/linux/build init nel --disable-3d --disable-samples --disable-tools >>$LOG_INFO 2>>$LOG_ERROR verify $? BUILD INIT NEL #$RYZOM_PATH/tools/scripts/linux/build nel clean @@ -32,18 +32,19 @@ verify $? BUILD NEL INSTALL ############################################################################## #### BUILD NELNS ############################################################################## +# update: we don't need nelns to run a ryzom shard -CFLAGS="-DFINAL_VERSION=1" CXXFLAGS="-DFINAL_VERSION=1" $RYZOM_PATH/tools/scripts/linux/build init nelns >>$LOG_INFO 2>>$LOG_ERROR -verify $? BUILD INIT NELNS +#$RYZOM_PATH/tools/scripts/linux/build init nelns >>$LOG_INFO 2>>$LOG_ERROR +#verify $? BUILD INIT NELNS #$RYZOM_PATH/tools/scripts/linux/build nelns clean #verify $? BUILD NEL CLEAN -$RYZOM_PATH/tools/scripts/linux/build nelns >>$LOG_INFO 2>>$LOG_ERROR -verify $? BUILD NELNS +#$RYZOM_PATH/tools/scripts/linux/build nelns >>$LOG_INFO 2>>$LOG_ERROR +#verify $? BUILD NELNS -$RYZOM_PATH/tools/scripts/linux/build nelns install >>$LOG_INFO 2>>$LOG_ERROR -verify $? BUILD NELNS INSTALL +#$RYZOM_PATH/tools/scripts/linux/build nelns install >>$LOG_INFO 2>>$LOG_ERROR +#verify $? BUILD NELNS INSTALL ############################################################################## @@ -64,7 +65,7 @@ cd $RYZOM_PATH/common make update >>$LOG_INFO 2>>$LOG_ERROR verify $? UPDATE RYZOM MAKEFILE COMMON -CFLAGS="-DFINAL_VERSION=1" CXXFLAGS="-DFINAL_VERSION=1" make night >>$LOG_INFO 2>>$LOG_ERROR +make night >>$LOG_INFO 2>>$LOG_ERROR verify $? BUILD RYZOM COMMON ############################################################################## From d1cb8fde2df6ed1014835a2d2dbc6b970339663d Mon Sep 17 00:00:00 2001 From: vl Date: Mon, 17 May 2010 12:24:49 +0200 Subject: [PATCH 2/2] Changed: char* into const char*. string_constant_to_char.patch provided by vhelsing --- code/ryzom/common/src/game_share/season.cpp | 2 +- code/ryzom/server/src/ai_share/16x16_layer.h | 2 +- code/ryzom/server/src/ai_share/ai_types.h | 2 +- .../server/src/ai_share/primitive_parser.cpp | 2 +- .../player_manager/player.cpp | 2 +- .../server/src/server_share/mysql_wrapper.h | 2 +- code/ryzom/tools/pd_parser/cpp_output.h | 2 +- code/ryzom/tools/pd_parser/templatizer.cpp | 2 +- code/ryzom/tools/pd_parser/templatizer.h | 38 +++++++++---------- .../extract_new_sheet_names.cpp | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/code/ryzom/common/src/game_share/season.cpp b/code/ryzom/common/src/game_share/season.cpp index 0d8729802..5ab27d85a 100644 --- a/code/ryzom/common/src/game_share/season.cpp +++ b/code/ryzom/common/src/game_share/season.cpp @@ -21,7 +21,7 @@ namespace EGSPD { -static const struct { char* Name; CSeason::TSeason Value; } TSeasonConvert[] = +static const struct { const char* Name; CSeason::TSeason Value; } TSeasonConvert[] = { { "Spring", CSeason::Spring }, { "Summer", CSeason::Summer }, diff --git a/code/ryzom/server/src/ai_share/16x16_layer.h b/code/ryzom/server/src/ai_share/16x16_layer.h index 5e1926cf7..0cc3b86cc 100644 --- a/code/ryzom/server/src/ai_share/16x16_layer.h +++ b/code/ryzom/server/src/ai_share/16x16_layer.h @@ -227,7 +227,7 @@ protected: uint getIndex(sint value) { int i; - for (i=0; i<4 && Values[i]!=value; ++i); + for (i=0; i<4 && Values[i]!=value; ++i) ; return i&3; } }; diff --git a/code/ryzom/server/src/ai_share/ai_types.h b/code/ryzom/server/src/ai_share/ai_types.h index baa39115e..802fe5ba6 100644 --- a/code/ryzom/server/src/ai_share/ai_types.h +++ b/code/ryzom/server/src/ai_share/ai_types.h @@ -51,7 +51,7 @@ namespace AITYPES { public: CDescTypeEntry(char *name, T value) : _name(name), _value(value) {} - char *_name; + const char *_name; T _value; }; static CDescTypeEntry _entries[]; diff --git a/code/ryzom/server/src/ai_share/primitive_parser.cpp b/code/ryzom/server/src/ai_share/primitive_parser.cpp index 0e88e1ac3..497990b05 100644 --- a/code/ryzom/server/src/ai_share/primitive_parser.cpp +++ b/code/ryzom/server/src/ai_share/primitive_parser.cpp @@ -3261,7 +3261,7 @@ static void parsePrimOutpost(const IPrimitive *prim, const std::string &mapName, CAIActions::exec("OUTPOST", aliasNode, continent, filename, familyName); // link squads - char* props[] = { "tribe_squads", "tribe_squads2", "default_squads", "buyable_squads" }; + const char* props[] = { "tribe_squads", "tribe_squads2", "default_squads", "buyable_squads" }; size_t nprops = sizeof(props)/sizeof(props[0]); for (size_t i=0; i!=nprops; ++i) { diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player.cpp b/code/ryzom/server/src/entities_game_service/player_manager/player.cpp index e9bdad546..31be06fae 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/player.cpp @@ -54,7 +54,7 @@ NL_INSTANCE_COUNTER_IMPL(CPlayer); bool wipeAndRestore(const std::string &fileName); FILE *LastLoad = NULL; -char *LastLoadFileName = "last_loaded_char.bin"; +const char *LastLoadFileName = "last_loaded_char.bin"; extern CVariable MonkeyLoadEnable; extern uint32 CharacterSaveCounter; diff --git a/code/ryzom/server/src/server_share/mysql_wrapper.h b/code/ryzom/server/src/server_share/mysql_wrapper.h index 93115ff55..e78e9d169 100644 --- a/code/ryzom/server/src/server_share/mysql_wrapper.h +++ b/code/ryzom/server/src/server_share/mysql_wrapper.h @@ -131,7 +131,7 @@ namespace MSW nlassert(_CurrentRow != NULL); nlassert(fieldIndex < getNumFields()); - static char *emptyString = ""; + static const char *emptyString = ""; char *ret = _CurrentRow[fieldIndex]; diff --git a/code/ryzom/tools/pd_parser/cpp_output.h b/code/ryzom/tools/pd_parser/cpp_output.h index 50b3f23c0..fd1a2aa2d 100644 --- a/code/ryzom/tools/pd_parser/cpp_output.h +++ b/code/ryzom/tools/pd_parser/cpp_output.h @@ -623,7 +623,7 @@ inline void CCppOutput::clear() inline bool searchForId(char* buffer, char** start, char** end) { - char* id = "$Id:"; + const char* id = "$Id:"; uint len = strlen(id); for (; *buffer != '\0'; ++buffer) { diff --git a/code/ryzom/tools/pd_parser/templatizer.cpp b/code/ryzom/tools/pd_parser/templatizer.cpp index 0d66e0af6..7c7119ea1 100644 --- a/code/ryzom/tools/pd_parser/templatizer.cpp +++ b/code/ryzom/tools/pd_parser/templatizer.cpp @@ -40,7 +40,7 @@ enum TTemplatizerToken Unknown }; -struct { TTemplatizerToken Token; char* Text; } SimpleTokens[] = +struct { TTemplatizerToken Token; const char* Text; } SimpleTokens[] = { { BlocStart, "{" }, { BlocEnd, "}" }, diff --git a/code/ryzom/tools/pd_parser/templatizer.h b/code/ryzom/tools/pd_parser/templatizer.h index c0ee6830b..7e0d3a765 100644 --- a/code/ryzom/tools/pd_parser/templatizer.h +++ b/code/ryzom/tools/pd_parser/templatizer.h @@ -648,7 +648,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name", "ref" }; + static const char* args[] = { "name", "ref" }; return (const char**)args; } @@ -685,7 +685,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name", "ref" }; + static const char* args[] = { "name", "ref" }; return (const char**)args; } @@ -815,7 +815,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -845,7 +845,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -875,7 +875,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name", "evalinsub" }; + static const char* args[] = { "name", "evalinsub" }; return (const char**)args; } }; @@ -903,7 +903,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -931,7 +931,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -959,7 +959,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -987,7 +987,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "value" }; + static const char* args[] = { "value" }; return (const char**)args; } }; @@ -1020,7 +1020,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1045,7 +1045,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1078,7 +1078,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1105,7 +1105,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1136,7 +1136,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "cond" }; + static const char* args[] = { "cond" }; return (const char**)args; } }; @@ -1165,7 +1165,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "cond" }; + static const char* args[] = { "cond" }; return (const char**)args; } }; @@ -1201,7 +1201,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "separator" }; + static const char* args[] = { "separator" }; return (const char**)args; } }; @@ -1279,7 +1279,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; @@ -1319,7 +1319,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "class", "name" }; + static const char* args[] = { "class", "name" }; return (const char**)args; } @@ -1344,7 +1344,7 @@ public: /// Get Param list virtual const char** getDefParamList() { - static char* args[] = { "name" }; + static const char* args[] = { "name" }; return (const char**)args; } }; diff --git a/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp b/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp index 4f3fe6a23..949d35f10 100644 --- a/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp +++ b/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp @@ -375,7 +375,7 @@ int extractNewSheetNames(int argc, char *argv[]) // **** Parse all the different type of sheets - char *sheetDefs[]= + const char *sheetDefs[]= { // 1st is the name of the worksheet file. // 2nd is the Key column identifier.