mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-12 09:29:35 +00:00
added DISABLE_PE define
This commit is contained in:
parent
fb7058696a
commit
c06fc3b5b5
@ -32,6 +32,10 @@ android: DEFINES += WITHOUT_TESTS
|
|||||||
unix:SUBDIRS += tests/quicknanobrowser
|
unix:SUBDIRS += tests/quicknanobrowser
|
||||||
unix:SUBDIRS += tests/webui
|
unix:SUBDIRS += tests/webui
|
||||||
|
|
||||||
|
contains(DEFINES, DISABLE_PE) {
|
||||||
|
SUBDIRS -= Pe
|
||||||
|
DEFINES += WITHOUT_TESTS
|
||||||
|
}
|
||||||
|
|
||||||
contains(DEFINES, WITHOUT_TESTS) {
|
contains(DEFINES, WITHOUT_TESTS) {
|
||||||
SUBDIRS -= UnitTests \
|
SUBDIRS -= UnitTests \
|
||||||
|
@ -31,8 +31,9 @@ include('$$PWD/../QuasarAppLib/QuasarLib.pri')
|
|||||||
include('$$PWD/../Deploy/Deploy.pri')
|
include('$$PWD/../Deploy/Deploy.pri')
|
||||||
include('$$PWD/../zip/zip.pri')
|
include('$$PWD/../zip/zip.pri')
|
||||||
|
|
||||||
include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri')
|
!contains(DEFINES, DISABLE_PE) {
|
||||||
|
include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri')
|
||||||
|
}
|
||||||
|
|
||||||
TARGET = cqtdeployer
|
TARGET = cqtdeployer
|
||||||
|
|
||||||
|
@ -41,7 +41,9 @@ CONFIG(release, debug|release): {
|
|||||||
}
|
}
|
||||||
|
|
||||||
include('$$PWD/../QuasarAppLib/QuasarLib.pri')
|
include('$$PWD/../QuasarAppLib/QuasarLib.pri')
|
||||||
include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri')
|
!contains(DEFINES, DISABLE_PE) {
|
||||||
|
include('$$PWD/../pe/pe-parser-library/pe-parser-library.pri')
|
||||||
|
}
|
||||||
include('$$PWD/../zip/zip.pri')
|
include('$$PWD/../zip/zip.pri')
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,15 +11,18 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <pe-parse/parse.h>
|
|
||||||
#include <quasarapp.h>
|
#include <quasarapp.h>
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
#ifndef DISABLE_PE
|
||||||
|
#include <pe-parse/parse.h>
|
||||||
|
|
||||||
namespace peparse {
|
namespace peparse {
|
||||||
|
|
||||||
class section;
|
class section;
|
||||||
|
|
||||||
|
|
||||||
struct importent {
|
struct importent {
|
||||||
VA addr;
|
VA addr;
|
||||||
std::string symbolName;
|
std::string symbolName;
|
||||||
@ -63,6 +66,7 @@ bool PE::getDep(peparse::parsed_pe_internal * internal, LibInfo &res) const {
|
|||||||
|
|
||||||
return res.getDependncies().size() || !imports.size();
|
return res.getDependncies().size() || !imports.size();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QHash<WinAPI, QSet<QString> > PE::getWinAPI() const {
|
QHash<WinAPI, QSet<QString> > PE::getWinAPI() const {
|
||||||
return _winAPI;
|
return _winAPI;
|
||||||
@ -110,6 +114,7 @@ PE::PE(): IGetLibInfo () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PE::getLibInfo(const QString &lib, LibInfo &info) const {
|
bool PE::getLibInfo(const QString &lib, LibInfo &info) const {
|
||||||
|
#ifndef DISABLE_PE
|
||||||
auto parsedPeLib = peparse::ParsePEFromFile(lib.toLatin1());
|
auto parsedPeLib = peparse::ParsePEFromFile(lib.toLatin1());
|
||||||
|
|
||||||
if (!parsedPeLib)
|
if (!parsedPeLib)
|
||||||
@ -155,6 +160,11 @@ bool PE::getLibInfo(const QString &lib, LibInfo &info) const {
|
|||||||
|
|
||||||
|
|
||||||
return info.isValid();
|
return info.isValid();
|
||||||
|
#else
|
||||||
|
Q_UNUSED(lib)
|
||||||
|
Q_UNUSED(info)
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PE::~PE(){
|
PE::~PE(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user