Commit 9a7847a3 authored by Jan Möbius's avatar Jan Möbius

Dennis patches for paths and cmake

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5662 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6063aba8
......@@ -103,33 +103,7 @@ bool Core::checkSignal(QObject* _plugin , const char* _signalSignature) {
void Core::loadPlugins()
{
//try to load plugins from new location
QDir tempDir = QDir(OpenFlipper::Options::applicationDir());
tempDir.cd("Plugins");
#if defined(WIN32)
tempDir.cd("Windows");
#elif defined(ARCH_DARWIN)
tempDir.cd("Darwin");
#else
tempDir.cd("Linux");
#endif
if ( OpenFlipper::Options::is64bit() )
tempDir.cd("64");
else
tempDir.cd("32");
#ifdef WIN32
#ifndef NDEBUG
#define DEBUG
#endif
#endif
#ifdef DEBUG
tempDir.cd("Debug");
#else
tempDir.cd("Release");
#endif
QDir tempDir = QDir(OpenFlipper::Options::pluginDir());
QStringList filters;
......@@ -141,6 +115,7 @@ void Core::loadPlugins()
filters << "*.so";
#endif
// Get all files in the Plugin dir
QStringList pluginlist = tempDir.entryList(filters,QDir::Files);
......
......@@ -163,58 +163,78 @@ void Core::setupOptions() {
// Remember the main application directory (assumed to be one above executable Path)
QDir tempDir = QDir(qApp->applicationDirPath());
tempDir.cd(".." + OpenFlipper::Options::dirSeparator() );
#ifdef OPENFLIPPER_APPDIR
tempDir.cd(OPENFLIPPER_APPDIR);
#else
tempDir.cd(".." + OpenFlipper::Options::dirSeparator() );
#endif
OpenFlipper::Options::applicationDir(tempDir.absolutePath());
// Set the standard path to the plugins
tempDir.cd("Plugins");
///@todo do not check WIN32 Only
if ( OpenFlipper::Options::is64bit() )
tempDir.cd("64");
if ( OpenFlipper::Options::is32bit() )
#ifdef WIN32
tempDir.cd("win32");
#else
tempDir.cd("32");
#endif
#ifdef WIN32
#ifdef NDEBUG
tempDir.cd("Release");
#else
tempDir.cd("Debug");
#endif
#else
#ifdef DEBUG
tempDir.cd("dbg");
#else
tempDir.cd("max");
#endif
#endif
#ifdef OPENFLIPPER_PLUGINDIR
tempDir.cd(OPENFLIPPER_PLUGINDIR);
#else
tempDir.cd("Plugins");
///@todo do not check WIN32 Only
if ( OpenFlipper::Options::is64bit() )
tempDir.cd("64");
if ( OpenFlipper::Options::is32bit() )
#ifdef WIN32
tempDir.cd("win32");
#else
tempDir.cd("32");
#endif
#ifdef WIN32
#ifdef NDEBUG
tempDir.cd("Release");
#else
tempDir.cd("Debug");
#endif
#else
#ifdef DEBUG
tempDir.cd("dbg");
#else
tempDir.cd("max");
#endif
#endif
#endif
OpenFlipper::Options::pluginDir(tempDir.absolutePath());
// Set the Path to the shaders
tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
tempDir.cd(OPENFLIPPER_DATADIR);
#endif
tempDir.cd("Shaders");
OpenFlipper::Options::shaderDir(tempDir.absolutePath());
// Set the Path to the textures
tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
tempDir.cd(OPENFLIPPER_DATADIR);
#endif
tempDir.cd("Textures");
OpenFlipper::Options::textureDir(tempDir.absolutePath());
// Set the Path to the Icons
tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
tempDir.cd(OPENFLIPPER_DATADIR);
#endif
tempDir.cd("Icons");
OpenFlipper::Options::iconDir(tempDir.absolutePath());
// Set the Path to the Fonts
tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
tempDir.cd(OPENFLIPPER_DATADIR);
#endif
tempDir.cd("Fonts");
OpenFlipper::Options::fontsDir(tempDir.absolutePath());
......
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