Salome HOME
spns #40729: MeshGems 2024.1 - windows
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 25 Mar 2024 09:47:01 +0000 (10:47 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 25 Mar 2024 13:33:09 +0000 (14:33 +0100)
products/MeshGems.pyconf
products/compil_scripts/MeshGems-2024.bat [new file with mode: 0644]
products/env_scripts/MeshGems.py

index 432e50184f504948b3c873d7603778b2649f1759..abd595c840bb7f8d4683e58ee33ca35c9a348623 100644 (file)
@@ -45,6 +45,19 @@ version_2024_1 :
     }
 }
 
+version_2024_1_win :
+{
+    archive_info : {archive_name : "MeshGems-2024.1.0.0_windows.tar.gz"}
+    compil_script :  "MeshGems-2024-1.bat"
+    properties :
+    {
+      is_distene : "no"
+      licence : "libSalomeMeshGemsKeyGenerator"
+      incremental : "yes"
+      single_install_dir : "yes" # aimed to solve sat #18914
+    }
+}
+
 version_2_15_1 :
 {
     properties :
diff --git a/products/compil_scripts/MeshGems-2024.bat b/products/compil_scripts/MeshGems-2024.bat
new file mode 100644 (file)
index 0000000..755a94a
--- /dev/null
@@ -0,0 +1,58 @@
+@echo off
+
+echo ##########################################################################
+echo MeshGems %VERSION%
+echo ##########################################################################
+
+if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
+if NOT exist "%PRODUCT_INSTALL%\bin" mkdir %PRODUCT_INSTALL%\bin
+if NOT exist "%PRODUCT_INSTALL%\lib" mkdir %PRODUCT_INSTALL%\lib
+if NOT exist "%PRODUCT_INSTALL%\include" mkdir %PRODUCT_INSTALL%\include
+if NOT exist "%PRODUCT_INSTALL%\Docs" mkdir %PRODUCT_INSTALL%\Docs
+
+REM clean BUILD directory
+if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
+mkdir %BUILD_DIR%
+
+cd %SOURCE_DIR%
+
+set SRC_FOLDER=Win10_64_VC17
+cd Products
+
+echo PRODUCT_INSTALL = %PRODUCT_INSTALL%
+
+REM
+xcopy include\* %PRODUCT_INSTALL%\include /E /I /Q /Y
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on copying include
+    exit 1
+)
+
+echo SRC_FOLDER = %SRC_FOLDER%
+echo. 
+echo running command: xcopy lib\%SRC_FOLDER%\* %PRODUCT_INSTALL%\lib /E /I /Q /Y
+xcopy lib\%SRC_FOLDER%\* %PRODUCT_INSTALL%\lib /E /I /Q /Y
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on copying lib
+    exit 2
+)
+
+REM
+echo. 
+echo running command: bin\%SRC_FOLDER%\* %PRODUCT_INSTALL%\bin /E /I /Q /Y
+xcopy bin\%SRC_FOLDER%\* %PRODUCT_INSTALL%\bin /E /I /Q /Y
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on copying bin
+    exit 3
+)
+
+REM
+echo.
+xcopy Docs\* %PRODUCT_INSTALL%\Docs /E /I /Q /Y
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on copying Docs
+    exit 4
+)
+
+echo.
+echo ########## END
index 6f55b69dc01ecb99d88ffcb12daebf51f47de60b..55d8fe6c41dc4d1a49333edf079242d4e183dfd8 100644 (file)
@@ -69,11 +69,13 @@ def set_env(env, prereq_dir, version):
       # we don't need licence keys at compile time
       set_distene_licence(env)
   set_env_build(env, prereq_dir, version)
-  try:
-    M,m,p=map(str, version.replace('-','.').split('.'))
-  except:
-    M,m=map(str, version.replace('-','.').split('.'))
-    p="0"
+  #
+  Mmp = list(map(str, version.replace('-','.').split('.')))
+  M,m=Mmp[0:2]
+  if len(Mmp) > 2:
+    p=Mmp[2]
+  else:
+    p='0'
   env.set('MESHGEMS_VERSION', version)
   env.set('MESHGEMS_VERSION_MAJOR',M)
   env.set('MESHGEMS_VERSION_MINOR',m)