mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 07:16:15 +00:00
Changed: Use RYZOM_SHARE_PREFIX as prefix to look for leveldesign data
This commit is contained in:
parent
5e621fba15
commit
ae1118744c
1 changed files with 14 additions and 3 deletions
|
@ -31,6 +31,10 @@
|
||||||
#include <QtGui/QStyleFactory>
|
#include <QtGui/QStyleFactory>
|
||||||
#include <QtGui/QStyle>
|
#include <QtGui/QStyle>
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Core
|
namespace Core
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -83,11 +87,18 @@ void GeneralSettingsPage::applyGeneralSettings()
|
||||||
QApplication::setPalette(m_originalPalette);
|
QApplication::setPalette(m_originalPalette);
|
||||||
settings->endGroup();
|
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
|
// Add primitives path and ligo config file to CPath
|
||||||
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
settings->beginGroup(Core::Constants::DATA_PATH_SECTION);
|
||||||
QString primitivePath = settings->value(Core::Constants::PRIMITIVES_PATH, "l:/primitives").toString();
|
QString primitivePath = settings->value(Core::Constants::PRIMITIVES_PATH, QString("%1/primitives").arg(levelDesignPrefix)).toString();
|
||||||
QString ligoConfigFile = settings->value(Core::Constants::LIGOCONFIG_FILE, "l:/leveldesign/world_editor_files/world_editor_classes.xml").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, "l:/leveldesign").toString();
|
QString leveldesignPath = settings->value(Core::Constants::LEVELDESIGN_PATH, QString("%1/leveldesign").arg(levelDesignPrefix)).toString();
|
||||||
NLMISC::CPath::addSearchPath(primitivePath.toStdString(), true, false);
|
NLMISC::CPath::addSearchPath(primitivePath.toStdString(), true, false);
|
||||||
NLMISC::CPath::display();
|
NLMISC::CPath::display();
|
||||||
NLMISC::CPath::addSearchFile(ligoConfigFile.toStdString());
|
NLMISC::CPath::addSearchFile(ligoConfigFile.toStdString());
|
||||||
|
|
Loading…
Reference in a new issue