diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index b7dd44afb..de869ddbc 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -184,7 +184,7 @@ if(MSVC) # # So, $(TargetDir) is ignored by cmake, and replaced with the actual output directory by MSVC ADD_CUSTOM_COMMAND(TARGET dfhack POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/data/Memory.xml $(TargetDir)/Memory.xml + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/data/Memory-ng.xml $(TargetDir)/Memory.xml ) ADD_CUSTOM_COMMAND(TARGET dfhack POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/Compile.html $(TargetDir)/Compile.html diff --git a/library/DFProcess-linux-SHM.cpp b/library/DFProcess-linux-SHM.cpp index 374644ee2..ace2dacf8 100644 --- a/library/DFProcess-linux-SHM.cpp +++ b/library/DFProcess-linux-SHM.cpp @@ -329,7 +329,7 @@ bool SHMProcess::Private::validate(vector & known_versions) for ( it=known_versions.begin() ; it < known_versions.end(); it++ ) { try{ - if(hash == (*it)->getString("md5")) // are the md5 hashes the same? + if(hash == (*it)->getMD5()) // are the md5 hashes the same? { VersionInfo *m = new VersionInfo(**it); memdescriptor = m; diff --git a/library/DFProcess-linux-wine.cpp b/library/DFProcess-linux-wine.cpp index a53daf241..8e8e3c1f5 100644 --- a/library/DFProcess-linux-wine.cpp +++ b/library/DFProcess-linux-wine.cpp @@ -137,7 +137,7 @@ bool WineProcess::Private::validate(char* exe_file, uint32_t pid, char* mem_file string thishash; try { - thishash = (*it)->getString("md5"); + thishash = (*it)->getMD5(); } catch (Error::MissingMemoryDefinition& e) { diff --git a/library/DFProcess-linux.cpp b/library/DFProcess-linux.cpp index 9a4237751..9339685cb 100644 --- a/library/DFProcess-linux.cpp +++ b/library/DFProcess-linux.cpp @@ -120,7 +120,7 @@ bool NormalProcess::Private::validate(char * exe_file,uint32_t pid, char * memFi { try { - if(hash == (*it)->getString("md5")) // are the md5 hashes the same? + if(hash == (*it)->getMD5()) // are the md5 hashes the same? { VersionInfo * m = *it; if (VersionInfo::OS_LINUX == m->getOS()) diff --git a/library/DFProcess-windows-SHM.cpp b/library/DFProcess-windows-SHM.cpp index 6b3242595..9742ceeca 100644 --- a/library/DFProcess-windows-SHM.cpp +++ b/library/DFProcess-windows-SHM.cpp @@ -351,7 +351,7 @@ bool SHMProcess::Private::validate(vector & known_versions) uint32_t pe_timestamp; try { - pe_timestamp = (*it)->getHexValue("pe_timestamp"); + pe_timestamp = (*it)->getPE(); } catch(Error::MissingMemoryDefinition&) { diff --git a/library/DFProcess-windows.cpp b/library/DFProcess-windows.cpp index 0173b062c..a658b49a7 100644 --- a/library/DFProcess-windows.cpp +++ b/library/DFProcess-windows.cpp @@ -106,7 +106,7 @@ NormalProcess::NormalProcess(uint32_t pid, vector & known_versio // filter by timestamp, skip entries without a timestamp try { - pe_timestamp = (*it)->getHexValue("pe_timestamp"); + pe_timestamp = (*it)->getPE(); } catch(Error::MissingMemoryDefinition&) { diff --git a/library/VersionInfo.cpp b/library/VersionInfo.cpp index ea743e209..152133ac7 100644 --- a/library/VersionInfo.cpp +++ b/library/VersionInfo.cpp @@ -779,6 +779,10 @@ std::vector< std::vector > const& VersionInfo::getAllTraits() return d->traits; } +std:: map const& VersionInfo::getAllLabours() +{ + return d->labors; +} string VersionInfo::getLabor (const uint32_t laborIdx) { diff --git a/library/include/dfhack/VersionInfo.h b/library/include/dfhack/VersionInfo.h index 1bdb4a794..5f00cdc55 100644 --- a/library/include/dfhack/VersionInfo.h +++ b/library/include/dfhack/VersionInfo.h @@ -92,6 +92,7 @@ namespace DFHack std::string getTraitName(const uint32_t) const; std::string getLabor (const uint32_t); std::vector< std::vector > const& getAllTraits(); + std::map const& getAllLabours(); DFHack::t_level getLevelInfo(const uint32_t level) const;