]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
added CAS section and compile script for Windows jfa/Porting_OCCT_780
authormbs <martin.bernhard@opencascade.com>
Thu, 28 Mar 2024 20:03:35 +0000 (20:03 +0000)
committermbs <martin.bernhard@opencascade.com>
Thu, 28 Mar 2024 20:03:35 +0000 (20:03 +0000)
products/CAS.pyconf
products/compil_scripts/CAS_7.8.bat [new file with mode: 0644]

index db79cf9d97254754697f6c32efba4fcb3d9aeab8..817021c0276b0bc2056f2c43f016a232b867a588 100755 (executable)
@@ -37,6 +37,59 @@ default :
     }
 }
 
+version_CR780_SALOME_PATCH_win :
+{
+    name : "CAS"
+    build_source : "script"
+    compil_script :  "CAS_7.8.bat"
+    get_source : "git"
+    git_info:
+    {
+        repo : "http://git.dev.opencascade.org/repos/occt.git"
+        repo_dev : $repo
+    }
+    environ :
+    {
+        CSF_OCCTBinPath          : $install_dir + $VARS.sep + "win64" + $VARS.sep + "vc14" + $VARS.sep + "bin"
+        CSF_OCCTLibPath          : $install_dir + $VARS.sep + "win64" + $VARS.sep + "vc14" + $VARS.sep + "lib"
+        CSF_OCCTIncludePath      : $install_dir + $VARS.sep + "inc"
+        CSF_OCCTResourcePath     : $install_dir + $VARS.sep + "src"
+        CSF_OCCTDataPath         : $install_dir + $VARS.sep + "data"
+        CSF_OCCTSamplesPath      : $install_dir + $VARS.sep + "samples"
+        CSF_OCCTTestsPath        : $install_dir + $VARS.sep + "tests"
+        CSF_OCCTDocPath          : $install_dir + $VARS.sep + "doc"
+        CSF_SHMessage            : $install_dir + $VARS.sep + "src" + $VARS.sep + "SHMessage"
+        CSF_MDTVTexturesDirectory: $install_dir + $VARS.sep + "src" + $VARS.sep + "Textures"
+        CSF_ShadersDirectory     : $install_dir + $VARS.sep + "src" + $VARS.sep + "Shaders"
+        CSF_XSMessage            : $install_dir + $VARS.sep + "src" + $VARS.sep + "XSMessage"
+        CSF_TObjMessage          : $install_dir + $VARS.sep + "src" + $VARS.sep + "TObj"
+        CSF_StandardDefaults     : $install_dir + $VARS.sep + "src" + $VARS.sep + "StdResource"
+        CSF_PluginDefaults       : $install_dir + $VARS.sep + "src" + $VARS.sep + "StdResource"
+        CSF_XCAFDefaults         : $install_dir + $VARS.sep + "src" + $VARS.sep + "StdResource"
+        CSF_TObjDefaults         : $install_dir + $VARS.sep + "src" + $VARS.sep + "StdResource"
+        CSF_StandardLiteDefaults : $install_dir + $VARS.sep + "src" + $VARS.sep + "StdResource"
+        CSF_IGESDefaults         : $install_dir + $VARS.sep + "src" + $VARS.sep + "XSTEPResource"
+        CSF_STEPDefaults         : $install_dir + $VARS.sep + "src" + $VARS.sep + "XSTEPResource"
+        CSF_XmlOcafResource      : $install_dir + $VARS.sep + "src" + $VARS.sep + "XmlOcafResource"
+        CSF_MIGRATION_TYPES      : $install_dir + $VARS.sep + "src" + $VARS.sep + "StdResource" + $VARS.sep + "MigrationSheet.txt"
+        CSF_UnitsDefinition      : $install_dir + $VARS.sep + "src" + $VARS.sep + "UnitsAPI" + $VARS.sep + "Units.dat"
+
+        MMGT_CLEAR     : "1"
+        MMGT_REENTRANT : "1"
+        CSF_LANGUAGE   : "us"
+
+        env_script : $name + ".py"
+    }
+    depend : ['freetype', 'freeimage']
+    build_depend : ["cmake", "doxygen"]
+    source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name
+    build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name
+    properties:
+    {
+      incremental : "no"
+    }
+}
+
 version_CR753_SALOME_PATCH :
 {
     name : "CAS"
diff --git a/products/compil_scripts/CAS_7.8.bat b/products/compil_scripts/CAS_7.8.bat
new file mode 100644 (file)
index 0000000..8c64911
--- /dev/null
@@ -0,0 +1,115 @@
+@echo off
+
+echo ##########################################################################
+echo CAS %VERSION%
+echo ##########################################################################
+
+IF NOT DEFINED SAT_DEBUG (
+  SET SAT_DEBUG=0
+)
+
+SET PRODUCT_BUILD_TYPE=Release
+if %SAT_DEBUG% == 1 (
+  set PRODUCT_BUILD_TYPE=Debug
+)
+
+setlocal EnableExtensions
+
+echo ** PRODUCT_INSTALL = %PRODUCT_INSTALL% 
+if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
+
+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_GENERATOR:STRING="Visual Studio 15 2017 Win64"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE%
+
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
+
+REM TBB
+REM set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_TBB:BOOL=ON -D3RDPARTY_TBB_DIR:STRING=%TBB_DIR:\=/%
+REM FREETYPE
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_FREETYPE:BOOL=ON -D3RDPARTY_FREETYPE_DIR:STRING=%FREETYPEDIR:\=/%
+REM FREEIMAGE
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_FREEIMAGE:BOOL=ON -D3RDPARTY_FREEIMAGE_DIR:STRING=%FREEIMAGEDIR:\=/%
+
+REM no GL2PS
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_GL2PS:BOOL=OFF
+
+REM no TCL/TK
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_TCL=OFF -DBUILD_MODULE_Draw=OFF
+
+REM bos #26509
+REM set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON
+
+set MSBUILDDISABLENODEREUSE=1
+
+echo.
+echo *********************************************************************
+echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS%
+echo *********************************************************************
+echo.
+
+echo %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+%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=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj
+echo *********************************************************************
+echo.
+
+echo msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj
+msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 ALL_BUILD.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild ALL_BUILD.vcxproj
+    exit 2
+)
+
+echo.
+echo *********************************************************************
+echo *** installation...
+echo *********************************************************************
+echo.
+
+echo ** PRODUCT_INSTALL = %PRODUCT_INSTALL% 
+if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
+
+echo msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj
+msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 INSTALL.vcxproj
+if NOT %ERRORLEVEL% == 0 (
+    echo ERROR on msbuild INSTALL.vcxproj
+    exit 3
+)
+
+echo.
+echo *********************************************************************
+echo *** installation (data)...
+echo *********************************************************************
+echo.
+
+echo robocopy %SOURCE_DIR%\data %PRODUCT_INSTALL%\data /E /NP /NFL /NDL /NS /NC
+robocopy %SOURCE_DIR%\data %PRODUCT_INSTALL%\data /E /NP /NFL /NDL /NS /NC
+rem if NOT %ERRORLEVEL% == 1 (
+rem     echo ERROR when copying %SOURCE_DIR%\data
+rem     exit 1
+rem )
+
+echo taskkill /F /IM "mspdbsrv.exe"
+taskkill /F /IM "mspdbsrv.exe"
+
+
+if %SAT_DEBUG% == 1 (
+    xcopy %PRODUCT_INSTALL%\win64\vc14\bind %PRODUCT_INSTALL%\win64\vc14\bin  /E /I /Q
+    xcopy %PRODUCT_INSTALL%\win64\vc14\libd %PRODUCT_INSTALL%\win64\vc14\lib  /E /I /Q
+)
+
+echo.
+echo ########## END