mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-07-09 23:06:56 -05:00
Plugin system, mk. 1
This commit is contained in:
23
src/plugin_test_main.cpp
Normal file
23
src/plugin_test_main.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <linuxdeploy/plugin/plugin.h>
|
||||
|
||||
namespace bf = boost::filesystem;
|
||||
|
||||
int main(const int argc, const char* const* const argv) {
|
||||
if (argc < 2) {
|
||||
std::cout << "Usage: " << argv[0] << " <path to plugin>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const std::string path = argv[1];
|
||||
|
||||
std::cout << "Testing plugin: " << path << std::endl;
|
||||
|
||||
auto* plugin = linuxdeploy::plugin::createPluginInstance(path);
|
||||
|
||||
std::cout << "API level: " << plugin->apiLevel() << std::endl;
|
||||
std::cout << "Plugin type: " << plugin->pluginType() << " (a.k.a. " << plugin->pluginTypeString() << ")" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user