Commit a1241df6 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 dafae400
......@@ -114,23 +114,36 @@ void Core::loadPlugins()
else
tempDir.cd("32");
#ifdef WIN32
#ifndef NDEBUG
#define DEBUG
#endif
#endif
#ifdef DEBUG
tempDir.cd("Debug");
#else
tempDir.cd("Release");
#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++)
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 " + tempDir.absolutePath() );
// 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++)
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