mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 04:51:52 +00:00
Read the GUI Editor widget and expression definition XML files from the right directory.
--HG-- branch : hotfix
This commit is contained in:
parent
a2c96c3053
commit
b881f9558b
5 changed files with 18 additions and 3 deletions
|
@ -10,15 +10,18 @@ IF(WIN32)
|
||||||
SET(OVQT_PLUGIN_SPECS_DIR "plugins")
|
SET(OVQT_PLUGIN_SPECS_DIR "plugins")
|
||||||
SET(OVQT_PLUGIN_DIR "plugins")
|
SET(OVQT_PLUGIN_DIR "plugins")
|
||||||
SET(OVQT_DATA_DIR ".")
|
SET(OVQT_DATA_DIR ".")
|
||||||
|
SET(OVQT_IMP_DATA_DIR "${OVQT_DATA_DIR}")
|
||||||
ELSEIF(APPLE)
|
ELSEIF(APPLE)
|
||||||
# TODO: under Mac OS X, don't install but copy files in application package
|
# TODO: under Mac OS X, don't install but copy files in application package
|
||||||
SET(OVQT_PLUGIN_SPECS_DIR "plugins")
|
SET(OVQT_PLUGIN_SPECS_DIR "plugins")
|
||||||
SET(OVQT_PLUGIN_DIR "plugins")
|
SET(OVQT_PLUGIN_DIR "plugins")
|
||||||
SET(OVQT_DATA_DIR ".")
|
SET(OVQT_DATA_DIR ".")
|
||||||
|
SET(OVQT_IMP_DATA_DIR "${OVQT_DATA_DIR}")
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
SET(OVQT_PLUGIN_SPECS_DIR ${NL_SHARE_PREFIX}/studio/plugins)
|
SET(OVQT_PLUGIN_SPECS_DIR ${NL_SHARE_PREFIX}/studio/plugins)
|
||||||
SET(OVQT_PLUGIN_DIR ${NL_LIB_PREFIX}/studio)
|
SET(OVQT_PLUGIN_DIR ${NL_LIB_PREFIX}/studio)
|
||||||
SET(OVQT_DATA_DIR ${NL_SHARE_PREFIX}/studio/data)
|
SET(OVQT_DATA_DIR ${NL_SHARE_PREFIX}/studio/data)
|
||||||
|
SET(OVQT_IMP_DATA_DIR "${CMAKE_INSTALL_PREFIX}/${OVQT_DATA_DIR}")
|
||||||
|
|
||||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ovqt_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ovqt_config.h)
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ovqt_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ovqt_config.h)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
|
@ -4,6 +4,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${QT_INCLUDES}
|
${QT_INCLUDES}
|
||||||
${LUA_INCLUDE_DIR})
|
${LUA_INCLUDE_DIR})
|
||||||
|
|
||||||
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/gui_editor_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/gui_editor_config.h)
|
||||||
|
|
||||||
FILE(GLOB SRC *.cpp *.h)
|
FILE(GLOB SRC *.cpp *.h)
|
||||||
|
|
||||||
SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h
|
SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "expression_loader.h"
|
#include "expression_loader.h"
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include "gui_editor_config.h"
|
||||||
|
|
||||||
class ExpressionStorePvt
|
class ExpressionStorePvt
|
||||||
{
|
{
|
||||||
|
@ -50,7 +51,7 @@ ExpressionStore::~ExpressionStore()
|
||||||
|
|
||||||
bool ExpressionStore::load()
|
bool ExpressionStore::load()
|
||||||
{
|
{
|
||||||
QDir d( "expressions" );
|
QDir d( EXPRESSIONS_DIR );
|
||||||
if( !d.exists() )
|
if( !d.exists() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef GUI_EDITOR_CONFIG_H
|
||||||
|
#define GUI_EDITOR_CONFIG_H
|
||||||
|
|
||||||
|
#define WIDGETS_DIR "${OVQT_IMP_DATA_DIR}/widgets"
|
||||||
|
#define EXPRESSIONS_DIR "${OVQT_IMP_DATA_DIR}/expressions"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include "nel/misc/debug.h"
|
#include "nel/misc/debug.h"
|
||||||
#include "widget_info_tree.h"
|
#include "widget_info_tree.h"
|
||||||
|
#include "gui_editor_config.h"
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ namespace GUIEditor
|
||||||
|
|
||||||
void CWidgetPropParser::parseGUIWidgets()
|
void CWidgetPropParser::parseGUIWidgets()
|
||||||
{
|
{
|
||||||
QDir d( "widgets" );
|
QDir d( WIDGETS_DIR );
|
||||||
if( !d.exists() )
|
if( !d.exists() )
|
||||||
{
|
{
|
||||||
nlwarning( "GUI widgets directory doesn't exist!" );
|
nlwarning( "GUI widgets directory doesn't exist!" );
|
||||||
|
@ -55,7 +56,7 @@ namespace GUIEditor
|
||||||
|
|
||||||
QStringListIterator itr( files );
|
QStringListIterator itr( files );
|
||||||
while( itr.hasNext() )
|
while( itr.hasNext() )
|
||||||
parseGUIWidget( "widgets/" + itr.next() );
|
parseGUIWidget( QString( WIDGETS_DIR ) + QString( "/" ) + itr.next() );
|
||||||
|
|
||||||
buildWidgetInfoTree();
|
buildWidgetInfoTree();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue