CQtDeployer/Deploy/dependenciesscanner.h

49 lines
994 B
C
Raw Normal View History

2019-01-26 07:54:56 +03:00
/*
* 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.
*/
2018-11-15 18:00:23 +03:00
#ifndef WINDEPENDENCIESSCANNER_H
#define WINDEPENDENCIESSCANNER_H
2018-11-18 17:22:05 +03:00
#include <QMultiMap>
#include <QStringList>
2019-01-27 15:37:19 +03:00
#include "deploy_global.h"
2019-03-19 21:50:05 +03:00
#include "pe.h"
2019-03-23 23:13:52 +03:00
#include "elf.h"
2019-03-19 21:50:05 +03:00
enum class PrivateScaner: unsigned char {
UNKNOWN,
PE,
ELF
};
class DEPLOYSHARED_EXPORT DependenciesScanner {
2018-11-18 17:22:05 +03:00
2019-03-17 18:42:07 +03:00
2018-11-18 17:22:05 +03:00
private:
QStringList _env;
2018-12-09 17:35:07 +03:00
QMap<QString, QString> _EnvLibs;
2019-03-17 18:42:07 +03:00
2019-03-19 21:50:05 +03:00
PE _peScaner;
2019-03-23 23:13:52 +03:00
ELF _elfScaner;
2019-03-19 21:50:05 +03:00
PrivateScaner getScaner(const QString& lib) const;
2019-03-17 18:42:07 +03:00
bool fillLibInfo(LibInfo& info ,const QString& file);
2018-11-15 18:00:23 +03:00
public:
2019-03-19 21:50:05 +03:00
explicit DependenciesScanner();
2018-11-15 18:00:23 +03:00
2018-11-23 14:56:55 +03:00
void setEnvironment(const QStringList &env);
2018-11-18 17:22:05 +03:00
2019-03-19 21:50:05 +03:00
QStringList scan(const QString& path);
~DependenciesScanner();
2018-11-15 18:00:23 +03:00
2019-03-19 21:50:05 +03:00
friend class deploytest;
2018-11-15 18:00:23 +03:00
};
#endif // WINDEPENDENCIESSCANNER_H