Conflicts:
	library/VersionInfo.cpp
develop
Petr Mrázek 2010-08-23 16:16:58 +02:00
commit 143f30f64b
8 changed files with 11 additions and 6 deletions

@ -184,7 +184,7 @@ if(MSVC)
# #
# So, $(TargetDir) is ignored by cmake, and replaced with the actual output directory by MSVC # So, $(TargetDir) is ignored by cmake, and replaced with the actual output directory by MSVC
ADD_CUSTOM_COMMAND(TARGET dfhack POST_BUILD 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 ADD_CUSTOM_COMMAND(TARGET dfhack POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/Compile.html $(TargetDir)/Compile.html COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/Compile.html $(TargetDir)/Compile.html

@ -329,7 +329,7 @@ bool SHMProcess::Private::validate(vector <VersionInfo *> & known_versions)
for ( it=known_versions.begin() ; it < known_versions.end(); it++ ) for ( it=known_versions.begin() ; it < known_versions.end(); it++ )
{ {
try{ 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); VersionInfo *m = new VersionInfo(**it);
memdescriptor = m; memdescriptor = m;

@ -137,7 +137,7 @@ bool WineProcess::Private::validate(char* exe_file, uint32_t pid, char* mem_file
string thishash; string thishash;
try try
{ {
thishash = (*it)->getString("md5"); thishash = (*it)->getMD5();
} }
catch (Error::MissingMemoryDefinition& e) catch (Error::MissingMemoryDefinition& e)
{ {

@ -120,7 +120,7 @@ bool NormalProcess::Private::validate(char * exe_file,uint32_t pid, char * memFi
{ {
try 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; VersionInfo * m = *it;
if (VersionInfo::OS_LINUX == m->getOS()) if (VersionInfo::OS_LINUX == m->getOS())

@ -351,7 +351,7 @@ bool SHMProcess::Private::validate(vector <VersionInfo *> & known_versions)
uint32_t pe_timestamp; uint32_t pe_timestamp;
try try
{ {
pe_timestamp = (*it)->getHexValue("pe_timestamp"); pe_timestamp = (*it)->getPE();
} }
catch(Error::MissingMemoryDefinition&) catch(Error::MissingMemoryDefinition&)
{ {

@ -106,7 +106,7 @@ NormalProcess::NormalProcess(uint32_t pid, vector <VersionInfo *> & known_versio
// filter by timestamp, skip entries without a timestamp // filter by timestamp, skip entries without a timestamp
try try
{ {
pe_timestamp = (*it)->getHexValue("pe_timestamp"); pe_timestamp = (*it)->getPE();
} }
catch(Error::MissingMemoryDefinition&) catch(Error::MissingMemoryDefinition&)
{ {

@ -779,6 +779,10 @@ std::vector< std::vector<std::string> > const& VersionInfo::getAllTraits()
return d->traits; return d->traits;
} }
std:: map<uint32_t, std::string> const& VersionInfo::getAllLabours()
{
return d->labors;
}
string VersionInfo::getLabor (const uint32_t laborIdx) string VersionInfo::getLabor (const uint32_t laborIdx)
{ {

@ -92,6 +92,7 @@ namespace DFHack
std::string getTraitName(const uint32_t) const; std::string getTraitName(const uint32_t) const;
std::string getLabor (const uint32_t); std::string getLabor (const uint32_t);
std::vector< std::vector<std::string> > const& getAllTraits(); std::vector< std::vector<std::string> > const& getAllTraits();
std::map<uint32_t, std::string> const& getAllLabours();
DFHack::t_level getLevelInfo(const uint32_t level) const; DFHack::t_level getLevelInfo(const uint32_t level) const;