]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
add GMSH+GMSHPLUGIN windows
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 1 Dec 2021 09:56:43 +0000 (10:56 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 1 Dec 2021 09:56:43 +0000 (10:56 +0100)
applications/SALOME-9.8.0-windows.pyconf
products/compil_scripts/gmsh-4.8.4.bat [new file with mode: 0644]
products/gmsh.pyconf
products/patches/GMSHPlugin_Mesher-ctx.patch
products/patches/gmsh-4.8.4-windows.patch [new file with mode: 0644]

index 4c60a6846208de3b61e6dc0e17f69d9d9b7be9d9..8a9d0fdf2a4d6c14e353d5470d63599ec7706be9 100644 (file)
@@ -55,7 +55,7 @@ APPLICATION :
         f2c : '1.0.0'
         freeimage : '3.18.0'
         freetype : '2.9.1'
-        #gmsh : '4.1.4'
+        gmsh : '4.8.4'
         graphviz : '2.44.1'
         hdf5 : '1.10.3'
         idna : '2.8'
@@ -143,7 +143,7 @@ APPLICATION :
         'GHS3DPLUGIN'
         'HYBRIDPLUGIN'
         'HexoticPLUGIN'
-        #'GMSHPLUGIN'
+        'GMSHPLUGIN'
         'HEXABLOCK'
         'HEXABLOCKPLUGIN'
         #'HOMARD'
diff --git a/products/compil_scripts/gmsh-4.8.4.bat b/products/compil_scripts/gmsh-4.8.4.bat
new file mode 100644 (file)
index 0000000..c27db8e
--- /dev/null
@@ -0,0 +1,115 @@
+@echo off
+
+echo ##########################################################################
+echo gmsh %VERSION%
+echo ##########################################################################
+
+
+if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
+if NOT exist "%PRODUCT_INSTALL%\include" mkdir %PRODUCT_INSTALL%\include
+if NOT exist "%PRODUCT_INSTALL%\bin" mkdir %PRODUCT_INSTALL%\bin
+
+REM clean BUILD directory
+if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
+mkdir %BUILD_DIR%
+
+cd %BUILD_DIR%
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=Release
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_BUILD_LIB=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_BUILD_SHARED=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_BUILD_DYNAMIC=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_ACIS=OFF 
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_FLTK=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_ONELAB_METAMODEL=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_PARSER=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_PETSC=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_PRIVATE_API=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_CGNS=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_HXT=OFF 
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_SOLVER=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_GMM=ON
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_TESTS=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_PLUGINS=OFF
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017 Win64"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DENABLE_BLAS_LAPACK=OFF
+set MSBUILDDISABLENODEREUSE=1
+
+echo.
+echo *********************************************************************
+echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS%
+echo *********************************************************************
+echo.
+
+%CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+if NOT %ERRORLEVEL% == 0 (
+    echo "ERROR on cmake"
+    exit 1
+)
+
+echo.
+echo *********************************************************************
+echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 ALL_BUILD.vcxproj
+echo *********************************************************************
+echo.
+
+msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 ALL_BUILD.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild gmsh.vcxproj
+    exit 2
+)
+
+echo.
+echo *********************************************************************
+echo *** installation...
+echo *********************************************************************
+echo.
+
+msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 INSTALL.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild INSTALL.vcxproj
+    exit 3
+)
+
+echo.
+echo *********************************************************************
+echo *** installation Headers...
+echo *********************************************************************
+echo.
+msbuild  /p:Configuration=Release /p:Platform=x64  /p:BuildProjectReferences=false get_headers.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild get_headers.vcxproj
+    exit 4
+)
+
+copy /Y /B %BUILD_DIR%\Release\gmsh.lib %PRODUCT_INSTALL%\bin\gmsh.lib
+copy /Y /B %BUILD_DIR%\Release\gmsh.exp %PRODUCT_INSTALL%\bin\gmsh.exp
+
+SETLOCAL ENABLEDELAYEDEXPANSION
+FOR %%f IN (gmsh.h gmsh.h_cwrap gmshc.h) do (
+   set X=%%f
+   copy /Y %SOURCE_DIR%\api\%%f %PRODUCT_INSTALL%\include\%X%
+)
+ENDLOCAL
+
+cd %BUILD_DIR%\Headers\gmsh
+SETLOCAL ENABLEDELAYEDEXPANSION
+FOR %%f IN (*.h) do (
+   set X=%%f
+   copy /Y %SOURCE_DIR%\api\%%f %PRODUCT_INSTALL%\include\%X%
+)
+ENDLOCAL
+
+cd %PRODUCT_INSTALL%\include\gmsh
+SETLOCAL ENABLEDELAYEDEXPANSION
+FOR %%f IN (*.h) do (
+   set X=%%f
+   copy /Y %PRODUCT_INSTALL%\include\gmsh\%%f %PRODUCT_INSTALL%\include\%X%
+)
+ENDLOCAL
+
+REM these two files need to be moved to bin, adding bin directory to PATH does not help.
+cp %PRODUCT_INSTALL%\lib\gmsh.py %PRODUCT_INSTALL%\bin\gmsh.py
+cp %PRODUCT_INSTALL%\lib\gmsh.dll %PRODUCT_INSTALL%\bin\gmsh.dll
+echo.
+echo ########## END
index 54f30fdbe40aae3b9c889d87be3f45a29e145939..2f81ed66800680782d689a82195cbc02ec98c959 100644 (file)
@@ -18,11 +18,12 @@ default :
     {
       incremental : "yes"
     }
+    patches: []
 } 
 
 default_win:
 {
-    depend : ["CAS"]
+    depend : ["CAS", "pthreads"]
 }
 
 version_4_8_4:
@@ -30,6 +31,12 @@ version_4_8_4:
   compil_script : "gmsh-4.8.4.sh"
 }
 
+version_4_8_4_win:
+{
+  compil_script : "gmsh-4.8.4.bat"
+  patches: ['gmsh-4.8.4-windows.patch']
+}
+
 version_4_1_4:
 {
 }
index 017c0f066f112338d549108681dc4cf6b2cb2ec2..814b2fea86bb81e18359e0b53a9af6841ab56923 100644 (file)
@@ -1,13 +1,15 @@
---- GMSHPLUGIN_ref/src/GMSHPlugin/GMSHPlugin_Mesher.cxx        2020-12-29 09:19:07.932776533 +0100
-+++ GMSHPLUGIN/src/GMSHPlugin/GMSHPlugin_Mesher.cxx    2020-12-29 09:17:14.885840621 +0100
-@@ -938,7 +938,10 @@ void  GMSHPlugin_Mesher::mymsg::operator
+diff --git a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx
+index 8ac85b5..3a5c1ad 100644
+--- a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx
++++ b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx
+@@ -1028,8 +1028,10 @@ void  GMSHPlugin_Mesher::mymsg::operator()(std::string level, std::string msg)
      }
      if (level == "Fatal")
      {
 +#ifndef WIN32
          CTX::instance()->lock = 0;
-+#endif
-+
          throw oss.str();
++#endif
      }
      else
+         printf("%s\n", oss.str().c_str());
diff --git a/products/patches/gmsh-4.8.4-windows.patch b/products/patches/gmsh-4.8.4-windows.patch
new file mode 100644 (file)
index 0000000..ecc81c9
--- /dev/null
@@ -0,0 +1,11 @@
+diff -Naur gmsh_ref/CMakeLists.txt gmsh_new/CMakeLists.txt
+--- gmsh_ref/CMakeLists.txt    2021-04-28 09:09:29.000000000 +0200
++++ gmsh_new/CMakeLists.txt    2021-12-01 00:25:02.000000000 +0100
+@@ -1357,7 +1357,6 @@
+     endif()
+     if(WIN32)
+       list(APPEND EXTERNAL_LIBRARIES "winspool")
+-      add_definitions(-DOCC_CONVERT_SIGNALS)
+     elseif(MSVC)
+       add_definitions(-DWNT)
+     endif()