From: raphael Date: Mon, 8 Feb 2021 17:19:11 +0000 (+0100) Subject: Add shaper standalone executable without CORBA X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fcsgroup_IS2_lot7b;p=modules%2Fshaper.git Add shaper standalone executable without CORBA --- diff --git a/src/Config/CMakeLists.txt b/src/Config/CMakeLists.txt index 0f427639d..29bcadc46 100644 --- a/src/Config/CMakeLists.txt +++ b/src/Config/CMakeLists.txt @@ -17,6 +17,9 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# additional include directories +INCLUDE_DIRECTORIES(${QT_INCLUDES}) + INCLUDE(Common) INCLUDE(UnitTest) INCLUDE(XMLProcessing) @@ -24,7 +27,8 @@ FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Events - ${PYTHON_INCLUDE_DIR}) + ${PYTHON_INCLUDE_DIR} + ${SALOME_GUI_INCLUDE}) SET(PROJECT_HEADERS Config_def.h diff --git a/src/Config/Config_XMLReader.cpp b/src/Config/Config_XMLReader.cpp index 8cba8cd4d..a2cd71328 100644 --- a/src/Config/Config_XMLReader.cpp +++ b/src/Config/Config_XMLReader.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -168,7 +169,8 @@ void Config_XMLReader::readAll() } // to load external modules dependencies (like GEOM for Connector Feature) - Config_ModuleReader::loadScript("salome.shaper.initConfig", false); + if(SUIT_Session::session()->executableAppName() == SUIT_Session::session()->salomeAppName()) + Config_ModuleReader::loadScript("salome.shaper.initConfig", false); for(int aSolution = 0; true; aSolution++) { std::string aFoundFile = findConfigFile(myRootFileName, aSolution); diff --git a/src/SHAPERGUI/CMakeLists.txt b/src/SHAPERGUI/CMakeLists.txt index a3f1c93ee..23d3b7995 100644 --- a/src/SHAPERGUI/CMakeLists.txt +++ b/src/SHAPERGUI/CMakeLists.txt @@ -59,7 +59,9 @@ SET(PROJECT_SOURCES SET(PROJECT_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml + ${CMAKE_CURRENT_BINARY_DIR}/LightShaperApp.xml resources/SalomeApp.xml + resources/ShaperApp.xml resources/shaper.png ) @@ -132,6 +134,12 @@ CONFIGURE_FILE( "${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml" ) +CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/resources/LightShaperApp.xml.in" + "${CMAKE_CURRENT_BINARY_DIR}/LightShaperApp.xml" + ) + + INSTALL(TARGETS SHAPER DESTINATION ${SHAPER_INSTALL_BIN}) INSTALL(FILES ${PROJECT_RESOURCES} DESTINATION ${SHAPER_INSTALL_RESOURCES}) INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES}) diff --git a/src/SHAPERGUI/SHAPERGUI.cpp b/src/SHAPERGUI/SHAPERGUI.cpp index f92d89f69..073083597 100644 --- a/src/SHAPERGUI/SHAPERGUI.cpp +++ b/src/SHAPERGUI/SHAPERGUI.cpp @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -1278,6 +1279,8 @@ void SHAPERGUI::resetToolbars() void SHAPERGUI::publishToStudy() { - if (isActiveModule() && ModelAPI_Session::get()->hasModuleDocument()) + if ( (SUIT_Session::session()->executableAppName() == SUIT_Session::session()->salomeAppName()) + // publish on salome executable mode + && isActiveModule() && ModelAPI_Session::get()->hasModuleDocument()) myWorkshop->module()->launchOperation("PublishToStudy", false); } diff --git a/src/SHAPERGUI/resources/LightShaperApp.xml.in b/src/SHAPERGUI/resources/LightShaperApp.xml.in new file mode 100644 index 000000000..c8570e220 --- /dev/null +++ b/src/SHAPERGUI/resources/LightShaperApp.xml.in @@ -0,0 +1,49 @@ + +
+ + +
+
+ + + + + +
+
+ + +
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
diff --git a/src/SHAPERGUI/resources/ShaperApp.xml b/src/SHAPERGUI/resources/ShaperApp.xml new file mode 100644 index 000000000..f306516c7 --- /dev/null +++ b/src/SHAPERGUI/resources/ShaperApp.xml @@ -0,0 +1,3 @@ + + +