From e2aa74a85448d1eb7e4fff1700cb5d4c65251ee0 Mon Sep 17 00:00:00 2001 From: "a.yankovich" Date: Mon, 25 Mar 2019 15:27:06 +0300 Subject: [PATCH] qmake support added --- dump-pe/dump-pe.pro | 35 +++++++++++++++++++ pe-parse.pro | 21 +++++++++++ .../{pe-parser.pri => pe-parser-library.pri} | 6 ++-- .../{pe-parser.pro => pe-parser-library.pro} | 12 +++---- pe-parser-library/src/buffer.cpp | 2 +- pe-parser-library/src/parse.cpp | 6 ++-- 6 files changed, 67 insertions(+), 15 deletions(-) create mode 100644 dump-pe/dump-pe.pro create mode 100755 pe-parse.pro rename pe-parser-library/{pe-parser.pri => pe-parser-library.pri} (72%) rename pe-parser-library/{pe-parser.pro => pe-parser-library.pro} (87%) diff --git a/dump-pe/dump-pe.pro b/dump-pe/dump-pe.pro new file mode 100644 index 0000000..97528d7 --- /dev/null +++ b/dump-pe/dump-pe.pro @@ -0,0 +1,35 @@ +# +# Copyright (C) 2018-2019 QuasarApp. +# Distributed under the lgplv3 software license, see the accompanying +# Everyone is permitted to copy and distribute verbatim copies +# of this license document, but changing it is not allowed. +# + +QT -= gui + +TARGET = dump-pe +TEMPLATE = lib + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +CONFIG(release, debug|release): { + DESTDIR="$$PWD/build/release" +} else { + DESTDIR="$$PWD/build/debug" +} + +include($$PWD/../pe-parser-library/pe-parser-library.pri) + +SOURCES += \ + main.cpp + + diff --git a/pe-parse.pro b/pe-parse.pro new file mode 100755 index 0000000..eeeb455 --- /dev/null +++ b/pe-parse.pro @@ -0,0 +1,21 @@ +# +# Copyright (C) 2018-2019 QuasarApp. +# Distributed under the lgplv3 software license, see the accompanying +# Everyone is permitted to copy and distribute verbatim copies +# of this license document, but changing it is not allowed. +# + +TEMPLATE = subdirs +CONFIG += ordered + +SUBDIRS += \ + pe-parser-library \ + dump-pe + + + +#CQtDeployer.depends=QuasarAppLib +#CQtDeployer.depends=Deploy + +#QuasarAppLib.file = $$PWD/QuasarAppLib/QuasarApp.pro +#Pe.file = $$PWD/pe/pe-parser-library/pe-parser.pro diff --git a/pe-parser-library/pe-parser.pri b/pe-parser-library/pe-parser-library.pri similarity index 72% rename from pe-parser-library/pe-parser.pri rename to pe-parser-library/pe-parser-library.pri index d38515b..1cfdb8d 100644 --- a/pe-parser-library/pe-parser.pri +++ b/pe-parser-library/pe-parser-library.pri @@ -5,7 +5,7 @@ # of this license document, but changing it is not allowed. # -!isEmpty(PE_LIB):error("Deploy.pri already included") +!isEmpty(PE_LIB):error("pe-parser-library.pri already included") PE_LIB = 1 #DEPENDS @@ -15,9 +15,9 @@ CONFIG(release, debug|release): { PE_LIB_OUTPUT_DIR="$$PWD/build/debug" } -LIBS += -L$$PE_LIB_OUTPUT_DIR -lPE +LIBS += -L$$PE_LIB_OUTPUT_DIR -lpe-parser-library -INCLUDEPATH += "$$PWD/include/parser-library" +INCLUDEPATH += "$$PWD/include" diff --git a/pe-parser-library/pe-parser.pro b/pe-parser-library/pe-parser-library.pro similarity index 87% rename from pe-parser-library/pe-parser.pro rename to pe-parser-library/pe-parser-library.pro index f87a612..ad4cd9d 100644 --- a/pe-parser-library/pe-parser.pro +++ b/pe-parser-library/pe-parser-library.pro @@ -5,16 +5,9 @@ # of this license document, but changing it is not allowed. # - -#------------------------------------------------- -# -# Project created by QtCreator 2019-01-26T13:55:47 -# -#------------------------------------------------- - QT -= gui -TARGET = PE +TARGET = pe-parser-library TEMPLATE = lib DEFINES += PEPARSER_LIBRARY @@ -36,6 +29,9 @@ CONFIG(release, debug|release): { DESTDIR="$$PWD/build/debug" } +INCLUDEPATH += "$$PWD/include" + + HEADERS += \ include/parser-library/nt-headers.h \ include/parser-library/parse.h \ diff --git a/pe-parser-library/src/buffer.cpp b/pe-parser-library/src/buffer.cpp index 3068d7b..60be897 100644 --- a/pe-parser-library/src/buffer.cpp +++ b/pe-parser-library/src/buffer.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include // keep this header above "windows.h" because it contains many types -#include +#include #ifdef _WIN32 diff --git a/pe-parser-library/src/parse.cpp b/pe-parser-library/src/parse.cpp index 6139730..04b4ad2 100644 --- a/pe-parser-library/src/parse.cpp +++ b/pe-parser-library/src/parse.cpp @@ -28,9 +28,9 @@ THE SOFTWARE. #include #include -#include -#include -#include +#include +#include +#include namespace peparse {