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

Dennis patches for paths and cmake

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