From f476c37fec9530e1bab9eeef5ee1c63652f519be Mon Sep 17 00:00:00 2001 From: asozinov Date: Fri, 9 Aug 2024 15:15:45 +0100 Subject: [PATCH] glTF support Add rapidjson to SALOME for support glTF export CAS compilation with rapidjson support --- applications/SALOME-master-native.pyconf | 3 +- applications/SALOME-master-windows.pyconf | 7 ++-- products/CAS.pyconf | 6 ++-- products/compil_scripts/CAS_7.8.bat | 2 ++ products/compil_scripts/rapidjson.bat | 26 +++++++++++++++ products/compil_scripts/rapidjson.sh | 40 +++++++++++++++++++++++ 6 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 products/compil_scripts/rapidjson.bat create mode 100644 products/compil_scripts/rapidjson.sh diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index f514ddf..7ed073a 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -125,6 +125,7 @@ APPLICATION : pytz : 'native' qt : 'native' qwt : 'native' + rapidjson : '1.1.0' requests : 'native' rkCommon : '1.5.1' rich : '13.7.1' @@ -154,7 +155,7 @@ APPLICATION : # SALOME MODULES : 'CONFIGURATION' 'SALOME' - 'SHAPER' + 'SHAPER' : 'asozinov/40648' 'SHAPERSTUDY' 'RESTRICTED' 'LIBBATCH' : 'V2_5_0' diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 24aca7e..7cff783 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -134,6 +134,7 @@ APPLICATION : pytz : '2020.1' qt : '5.15.2' qwt : '6.1.6' + rapidjson : '1.1.0' requests : '2.22.0' rich : '13.7.1' rkCommon : '1.5.1' @@ -166,7 +167,7 @@ APPLICATION : # SALOME MODULES : 'CONFIGURATION' 'SALOME' - 'SHAPER' + 'SHAPER' : 'asozinov/40648' 'SHAPERSTUDY' 'RESTRICTED' 'LIBBATCH' : 'V2_5_0' @@ -205,8 +206,8 @@ APPLICATION : 'OPENTURNS_SALOME' 'YDEFX' 'pmml' - #'TESTBASE' - 'CEATESTBASE' : 'SalomeV9' + 'TESTBASE' + #'CEATESTBASE' : 'SalomeV9' } profile : { diff --git a/products/CAS.pyconf b/products/CAS.pyconf index cc533fb..89d6a5f 100755 --- a/products/CAS.pyconf +++ b/products/CAS.pyconf @@ -41,7 +41,7 @@ version_CR780_SALOME_PATCH : { name : "CAS" build_source : "cmake" - cmake_options : "-DUSE_TCL=OFF -DBUILD_MODULE_Draw=OFF -DUSE_FREETYPE=ON -D3RDPARTY_FREETYPE_DIR=$FREETYPEDIR -DUSE_FREEIMAGE=ON -D3RDPARTY_FREEIMAGE_DIR=$FREEIMAGEDIR -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" + cmake_options : "-DUSE_TCL=OFF -DBUILD_MODULE_Draw=OFF -DUSE_FREETYPE=ON -D3RDPARTY_FREETYPE_DIR=$FREETYPEDIR -DUSE_FREEIMAGE=ON -D3RDPARTY_FREEIMAGE_DIR=$FREEIMAGEDIR -DUSE_RAPIDJSON=ON -D3RDPARTY_RAPIDJSON_DIR=$RAPIDJSONDIR -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" get_source : "git" git_info: { @@ -61,7 +61,7 @@ version_CR780_SALOME_PATCH : CSF_PluginDefaults : $install_dir + $VARS.sep + "share" + $VARS.sep + "opencascade" + $VARS.sep + "resources" + $VARS.sep + "StdResource" env_script : $name + ".py" } - depend : ['freetype', 'freeimage'] + depend : ['freetype', 'freeimage', 'rapidjson'] build_depend : ["cmake", "doxygen"] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name @@ -115,7 +115,7 @@ version_CR780_SALOME_PATCH_win : env_script : $name + ".py" } - depend : ['freetype', 'freeimage'] + depend : ['freetype', 'freeimage', 'rapidjson'] build_depend : ["cmake", "doxygen"] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name diff --git a/products/compil_scripts/CAS_7.8.bat b/products/compil_scripts/CAS_7.8.bat index e649d6a..0799274 100644 --- a/products/compil_scripts/CAS_7.8.bat +++ b/products/compil_scripts/CAS_7.8.bat @@ -40,6 +40,8 @@ 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 RAPIDJSON +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_RAPIDJSON:BOOL=ON -D3RDPARTY_RAPIDJSON_DIR:STRING=%RAPIDJSONDIR:\=/% REM no GL2PS set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DUSE_GL2PS:BOOL=OFF diff --git a/products/compil_scripts/rapidjson.bat b/products/compil_scripts/rapidjson.bat new file mode 100644 index 0000000..ae8367e --- /dev/null +++ b/products/compil_scripts/rapidjson.bat @@ -0,0 +1,26 @@ +@echo off + +echo ########################################################################## +echo RapidJSON %VERSION% +echo ########################################################################## + +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +cd %SOURCE_DIR% + +xcopy bin %PRODUCT_INSTALL%\bin /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy bin + exit 1 +) + +xcopy include %PRODUCT_INSTALL%\include /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy include + exit 2 +) + +echo. +echo ########## END diff --git a/products/compil_scripts/rapidjson.sh b/products/compil_scripts/rapidjson.sh new file mode 100644 index 0000000..8f8d44a --- /dev/null +++ b/products/compil_scripts/rapidjson.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +echo "###############################################" +echo "rapidjson" $VERSION +echo "###############################################" + +cp -r $SOURCE_DIR/* . + + + +echo +echo "*** configure" +./configure --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on configure" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" + -- 2.39.2