From 4bf2068a0d16afd45cd171548da6320095d0851e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enar=20V=C3=A4ikene?= Date: Wed, 18 May 2011 13:40:03 +0300 Subject: [PATCH] Added Plugin manager initialiation and loading/unloading plugins. --- src/main/GUI/CMakeLists.txt | 2 +- src/main/GUI/main.cpp | 10 ++++++---- src/main/GUI/version.h | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/GUI/CMakeLists.txt b/src/main/GUI/CMakeLists.txt index c9ba20e..4e1c0d8 100644 --- a/src/main/GUI/CMakeLists.txt +++ b/src/main/GUI/CMakeLists.txt @@ -9,7 +9,7 @@ include(${QT_USE_FILE}) include_directories(${eVaf_INCLUDE}) # Required eVaf libraries -set(eVaf_LIBRARIES CommonLib) +set(eVaf_LIBRARIES CommonLib PluginsLib) # Source files set(SRCS diff --git a/src/main/GUI/main.cpp b/src/main/GUI/main.cpp index 2a3caa0..6806246 100644 --- a/src/main/GUI/main.cpp +++ b/src/main/GUI/main.cpp @@ -32,6 +32,8 @@ #include #include +#include + #include #ifdef Q_OS_LINUX @@ -390,7 +392,7 @@ int main(int argc, char ** argv) return 1; // Plugin manager - // Plugins::PluginManager pluginManager; + Plugins::PluginManager pluginManager; // The main run loop bool quit = false; @@ -404,8 +406,8 @@ int main(int argc, char ** argv) return 1; // Initialize the plugin manager and load plugins - //if (!pluginManager.init()) - // return 1; + if (!pluginManager.init()) + return 1; // Run the application EVAF_INFO("Running %s", VER_MODULE_NAME_STR); @@ -416,7 +418,7 @@ int main(int argc, char ** argv) EVAF_INFO("%s is %s", VER_MODULE_NAME_STR, quit ? "exiting" : "restarting"); // Unload plugins and finalize the plugin manager - // pluginManager.done(); + pluginManager.done(); } EVAF_INFO("%s exit with code %d", VER_MODULE_NAME_STR, rval); diff --git a/src/main/GUI/version.h b/src/main/GUI/version.h index 2eb2db8..2a6c047 100644 --- a/src/main/GUI/version.h +++ b/src/main/GUI/version.h @@ -25,12 +25,12 @@ /** * Module/library version number in the form major,minor,release,build */ -#define VER_FILE_VERSION 0,1,1,2 +#define VER_FILE_VERSION 0,1,1,3 /** * Module/library version number in the string format (shall end with \0) */ -#define VER_FILE_VERSION_STR "0.1.1.2\0" +#define VER_FILE_VERSION_STR "0.1.1.3\0" /** * Module/library name (shall end with \0) -- 2.47.0