CQtDeployer/Deploy/metafilemanager.h

47 lines
1.1 KiB
C
Raw Normal View History

2019-09-23 16:46:57 +03:00
//#
2022-03-09 17:56:42 +03:00
//# Copyright (C) 2018-2022 QuasarApp.
2019-09-23 16:46:57 +03:00
//# 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.
//#
2019-09-15 17:38:47 +03:00
#ifndef METAFILEMANAGER_H
#define METAFILEMANAGER_H
#include <QString>
2021-04-22 11:14:33 +03:00
#include <deploycore.h>
2019-09-15 17:38:47 +03:00
class FileManager;
class DistroModule;
class TargetInfo;
2019-09-15 17:38:47 +03:00
class MetaFileManager
{
2021-01-08 22:02:50 +03:00
public:
MetaFileManager(FileManager* manager);
2021-04-22 11:14:33 +03:00
void createRunMetaFiles(const QHash<QString, DeployCore::QtModule> &modulesMap);
2021-01-08 22:02:50 +03:00
2019-09-15 17:38:47 +03:00
private:
bool createRunScriptWindows(const QString &target);
bool createRunScriptLinux(const QString &target);
2019-12-27 12:51:03 +03:00
QString generateCustoScriptBlok(bool bat) const;
2019-09-15 17:38:47 +03:00
bool createRunScript(const QString &target);
2021-04-22 11:14:33 +03:00
2019-12-11 18:06:54 +03:00
bool createQConf(const QString &target);
2019-09-15 17:38:47 +03:00
QHash<QString, QString> toReplace(const QString &target,
const DistroModule &distro) const;
void replace(const QHash<QString, QString>& map, QString& content);
2019-09-15 17:38:47 +03:00
FileManager* _fileManager = nullptr;
2021-04-22 11:14:33 +03:00
QHash<QString, DeployCore::QtModule> _mudulesMap;
2019-09-15 17:38:47 +03:00
};
#endif // METAFILEMANAGER_H