You've already forked linuxdeploy
mirror of
https://github.com/encounter/linuxdeploy.git
synced 2026-03-30 11:18:58 -07:00
2a769ac3d9
Required to let users enable them by hand.
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
#include <iostream>
|
|
#include <boost/filesystem.hpp>
|
|
#include <linuxdeploy/plugin/plugin.h>
|
|
|
|
namespace bf = boost::filesystem;
|
|
|
|
int main(const int argc, const char* const* const argv) {
|
|
auto plugins = linuxdeploy::plugin::findPlugins();
|
|
|
|
if (argc > 1) {
|
|
for (int i = 1; i < argc; i++) {
|
|
const bf::path path = argv[1];
|
|
auto* plugin = linuxdeploy::plugin::createPluginInstance(path);
|
|
plugins[path.filename().string()] = plugin;
|
|
}
|
|
}
|
|
|
|
std::vector<std::pair<std::string, linuxdeploy::plugin::IPlugin*>> pluginList;
|
|
for (const auto& plugin : plugins)
|
|
pluginList.push_back(plugin);
|
|
|
|
for (const auto& plugin : pluginList) {
|
|
std::cout << "Testing plugin '" << plugin.first << "': " << plugin.second->path().string() << std::endl;
|
|
|
|
std::cout << "API level: " << plugin.second->apiLevel() << std::endl;
|
|
std::cout << "Plugin type: " << plugin.second->pluginType() << " (a.k.a. " << plugin.second->pluginTypeString() << ")"
|
|
<< std::endl;
|
|
|
|
if (plugin != pluginList.back())
|
|
std::cout << std::endl;
|
|
}
|
|
|
|
return 0;
|
|
}
|