mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-07 23:19:35 +00:00
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
#ifndef PACKING_H
|
|
#define PACKING_H
|
|
|
|
#include <QObject>
|
|
#include <QProcess>
|
|
#include "deploy_global.h"
|
|
#include "packagecontrol.h"
|
|
|
|
/**
|
|
* @brief The Packing class - this class have interface for configure package and
|
|
* create package from deployment distibution.
|
|
*/
|
|
|
|
class ConfigParser;
|
|
class iDistribution;
|
|
class FileManager;
|
|
|
|
class DEPLOYSHARED_EXPORT Packing : public QObject, public PackageControl
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Packing(FileManager *fileManager);
|
|
~Packing() override;
|
|
void setDistribution(const QList<iDistribution*> &pakages);
|
|
bool create();
|
|
|
|
bool movePackage(const QString &package, const QString &newLocation) override;
|
|
bool copyPackage(const QString &package, const QString &newLocation) override;
|
|
|
|
protected:
|
|
QStringList availablePackages() const override;
|
|
|
|
private:
|
|
|
|
bool collectPackages();
|
|
bool moveData(const QString& from, const QString& to,
|
|
const QString &ignore = "") const;
|
|
|
|
bool restorePackagesLocations();
|
|
|
|
QList<iDistribution*> _pakages;
|
|
QProcess *_proc = nullptr;
|
|
QHash<QString, QString> _packagesLocations;
|
|
QHash<QString, QString> _defaultPackagesLocations;
|
|
|
|
FileManager* _fileManager = nullptr;
|
|
|
|
private slots:
|
|
void handleOutputUpdate();
|
|
|
|
};
|
|
|
|
#endif // PACKING_H
|