COMMAND ${PYTHON_EXECUTABLE} ${aTestFileName})
if (WIN32) # different path to libraries variable name
SET_TESTS_PROPERTIES(${aTestName} PROPERTIES
- ENVIRONMENT "PATH=${_JUSTPATH};PYTHONPATH=${_PYTHONPATH};PLUGINS_CONFIG_FILE=${_CONFIG_FILE}")
+ ENVIRONMENT "PATH=${_JUSTPATH};PYTHONPATH=${_PYTHONPATH}")
else()
SET_TESTS_PROPERTIES(${aTestName} PROPERTIES
- ENVIRONMENT "LD_LIBRARY_PATH=${_LD_LIBRARY_PATH};PYTHONPATH=${_PYTHONPATH};PLUGINS_CONFIG_FILE=${_CONFIG_FILE}")
+ ENVIRONMENT "LD_LIBRARY_PATH=${_LD_LIBRARY_PATH};PYTHONPATH=${_PYTHONPATH}")
endif()
# Debug output...
#MESSAGE(STATUS "Test added: ${aTestName} file: ${aTestFileName}")
COMMAND "${CMAKE_COMMAND}" --build "${PROJECT_BINARY_DIR}" --target install --config ${CMAKE_BUILD_TYPE}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc/tui"
)
+
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tui/ DESTINATION ${SHAPER_INSTALL_TUI_DOC} OPTIONAL)
)
)
-@SET PLUGINS_CONFIG_FILE=%ROOT_DIR%\install\share\salome\resources\shaper
@SET SHAPER_ROOT_DIR=%ROOT_DIR%\install
@SET PATH=%SHAPER_ROOT_DIR%\bin\salome;%SHAPER_ROOT_DIR%\lib\salome;%PATH%
@SET PYTHONPATH=%SHAPER_ROOT_DIR%\bin\salome;%SHAPER_ROOT_DIR%\lib\salome;%PYTHONPATH%
@SET LightAppConfig=%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui
-@SET SHAPERResources=%SHAPER_ROOT_DIR%\share\salome\resources\shaper
export PATH=${SHAPER_ROOT_DIR}/bin/salome:${SHAPER_ROOT_DIR}/lib/salome:${PATH}
export PYTHONPATH=${SHAPER_ROOT_DIR}//bin/salome:${SHAPER_ROOT_DIR}/lib/salome:${PYTHONPATH}
export LD_LIBRARY_PATH=${SHAPER_ROOT_DIR}/bin/salome:${SHAPER_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
-export PLUGINS_CONFIG_FILE=${SHAPER_ROOT_DIR}/share/salome/resources/shaper
-export SHAPERResources=${SHAPER_ROOT_DIR}/share/salome/resources/shaper
std::string Config_XMLReader::pluginConfigFile()
{
std::string aValue;
- char* anEnv = getenv("PLUGINS_CONFIG_FILE");
+ char* anEnv = getenv("SHAPER_ROOT_DIR");
if (anEnv) {
aValue = std::string(anEnv);
+ } else {
+ anEnv = getenv("OPENPARTS_ROOT_DIR");
+ if (anEnv)
+ aValue = std::string(anEnv);
}
+#ifdef WIN32
+ aValue += "\\";
+#else
+ aValue += "/";
+#endif
+ aValue += "plugins";
return aValue;
}
CONFIG_EXPORT Config_XMLReader(const std::string& theXmlFile);
CONFIG_EXPORT virtual ~Config_XMLReader();
/*!
- * Returns value of PLUGINS_CONFIG_FILE env variable, a path to the plugins.xml file
+ * Returns a path to the plugins.xml file (created from ROOT_DIR environment variable)
* \return string value
*/
CONFIG_EXPORT static std::string pluginConfigFile();
return myIconsMap[iconName()];
}
// Load icon for the presentation
- char* aEnv = getenv("SHAPERResources");
- if (aEnv != NULL) {
- TCollection_AsciiString aFile(aEnv);
- aFile += FSEP;
- aFile += iconName();
- Handle(Image_AlienPixMap) aPixMap = new Image_AlienPixMap();
- if (aPixMap->Load(aFile)) {
- myIconsMap[iconName()] = aPixMap;
- return aPixMap;
- }
+ std::string aFile;
+ char* anEnv = getenv("SHAPER_ROOT_DIR");
+ if (anEnv) {
+ aFile = std::string(anEnv);
+ } else {
+ anEnv = getenv("OPENPARTS_ROOT_DIR");
+ if (anEnv)
+ aFile = std::string(anEnv);
+ }
+ aFile += FSEP;
+ aFile += "resources";
+
+ aFile += FSEP;
+ aFile += iconName();
+ Handle(Image_AlienPixMap) aPixMap = new Image_AlienPixMap();
+ if (aPixMap->Load(aFile.c_str())) {
+ myIconsMap[iconName()] = aPixMap;
+ return aPixMap;
}
// The icon for constraint is not found
static const char aMsg[] = "Error! constraint images are not found";