1
0

Merge pull request #1565 from mc-server/MergedIniFile

Merged ini file
This commit is contained in:
Mattes D 2014-10-24 09:13:39 +02:00
commit 190d34e2f7
35 changed files with 36 additions and 71 deletions

View File

@ -81,7 +81,6 @@ set(SQLITECPP_BUILD_TESTS OFF CACHE BOOL "Build and run tests."
set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "Add the internal SQLite3 source to the project." FORCE)
# Include all the libraries:
add_subdirectory(lib/inifile/)
add_subdirectory(lib/jsoncpp/)
add_subdirectory(lib/zlib/)
add_subdirectory(lib/lua/)

View File

@ -4,7 +4,7 @@
#include "src/Generating/BioGen.h"
#include "src/StringCompression.h"
#include "src/WorldStorage/FastNBT.h"
#include "inifile/iniFile.h"
#include "src/IniFile.h"

View File

@ -3,7 +3,7 @@
#include <QLabel>
#include <QLineEdit>
#include "src/Generating/BioGen.h"
#include "inifile/iniFile.h"
#include "src/IniFile.h"

View File

@ -8,7 +8,7 @@
#include <QSettings>
#include <QDirIterator>
#include <QStatusBar>
#include "inifile/iniFile.h"
#include "src/IniFile.h"
#include "ChunkSource.h"
#include "src/Generating/BioGen.h"
#include "src/StringCompression.h"

View File

@ -21,7 +21,7 @@ SOURCES +=\
../../src/StringUtils.cpp \
../../src/LoggerListeners.cpp \
../../src/Logger.cpp \
../../lib/inifile/iniFile.cpp \
../../src/IniFile.cpp \
../../src/OSSupport/File.cpp \
../../src/OSSupport/CriticalSection.cpp \
../../src/OSSupport/IsThread.cpp \
@ -59,7 +59,7 @@ HEADERS += MainWindow.h \
../../src/StringUtils.h \
../../src/LoggerListeners.h \
../../src/Logger.h \
../../lib/inifile/iniFile.h \
../../src/IniFile.h \
../../src/OSSupport/File.h \
../../src/OSSupport/CriticalSection.h \
../../src/OSSupport/IsThread.h \

View File

@ -1,11 +0,0 @@
cmake_minimum_required (VERSION 2.6)
project (iniFile)
include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
file(GLOB SOURCE
"*.h"
"*.cpp"
)
add_library(iniFile ${SOURCE})

View File

@ -15,7 +15,7 @@ $cfile "../Vector3.h"
$cfile "../ChunkDef.h"
$cfile "../BiomeDef.h"
$cfile "../../lib/inifile/iniFile.h"
$cfile "../IniFile.h"
$cfile "../OSSupport/File.h"

View File

@ -9,7 +9,7 @@
#include "../Server.h"
#include "../CommandOutput.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "../Entities/Player.h"
#define FIND_HOOK(a_HookName) HookMap::iterator Plugins = m_Hooks.find(a_HookName);

View File

@ -4,7 +4,7 @@
#include "Globals.h"
#include "BlockID.h"
#include "inifile/iniFile.h"
#include "IniFile.h"
#include "Item.h"
#include "Mobs/Monster.h"

View File

@ -34,6 +34,7 @@ SET (SRCS
FastRandom.cpp
FurnaceRecipe.cpp
Globals.cpp
IniFile.cpp
Inventory.cpp
Item.cpp
ItemGrid.cpp
@ -98,6 +99,7 @@ SET (HDRS
ForEachChunkProvider.h
FurnaceRecipe.h
Globals.h
IniFile.h
Inventory.h
Item.h
ItemGrid.h
@ -320,4 +322,4 @@ endif ()
if (WIN32)
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
endif()
target_link_libraries(${EXECUTABLE} luaexpat iniFile jsoncpp polarssl zlib sqlite lua SQLiteCpp)
target_link_libraries(${EXECUTABLE} luaexpat jsoncpp polarssl zlib sqlite lua SQLiteCpp)

View File

@ -20,7 +20,7 @@
#include "../WorldStorage/StatSerializer.h"
#include "../CompositeChat.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "json/json.h"
// 6000 ticks or 5 minutes

View File

@ -5,7 +5,7 @@
#include "Globals.h"
#include "BioGen.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "../LinearUpscale.h"

View File

@ -65,5 +65,5 @@ SET (HDRS
if(NOT MSVC)
add_library(Generating ${SRCS} ${HDRS})
target_link_libraries(Generating OSSupport iniFile Blocks)
target_link_libraries(Generating OSSupport Blocks)
endif()

View File

@ -2,7 +2,7 @@
#include "Globals.h"
#include "ChunkGenerator.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "ChunkDesc.h"
#include "ComposableGenerator.h"
#include "Noise3DGenerator.h"

View File

@ -12,7 +12,7 @@
#include "../BlockID.h"
#include "../Item.h"
#include "../LinearUpscale.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"

View File

@ -7,7 +7,7 @@
#include "ComposableGenerator.h"
#include "../World.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "../Root.h"
// Individual composed algorithms:

View File

@ -7,7 +7,7 @@
#include "DistortedHeightmap.h"
#include "../OSSupport/File.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "../LinearUpscale.h"

View File

@ -5,7 +5,7 @@
#include "Globals.h"
#include "EndGen.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "../LinearUpscale.h"

View File

@ -15,7 +15,7 @@
#include "../Simulator/FluidSimulator.h" // for cFluidSimulator::CanWashAway()
#include "../Simulator/FireSimulator.h"
#include "../World.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"

View File

@ -6,7 +6,7 @@
#include "Globals.h"
#include "HeiGen.h"
#include "../LinearUpscale.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "DistortedHeightmap.h"
#include "EndGen.h"
#include "Noise3DGenerator.h"

View File

@ -6,7 +6,7 @@
#include "Globals.h"
#include "Noise3DGenerator.h"
#include "../OSSupport/File.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "../LinearInterpolation.h"
#include "../LinearUpscale.h"

View File

@ -29,5 +29,5 @@ SET (HDRS
if(NOT MSVC)
add_library(Generating_Prefabs ${SRCS} ${HDRS})
target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks)
target_link_libraries(Generating_Prefabs OSSupport Blocks)
endif()

View File

@ -11,7 +11,7 @@
#include "../OSSupport/ListenThread.h"
#include "../OSSupport/SocketThreads.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "PolarSSL++/RsaPrivateKey.h"
#include "PolarSSL++/CryptoKey.h"
#include "PolarSSL++/X509Cert.h"

View File

@ -24,7 +24,7 @@
#include <ctype.h>
// Local Includes
#include "iniFile.h"
#include "IniFile.h"
#if defined(WIN32)
#define iniEOL endl
@ -32,10 +32,6 @@
#define iniEOL '\r' << endl
#endif
#ifndef _WIN32
#define sscanf_s(buffer, stringbuffer, ...) (sscanf(buffer, stringbuffer, __VA_ARGS__))
#endif
using namespace std;
@ -465,20 +461,6 @@ bool cIniFile::SetValueF(const AString & a_KeyName, const AString & a_ValueName,
bool cIniFile::SetValueV(const AString & a_KeyName, const AString & a_ValueName, const char * a_Format, ...)
{
va_list args;
va_start(args, a_Format);
AString Data;
AppendVPrintf(Data, a_Format, args);
va_end(args);
return SetValue(a_KeyName, a_ValueName, Data);
}
AString cIniFile::GetValue(const int keyID, const int valueID, const AString & defValue) const
{
if ((keyID < (int)keys.size()) && (valueID < (int)keys[keyID].names.size()))

View File

@ -154,12 +154,6 @@ public:
}
bool SetValueF(const AString & a_KeyName, const AString & a_ValueName, const double a_Value, const bool a_CreateIfNotExists = true);
// tolua_end
bool SetValueV( const AString & a_KeyName, const AString & a_ValueName, const char * a_Format, ...);
// tolua_begin
// Deletes specified value.
// Returns true if value existed and deleted, false otherwise.
bool DeleteValueByID(const int keyID, const int valueID);

View File

@ -3,7 +3,7 @@
#include "MonsterConfig.h"
#include "Mobs/Monster.h"
#include "inifile/iniFile.h"
#include "IniFile.h"

View File

@ -7,7 +7,7 @@
#include "../Server.h"
#include "../ClientHandle.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "json/json.h"
#include "PolarSSL++/BlockingSslClientSocket.h"

View File

@ -7,7 +7,7 @@
#include "MojangAPI.h"
#include "SQLiteCpp/Database.h"
#include "SQLiteCpp/Statement.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"
#include "json/json.h"
#include "PolarSSL++/BlockingSslClientSocket.h"
#include "../RankManager.h"

View File

@ -4,7 +4,7 @@
// Implements the cRCONServer class representing the RCON server
#include "Globals.h"
#include "inifile/iniFile.h"
#include "IniFile.h"
#include "RCONServer.h"
#include "Server.h"
#include "Root.h"

View File

@ -5,7 +5,7 @@
#include "Globals.h"
#include "RankManager.h"
#include "inifile/iniFile.h"
#include "IniFile.h"
#include "Protocol/MojangAPI.h"
#include "ClientHandle.h"

View File

@ -19,11 +19,10 @@
#include "OSSupport/Timer.h"
#include "LoggerListeners.h"
#include "BuildInfo.h"
#include "inifile/iniFile.h"
#include "IniFile.h"
#ifdef _WIN32
#include "conio.h"
#include <conio.h>
#include <psapi.h>
#elif defined(__linux__)
#include <fstream>

View File

@ -22,7 +22,7 @@
#include "MersenneTwister.h"
#include "inifile/iniFile.h"
#include "IniFile.h"
#include "Vector3.h"
#include <fstream>

View File

@ -7,7 +7,7 @@
#include "../Defines.h"
#include "../Entities/FallingBlock.h"
#include "../Chunk.h"
#include "inifile/iniFile.h"
#include "../IniFile.h"

View File

@ -7,7 +7,7 @@
#include "OSSupport/Socket.h"
#include "Bindings/LuaState.h"
#include "inifile/iniFile.h"
#include "IniFile.h"
#include "HTTPServer/HTTPServer.h"
#include "HTTPServer/HTTPFormParser.h"

View File

@ -8,7 +8,7 @@
#include "Server.h"
#include "Item.h"
#include "Root.h"
#include "inifile/iniFile.h"
#include "IniFile.h"
#include "ChunkMap.h"
#include "Generating/ChunkDesc.h"
#include "OSSupport/Timer.h"