mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 07:58:44 +00:00
Add the data directory to the search path.
--HG-- branch : hotfix
This commit is contained in:
parent
26f1cc6fac
commit
b381ef6fae
3 changed files with 20 additions and 1 deletions
|
@ -38,6 +38,10 @@ SET(OVQT_CORE_PLUGIN_UIS settings_dialog.ui
|
|||
|
||||
SET(OVQT_CORE_PLUGIN_RCS core.qrc)
|
||||
|
||||
IF(NOT WIN32)
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/core_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/core_config.h)
|
||||
ENDIF(NOT WIN32)
|
||||
|
||||
SET(QT_USE_QTGUI TRUE)
|
||||
SET(QT_USE_QTOPENGL TRUE)
|
||||
|
||||
|
|
7
code/studio/src/plugins/core/core_config.h.cmake
Normal file
7
code/studio/src/plugins/core/core_config.h.cmake
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifndef CORE_CONFIG_H
|
||||
#define CORE_CONFIG_H
|
||||
|
||||
#define STUDIO_DATA_DIR "${OVQT_IMP_DATA_DIR}"
|
||||
|
||||
#endif
|
||||
|
|
@ -28,6 +28,10 @@
|
|||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QFileDialog>
|
||||
|
||||
#if !defined NL_OS_WINDOWS
|
||||
#include "core_config.h"
|
||||
#endif
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
||||
|
@ -118,6 +122,10 @@ void SearchPathsSettingsPage::applySearchPaths()
|
|||
for (int i = 1; i < remapExt.size(); i += 2)
|
||||
NLMISC::CPath::remapExtension(remapExt.at(i - 1).toUtf8().constData(), remapExt.at(i).toUtf8().constData(), true);
|
||||
|
||||
#if !defined NL_OS_WINDOWS
|
||||
NLMISC::CPath::addSearchPath(std::string(STUDIO_DATA_DIR), false, false);
|
||||
#endif
|
||||
|
||||
Q_FOREACH(QString path, paths)
|
||||
{
|
||||
NLMISC::CPath::addSearchPath(path.toUtf8().constData(), m_recurse, false);
|
||||
|
@ -216,4 +224,4 @@ void SearchPathsSettingsPage::checkEnabledButton()
|
|||
m_ui.downToolButton->setEnabled(bEnabled);
|
||||
}
|
||||
|
||||
} /* namespace Core */
|
||||
} /* namespace Core */
|
||||
|
|
Loading…
Reference in a new issue