]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make the application compiliable and executable on Linux with SALOME environment:
authorSergey BELASH <belash.sergey@opencascade.com>
Tue, 9 Sep 2014 07:31:33 +0000 (11:31 +0400)
committerSergey BELASH <belash.sergey@opencascade.com>
Tue, 9 Sep 2014 07:31:33 +0000 (11:31 +0400)
* Salome and stanalone environments merged into one.
* Hotfix for PreferencesMgr to avoid crash in Salome Module mode

CMakeCommon/FindSUIT.cmake
CMakeCommon/XMLProcessing.cmake
CMakeLists.txt
eclipse.sh
eclipse_salome.sh [deleted file]
linux_env.sh
msvc10_env.bat
salome_env.sh [deleted file]
salome_run.sh
src/Model/Model_Document.h
src/XGUI/XGUI_Preferences.cpp

index daca7d986e6eae89ee8a09a9dd4e1ac51b30648b..260e4cedae08d92f5077e35a169fe5c3143c606a 100644 (file)
@@ -1,6 +1,10 @@
 
-SET(SUIT_DIR $ENV{SUIT_DIR})
-IF(EXISTS ${SUIT_DIR})
+IF(HAVE_SALOME)
+  SET(SUIT_INCLUDE ${SALOME_GUI_INCLUDE})
+  MESSAGE(STATUS "SUIT_INCLUDE: ${SALOME_GUI_INCLUDE}")
+ELSE(HAVE_SALOME) 
+  SET(SUIT_DIR $ENV{SUIT_DIR})
+  IF(EXISTS ${SUIT_DIR})
 
     MESSAGE(STATUS "SUIT found at ${SUIT_DIR}")
     IF(WIN32)
@@ -20,5 +24,5 @@ IF(EXISTS ${SUIT_DIR})
     ElSE()
         SET(SUIT_INCLUDE ${SUIT_DIR}/include/salome)
     ENDIF()
-
-ENDIF(EXISTS ${SUIT_DIR})
+  ENDIF(EXISTS ${SUIT_DIR})
+ENDIF(HAVE_SALOME)
index 9abfef07afcd890ddb6ac7b86018aff433fcc6b2..04860f1b268922735592c971499a04d39de8ea5c 100644 (file)
@@ -1,10 +1,10 @@
 
 IF(WIN32)
-    FILE(TO_CMAKE_PATH $ENV{LIBXML_DIR}/lib/libxml2.lib LIBXML2_LIBRARIES)
-       FILE(TO_CMAKE_PATH $ENV{LIBXML_DIR}/include LIBXML2_INCLUDE_DIR)
+    FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.lib LIBXML2_LIBRARIES)
+       FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include LIBXML2_INCLUDE_DIR)
 ELSE()
-    FILE(TO_CMAKE_PATH $ENV{LIBXML_DIR}/lib/libxml2.so LIBXML2_LIBRARIES)
-       FILE(TO_CMAKE_PATH $ENV{LIBXML_DIR}/include/libxml2 LIBXML2_INCLUDE_DIR)
+    FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.so LIBXML2_LIBRARIES)
+       FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include/libxml2 LIBXML2_INCLUDE_DIR)
 ENDIF()
 
 FIND_PACKAGE(LibXml2 REQUIRED)
index ae2ee1eb047f5ee9d857cf28a9589be4fd994bcb..8a6134b220d433f68b7509cb91ba8ef350a24136 100644 (file)
@@ -11,10 +11,8 @@ INCLUDE(FindPython)
 INCLUDE(FindSalome)
 INCLUDE(FindSolveSpace)
 INCLUDE(FindCAS)
+INCLUDE(FindSUIT)
 
-IF(NOT ${HAVE_SALOME})
-       INCLUDE(FindSUIT)
-ENDIF(NOT ${HAVE_SALOME})
 
 IF(UNIX)
   IF(CMAKE_COMPILER_IS_GNUCC)
index 27f21f7db6d69767520f33267681e120a6061279..9ba180d69650a766ed3c632b3509333b988ed7e0 100755 (executable)
@@ -9,6 +9,9 @@ source ${SRC_DIR}/linux_env.sh
 mkdir -p ${ROOT_DIR}/build
 cd ${ROOT_DIR}/build
 
+export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
+export LightAppConfig=${ROOT_DIR}/install/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
+
 CMAKE_ARGS="-D_ECLIPSE_VERSION=4.3"
 CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Debug"
 CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=ON"
@@ -19,5 +22,4 @@ CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
 
 cmake -G "Eclipse CDT4 - Unix Makefiles" ${CMAKE_ARGS}
 
-#/misc/dn48/newgeom/common/eclipse-4.3.0/eclipse&
-/misc/dn48/newgeom/common/eclipse-4.4.0/eclipse&
\ No newline at end of file
+/misc/dn48/newgeom/common/eclipse-4.4.0/eclipse&
diff --git a/eclipse_salome.sh b/eclipse_salome.sh
deleted file mode 100755 (executable)
index 103982b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-source salome_env.sh
-
-mkdir -p ${ROOT_DIR}/build
-cd ${ROOT_DIR}/build
-
-CMAKE_ARGS="-D_ECLIPSE_VERSION=4.3"
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Debug"
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=ON"
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/install"
-CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
-
-
-cmake -G "Eclipse CDT4 - Unix Makefiles" ${CMAKE_ARGS}
-
-/misc/dn48/newgeom/common/eclipse-4.3.0/eclipse -Dosgi.locking=none &
index 684c8ddfe3528891404a5503d4c0288cf3a321f3..f6bdf5dcecbfab0e09bbe355b1dd50e154061db9 100644 (file)
@@ -1,99 +1,38 @@
-#------ Setting products installation directory ------
+#!/bin/sh
 
-if [ "${PDIR}" = "" ] ; then
-    export PDIR=/dn48/newgeom/common/SALOME-7.4.0
+if [ "${INST_ROOT}" = "" ] ; then
+    source /dn48/newgeom/common/SALOME/env_products.sh
+else
+    source ${INST_ROOT}/env_products.sh
 fi
 
-# Find absolute path to ROOT_DIR
-export ROOT_DIR=$(pwd)/..
-export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
+if [ "${NEWGEOM_PDIR}" = "" ] ; then
+    export NEWGEOM_PDIR=/dn48/newgeom/common/products
+fi
+
+if [ "${ROOT_DIR}" = "" ] ; then
+  export ROOT_DIR=$(pwd)/..
+  export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
+fi
 
-#------ Python ------
-export PYTHONHOME=${PDIR}/Python-2.7.3
-export PYTHON_INCLUDE=${PYTHONHOME}/include/python2.7
-export PYTHON_VERSION=2.7
-export PATH=${PYTHONHOME}/bin:${PATH}
-export LD_LIBRARY_PATH=${PYTHONHOME}/lib:${LD_LIBRARY_PATH}
-export PYTHONPATH=${PYTHONHOME}/lib/python2.7
-##
-#------ Qt ------
-export QT4_ROOT_DIR=${PDIR}/qt-4.8.4
-export QT_PLUGIN_PATH=${QT4_ROOT_DIR}/plugins
-export PATH=${QT4_ROOT_DIR}/bin:${PATH}
-export LD_LIBRARY_PATH=${QT4_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
-##
-#------ boost ------
-export BOOST_ROOT_DIR=${PDIR}/boost-1.52.0
-export LD_LIBRARY_PATH=${BOOST_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
-##
-#------ swig ------
-export SWIG_ROOT_DIR=${PDIR}/swig-2.0.8
-export SWIG_LIB=${SWIG_ROOT_DIR}/share/swig/2.0.8
-export PATH=${SWIG_ROOT_DIR}/bin:${PATH}
-##
-#------ cmake ------
-export CMAKE_ROOT_DIR=${PDIR}/cmake-2.8.10.2
-export PATH=${CMAKE_ROOT_DIR}/bin:${PATH}
-##
-#------ freetype ------
-export FREETYPE_ROOT_DIR=${PDIR}/freetype-2.4.11
-export LD_LIBRARY_PATH=${FREETYPE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
-##
-#------ freeimage ------
-export FREEIMAGE_ROOT_DIR=${PDIR}/freeimage-3.16.0
-export LD_LIBRARY_PATH=${FREEIMAGE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
-##
-#------ gl2ps ------
-export GL2PS_ROOT_DIR=${PDIR}/gl2ps-1.3.8
-export PATH=${GL2PS_ROOT_DIR}/bin:${PATH}
-export LD_LIBRARY_PATH=${GL2PS_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
-##
-#------ tbb ------
-export TBB_ROOT_DIR=${PDIR}/tbb-30_018oss
-export PATH=${TBB_ROOT_DIR}/bin/intel64/cc4.1.0_libc2.4_kernel2.6.16.21:${PATH}
-export LD_LIBRARY_PATH=${TBB_ROOT_DIR}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21:${LD_LIBRARY_PATH}
-##
-#------ libxml2 ------
-export LIBXML_DIR=${PDIR}/libxml2-2.9.0
-export PATH=${LIBXML_DIR}/bin:${PATH}
-export LD_LIBRARY_PATH=${LIBXML_DIR}/lib:${LD_LIBRARY_PATH}
-##
 #------ SolveSpace ------
-export SOLVESPACE_ROOT_DIR=${PDIR}/solvespace-2.0
+export SOLVESPACE_ROOT_DIR=${NEWGEOM_PDIR}/solvespace-2.0
 export LD_LIBRARY_PATH=${SOLVESPACE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
 ##
-#------ OCCT ------
-export CAS_ROOT_DIR=${PDIR}/OCCT-6.7.1
 
 #------ lcov ------
-export LCOV_ROOT_DIR=${PDIR}/lcov-1.11
+export LCOV_ROOT_DIR=${NEWGEOM_PDIR}/lcov-1.11
 export PATH=${LCOV_ROOT_DIR}/bin:${PATH}
+##
 
-#------ SUIT ------
-export SUIT_DIR=${PDIR}/GUI_7.4.0
-export PATH=${SUIT_DIR}/bin/salome:${PATH}
-export LD_LIBRARY_PATH=${SUIT_DIR}/lib/salome:${LD_LIBRARY_PATH}
-
-# CAS_ROOT_DIR has to be in the PATH for CMake's FindCAS procedures
-export PATH=${CAS_ROOT_DIR}:${CAS_ROOT_DIR}/bin:${PATH}
-export LD_LIBRARY_PATH=${CAS_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
-export CSF_GraphicShr=${CAS_ROOT_DIR}/lib/libTKOpenGl.so
-# Variable for Foundation Classes :
-export CSF_UnitsLexicon=${CAS_ROOT_DIR}/src/UnitsAPI/Lexi_Expr.dat
-export CSF_UnitsDefinition=${CAS_ROOT_DIR}/src/UnitsAPI/Units.dat
-# Variable for DataExchange :
-export CSF_SHMessage=${CAS_ROOT_DIR}/src/SHMessage
-export CSF_XSMessage=${CAS_ROOT_DIR}/src/XSMessage
-# Variable for Font :
-export CSF_MDTVFontDirectory=${CAS_ROOT_DIR}/src/FontMFT
-export CSF_MDTVTexturesDirectory=${CAS_ROOT_DIR}/src/Textures
+#------ OCCT ------
 # Defaults
 export CSF_PluginDefaults=${CAS_ROOT_DIR}/src/StdResource
 export CSF_StandardDefaults=${CAS_ROOT_DIR}/src/StdResource
-# Activation of OCCT Kernel multithreading :
-export MMGT_REENTRANT=1
 # For CMake
 export LIB=${LD_LIBRARY_PATH}
+export PATH=${CASROOT}:${PATH}
+##
 
 #------ NewGEOM ------
 export NEW_GEOM_ROOT_DIR=${ROOT_DIR}/install
@@ -102,4 +41,3 @@ export PYTHONPATH=${NEW_GEOM_ROOT_DIR}/swig:${PYTHONPATH}
 export LD_LIBRARY_PATH=${NEW_GEOM_ROOT_DIR}/bin:${NEW_GEOM_ROOT_DIR}/swig:${NEW_GEOM_ROOT_DIR}/plugins:${LD_LIBRARY_PATH}
 export NEW_GEOM_CONFIG_FILE=${NEW_GEOM_ROOT_DIR}/plugins
 export NewGeomResources=${NEW_GEOM_ROOT_DIR}/resources
-
index a684f5e8bb948f3bfaf27a92f25b6f82c34eb1db..fd95eec285a538e75f5617ef4b89b038abfe5b91 100644 (file)
@@ -105,9 +105,9 @@ set PATH=%CMAKEDIR%\bin;%PATH%
 
 @REM -------------------------
 @REM LIBXML2
-@SET LIBXML_DIR=%PDIR%\libxml2-2.9.0
-@SET PATH=%LIBXML_DIR%\lib;%PATH%
-@SET PATH=%LIBXML_DIR%\bin;%PATH%
+@SET LIBXML2_ROOT_DIR=%PDIR%\libxml2-2.9.0
+@SET PATH=%LIBXML2_ROOT_DIR%\lib;%PATH%
+@SET PATH=%LIBXML2_ROOT_DIR%\bin;%PATH%
 @REM -------------------------
 
 @REM -------------------------
diff --git a/salome_env.sh b/salome_env.sh
deleted file mode 100644 (file)
index fc7a504..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-if [ "${INST_ROOT}" = "" ] ; then
-    source /dn48/newgeom/common/SALOME/env_products.sh
-else
-    source ${INST_ROOT}/env_products.sh
-fi
-
-
-#------ SolveSpace ------
-export SOLVESPACE_ROOT_DIR=/dn48/newgeom/common/products/solvespace-2.0
-export LD_LIBRARY_PATH=${SOLVESPACE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
-##
-
-export ROOT_DIR=$(pwd)/..
-export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
-
-SRC_DIR=${ROOT_DIR}/sources
-
-export LIB=${LD_LIBRARY_PATH}
-export PATH=${CASROOT}:${PATH}
-export PYTHON_INC_DIR=${PYTHON_INCLUDE}
-export PYTHON_LIB_DIR=${PYTHON_ROOT_DIR}/lib
-
-
-#------ NewGEOM ------
-export INST_DIR=${ROOT_DIR}/install
-export PATH=${INST_DIR}/bin:${INST_DIR}/plugins:${PATH}
-export LD_LIBRARY_PATH=${INST_DIR}/bin:${INST_DIR}/swig:${INST_DIR}/plugins:${PATH}${LD_LIBRARY_PATH}
-export NEW_GEOM_CONFIG_FILE=${INST_DIR}/plugins
index e4dc6bd9527f5165eb18f7a981026990c7ac6393..5ef39f4abd64642495e48aeb6b3f9b67ed30985c 100755 (executable)
@@ -1,12 +1,12 @@
 #!/bin/sh
 
 export ROOT_DIR=$(pwd)/..
+export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
 
-source ${ROOT_DIR}/sources/salome_env.sh
+source ${ROOT_DIR}/sources/linux_env.sh
 
 # Correcting path which defined with error
 export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
-
 export LightAppConfig=${ROOT_DIR}/install/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
 
-SUITApp LightApp -style salome --modules=NewGeom --uselicense --noexcepthandling
\ No newline at end of file
+SUITApp LightApp --modules=NewGeom
\ No newline at end of file
index 21f535939912f97eed84ff8d4fde925df3ee18e1..0a53b920c9cfdd8f05b22cdc1a53087dd0796450 100644 (file)
@@ -153,8 +153,7 @@ class Model_Document : public ModelAPI_Document
                                         const int theResultIndex = 0);
 
   //! returns the label of result by index; creates this label if it was not created before
-  TDF_Label Model_Document::resultLabel(
-    const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theResultIndex);
+  TDF_Label resultLabel(const boost::shared_ptr<ModelAPI_Data>& theFeatureData, const int theResultIndex);
 
   //! Updates the results list of the feature basing on the current data tree
   void updateResults(FeaturePtr theFeature);
index 0d3f69a12def9f15d90ccd91c1be6d92b3905995..81fae93d0a9776fdfc6188f7fc911eee78b329d9 100644 (file)
@@ -53,6 +53,8 @@ void XGUI_Preferences::updateCustomProps()
 
 void XGUI_Preferences::loadCustomProps()
 {
+  if(!myResourceMgr)
+    return;
   QStringList aSections = myResourceMgr->sections();
   foreach (QString aSection, aSections)
   {