diff --git a/Deploy/pe.cpp b/Deploy/pe.cpp index 9202380..19b81ca 100644 --- a/Deploy/pe.cpp +++ b/Deploy/pe.cpp @@ -104,8 +104,6 @@ bool PE::dependecies(QStringList &list, const QString &file, return false; } - f.close(); - if (!f.seek(meta.addressImports)) { f.close(); return false; @@ -140,7 +138,7 @@ bool PE::getLibInfo(const QString &lib, LibInfo &info) { } info.name = QFileInfo(lib).fileName(); - info.path = QFileInfo(lib).filePath(); + info.path = QFileInfo(lib).absolutePath(); if (static_cast<RunType>(meta.type) == RunType::_32bit) { info.platform = Platform::Win32; diff --git a/Deploy/pe.h b/Deploy/pe.h index 0c270f3..1f4a7a3 100644 --- a/Deploy/pe.h +++ b/Deploy/pe.h @@ -18,9 +18,9 @@ private: constexpr static unsigned int PE_MAGIC = 0x00004550; constexpr static unsigned int INDEX_PE_MAGIC = 0x80; - constexpr static unsigned int INDEX_MAGIC = INDEX_PE_MAGIC + 0x16; - constexpr static unsigned int INDEX_IMPORTS_32 = INDEX_MAGIC + 0x68; - constexpr static unsigned int INDEX_IMPORTS_64 = INDEX_MAGIC + 0x78; + constexpr static unsigned int INDEX_MAGIC = INDEX_PE_MAGIC + 0x18; + constexpr static unsigned int INDEX_IMPORTS_32 = INDEX_MAGIC + 104; + constexpr static unsigned int INDEX_IMPORTS_64 = INDEX_MAGIC + 120; public: enum class MashineTypesS: unsigned short { diff --git a/UnitTests/libcreator.cpp b/UnitTests/libcreator.cpp index 8f6a5e6..7e91913 100644 --- a/UnitTests/libcreator.cpp +++ b/UnitTests/libcreator.cpp @@ -25,8 +25,8 @@ void LibCreator::createLib(const QString &resLib, target.close(); copyedLibs.push_back(target.fileName()); - libDep.insert(resLib, dep); - libplatform.insert(resLib, platform); + libDep.insert(target.fileName(), dep); + libplatform.insert(target.fileName(), platform); } lib.close();