Commit cae69d74 authored by Jan Möbius's avatar Jan Möbius
Browse files

Pluginloader for windows updates,

filter for so and dll files when loading plugins 

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3408 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b08e09d9
...@@ -114,23 +114,36 @@ void Core::loadPlugins() ...@@ -114,23 +114,36 @@ void Core::loadPlugins()
else else
tempDir.cd("32"); tempDir.cd("32");
#ifdef WIN32
#ifndef NDEBUG
#define DEBUG
#endif
#endif
#ifdef DEBUG #ifdef DEBUG
tempDir.cd("Debug"); tempDir.cd("Debug");
#else #else
tempDir.cd("Release"); tempDir.cd("Release");
#endif #endif
QStringList pluginlist = tempDir.entryList(QDir::Files); QStringList filters;
#ifdef WIN32
filters << "*.dll";
#else
filters << "*.so";
#endif
QStringList pluginlist = tempDir.entryList(filters, QDir::Files);
for (int i=0; i < pluginlist.size(); i++) for (int i=0; i < pluginlist.size(); i++)
pluginlist[i] = tempDir.absoluteFilePath(pluginlist[i]); pluginlist[i] = tempDir.absoluteFilePath(pluginlist[i]);
//try to load plugins from old location //try to load plugins from old location
emit log(LOGOUT,"Trying to find Plugins at " + tempDir.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 pluginlist2 = OpenFlipper::Options::pluginDir().entryList(QDir::Files); QStringList pluginlist2 = OpenFlipper::Options::pluginDir().entryList(filters,QDir::Files);
for (int i=0; i < pluginlist2.size(); i++) for (int i=0; i < pluginlist2.size(); i++)
pluginlist2[i] = OpenFlipper::Options::pluginDir().absoluteFilePath(pluginlist2[i]); pluginlist2[i] = OpenFlipper::Options::pluginDir().absoluteFilePath(pluginlist2[i]);
......
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