added win lib scanner

This commit is contained in:
a.yankovich 2018-11-15 18:00:23 +03:00
parent 4ab508315f
commit 0f1a482250
7 changed files with 83 additions and 1 deletions

3
.gitmodules vendored
View File

@ -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

View File

@ -9,7 +9,8 @@ TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += QuasarAppLib \
CQtDeployer
CQtDeployer \
WinDependenciesScanner
CQtDeployer.depends=QuasarAppLib

View File

@ -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
}

View File

@ -0,0 +1,11 @@
#include "windependenciesscanner.h"
#include <QList>
#include "../qtTools/src/windeployqt/elfreader.h"
WinDependenciesScanner::WinDependenciesScanner() {}
QList<QByteArray> WinDependenciesScanner::scan(const QString &path) {
ElfReader scaner(path);
return scaner.dependencies();
}

View File

@ -0,0 +1,17 @@
#ifndef WINDEPENDENCIESSCANNER_H
#define WINDEPENDENCIESSCANNER_H
#include "windependenciesscanner_global.h"
class WINDEPENDENCIESSCANNERSHARED_EXPORT WinDependenciesScanner
{
public:
explicit WinDependenciesScanner();
QList<QByteArray> scan(const QString& path);
~WinDependenciesScanner();
};
#endif // WINDEPENDENCIESSCANNER_H

View File

@ -0,0 +1,12 @@
#ifndef WINDEPENDENCIESSCANNER_GLOBAL_H
#define WINDEPENDENCIESSCANNER_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(WINDEPENDENCIESSCANNER_LIBRARY)
# define WINDEPENDENCIESSCANNERSHARED_EXPORT Q_DECL_EXPORT
#else
# define WINDEPENDENCIESSCANNERSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // WINDEPENDENCIESSCANNER_GLOBAL_H

1
qtTools Submodule

@ -0,0 +1 @@
Subproject commit 1d735db9b47aa367ad610408a3e310000fc2766f