diff --git a/.gitmodules b/.gitmodules index 3f9f279..e0bd039 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "qtBase"] path = qtBase url = https://github.com/qt/qtbase.git +[submodule "qtTools"] + path = qtTools + url = https://github.com/qt/qttools.git diff --git a/CQtDeployer.pro b/CQtDeployer.pro index 7cde89c..a76474d 100644 --- a/CQtDeployer.pro +++ b/CQtDeployer.pro @@ -9,7 +9,8 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS += QuasarAppLib \ - CQtDeployer + CQtDeployer \ + WinDependenciesScanner CQtDeployer.depends=QuasarAppLib diff --git a/WinDependenciesScanner/WinDependenciesScanner.pro b/WinDependenciesScanner/WinDependenciesScanner.pro new file mode 100644 index 0000000..918cc21 --- /dev/null +++ b/WinDependenciesScanner/WinDependenciesScanner.pro @@ -0,0 +1,37 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2018-11-15T17:50:53 +# +#------------------------------------------------- + +QT -= gui + +TARGET = WinDependenciesScanner +TEMPLATE = lib + +DEFINES += WINDEPENDENCIESSCANNER_LIBRARY + +# 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 + +SOURCES += \ + windependenciesscanner.cpp \ + ../qtTools/src/windeployqt/elfreader.cpp + +HEADERS += \ + windependenciesscanner.h \ + windependenciesscanner_global.h \ + ../qtTools/src/windeployqt/elfreader.h + +unix { + target.path = /usr/lib + INSTALLS += target +} diff --git a/WinDependenciesScanner/windependenciesscanner.cpp b/WinDependenciesScanner/windependenciesscanner.cpp new file mode 100644 index 0000000..8acbcbb --- /dev/null +++ b/WinDependenciesScanner/windependenciesscanner.cpp @@ -0,0 +1,11 @@ +#include "windependenciesscanner.h" + +#include +#include "../qtTools/src/windeployqt/elfreader.h" + +WinDependenciesScanner::WinDependenciesScanner() {} + +QList WinDependenciesScanner::scan(const QString &path) { + ElfReader scaner(path); + return scaner.dependencies(); +} diff --git a/WinDependenciesScanner/windependenciesscanner.h b/WinDependenciesScanner/windependenciesscanner.h new file mode 100644 index 0000000..a7dd78b --- /dev/null +++ b/WinDependenciesScanner/windependenciesscanner.h @@ -0,0 +1,17 @@ +#ifndef WINDEPENDENCIESSCANNER_H +#define WINDEPENDENCIESSCANNER_H + +#include "windependenciesscanner_global.h" + + +class WINDEPENDENCIESSCANNERSHARED_EXPORT WinDependenciesScanner +{ +public: + explicit WinDependenciesScanner(); + + QList scan(const QString& path); + + ~WinDependenciesScanner(); +}; + +#endif // WINDEPENDENCIESSCANNER_H diff --git a/WinDependenciesScanner/windependenciesscanner_global.h b/WinDependenciesScanner/windependenciesscanner_global.h new file mode 100644 index 0000000..47d00d3 --- /dev/null +++ b/WinDependenciesScanner/windependenciesscanner_global.h @@ -0,0 +1,12 @@ +#ifndef WINDEPENDENCIESSCANNER_GLOBAL_H +#define WINDEPENDENCIESSCANNER_GLOBAL_H + +#include + +#if defined(WINDEPENDENCIESSCANNER_LIBRARY) +# define WINDEPENDENCIESSCANNERSHARED_EXPORT Q_DECL_EXPORT +#else +# define WINDEPENDENCIESSCANNERSHARED_EXPORT Q_DECL_IMPORT +#endif + +#endif // WINDEPENDENCIESSCANNER_GLOBAL_H diff --git a/qtTools b/qtTools new file mode 160000 index 0000000..1d735db --- /dev/null +++ b/qtTools @@ -0,0 +1 @@ +Subproject commit 1d735db9b47aa367ad610408a3e310000fc2766f