| 8 | } |
| 9 | |
| 10 | void PackageManager::createPackage(const QString &libraryPath, const QString &dest) |
| 11 | { |
| 12 | QStringList attributes; |
| 13 | attributes << "a" |
| 14 | << "-y" |
| 15 | << "-ttar" << dest + ".clc" << libraryPath; |
| 16 | _7z = new QProcess(); |
| 17 | // TODO: Missing slot for openingError!!! |
| 18 | connect(_7z, SIGNAL(error(QProcess::ProcessError)), this, SLOT(openingError(QProcess::ProcessError))); |
| 19 | connect(_7z, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &PackageManager::exported); |
| 20 | #if defined Q_OS_UNIX && !defined Q_OS_MACOS |
| 21 | _7z->start("7z", attributes); // TODO: use 7z.so |
| 22 | #else |
| 23 | _7z->start(QCoreApplication::applicationDirPath() + "/utils/7zip", attributes); // TODO: use 7z.dll |
| 24 | #endif |
| 25 | } |
| 26 | |
| 27 | void PackageManager::extractPackage(const QString &packagePath, const QString &destDir) |
| 28 | { |