Mercurial > hg > vamp-plugin-pack
view installer.cpp @ 38:3466e0d1393c
Generate the qrc file
author | Chris Cannam |
---|---|
date | Tue, 17 Dec 2019 09:51:32 +0000 |
parents | efb73feb1061 |
children | f1326adbb33b |
line wrap: on
line source
#include <QApplication> #include <QString> #include <QFile> #include <QDir> #include <iostream> using namespace std; int main(int argc, char **argv) { QApplication app(argc, argv); QDir dir(":out/"); auto entries = dir.entryList({ "*.so", "*.dll", "*.dylib" }); for (auto e: entries) { cerr << e.toStdString() << endl; } QString target = QDir::homePath() + "/Library/Audio/Plug-Ins/Vamp/"; for (auto e: entries) { QFile f(":out/" + e); if (!f.copy(target + e)) { cerr << "Failed to copy " << e.toStdString() << " to target " << (target + e).toStdString() << endl; continue; } if (!QFile::setPermissions(target + e, QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner | QFile::ReadGroup | QFile::ReadOther)) { cerr << "Failed to set permissions on " << e.toStdString() << endl; continue; } } return 0; }