From ae1118744cafea0d133872d60b8b929ce08cd537 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Sep 2012 12:53:03 +0200 Subject: [PATCH] Changed: Use RYZOM_SHARE_PREFIX as prefix to look for leveldesign data --- .../src/plugins/core/general_settings_page.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp index 9031fcb9f..e21edafec 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp @@ -31,6 +31,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + namespace Core { @@ -83,11 +87,18 @@ void GeneralSettingsPage::applyGeneralSettings() QApplication::setPalette(m_originalPalette); settings->endGroup(); + QString levelDesignPrefix; +#if defined(_DEBUG) && defined(NL_OS_WINDOWS) + levelDesignPrefix = "l:"; +#else + levelDesignPrefix = QString("%1/data_leveldesign").arg(RYZOM_SHARE_PREFIX); +#endif + // Add primitives path and ligo config file to CPath settings->beginGroup(Core::Constants::DATA_PATH_SECTION); - QString primitivePath = settings->value(Core::Constants::PRIMITIVES_PATH, "l:/primitives").toString(); - QString ligoConfigFile = settings->value(Core::Constants::LIGOCONFIG_FILE, "l:/leveldesign/world_editor_files/world_editor_classes.xml").toString(); - QString leveldesignPath = settings->value(Core::Constants::LEVELDESIGN_PATH, "l:/leveldesign").toString(); + QString primitivePath = settings->value(Core::Constants::PRIMITIVES_PATH, QString("%1/primitives").arg(levelDesignPrefix)).toString(); + QString ligoConfigFile = settings->value(Core::Constants::LIGOCONFIG_FILE, QString("%1/leveldesign/world_editor_files/world_editor_classes.xml").arg(levelDesignPrefix)).toString(); + QString leveldesignPath = settings->value(Core::Constants::LEVELDESIGN_PATH, QString("%1/leveldesign").arg(levelDesignPrefix)).toString(); NLMISC::CPath::addSearchPath(primitivePath.toStdString(), true, false); NLMISC::CPath::display(); NLMISC::CPath::addSearchFile(ligoConfigFile.toStdString());