Commit 9fe1bd47 authored by Dirk Wilden's avatar Dirk Wilden
Browse files

Load plugins from new location

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3116 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a5705fa1
...@@ -99,10 +99,43 @@ bool Core::checkSignal(QObject* _plugin , const char* _signalSignature) { ...@@ -99,10 +99,43 @@ bool Core::checkSignal(QObject* _plugin , const char* _signalSignature) {
*/ */
void Core::loadPlugins() void Core::loadPlugins()
{ {
//try to load plugins from new location
QDir tempDir = QDir(OpenFlipper::Options::applicationDir());
tempDir.cd("Plugins");
#ifdef WIN32
tempDir.cd("Windows");
#else
tempDir.cd("Linux");
#endif
if ( OpenFlipper::Options::is64bit() )
tempDir.cd("64");
else
tempDir.cd("32");
#ifdef DEBUG
tempDir.cd("Debug");
#else
tempDir.cd("Release");
#endif
QStringList pluginlist = tempDir.entryList(QDir::Files);
for (int i=0; i < pluginlist.size(); i++)
pluginlist[i] = tempDir.absoluteFilePath(pluginlist[i]);
//try to load plugins from old location
emit log(LOGOUT,"Trying to find Plugins at " + OpenFlipper::Options::pluginDir().absolutePath() ); emit log(LOGOUT,"Trying to find Plugins at " + OpenFlipper::Options::pluginDir().absolutePath() );
// Get all files in the Plugin dir // Get all files in the Plugin dir
QStringList pluginlist = OpenFlipper::Options::pluginDir().entryList(QDir::Files); QStringList pluginlist2 = OpenFlipper::Options::pluginDir().entryList(QDir::Files);
for (int i=0; i < pluginlist2.size(); i++)
pluginlist2[i] = tempDir.absoluteFilePath(pluginlist2[i]);
pluginlist += pluginlist2;
// Get all config files to be used // Get all config files to be used
QStringList configFiles = OpenFlipper::Options::optionFiles(); QStringList configFiles = OpenFlipper::Options::optionFiles();
...@@ -184,7 +217,7 @@ void Core::loadPlugins() ...@@ -184,7 +217,7 @@ void Core::loadPlugins()
QApplication::processEvents(); QApplication::processEvents();
} }
loadPlugin(OpenFlipper::Options::pluginDir().absoluteFilePath( pluginlist[i] ),true); loadPlugin(pluginlist[i],true);
} }
splashMessage_ = ""; splashMessage_ = "";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment