From e6c92161f6518b54675eafe334db8c0b766ff346 Mon Sep 17 00:00:00 2001 From: asozinov Date: Fri, 9 Feb 2024 14:46:04 +0000 Subject: [PATCH] add DXF plugin --- applications/SALOME-DXF.pyconf | 214 ++++++++++++++++++++++++++++++++ products/DXF.pyconf | 21 ++++ products/compil_scripts/DXF.bat | 21 ++++ products/compil_scripts/DXF.sh | 29 +++++ products/env_scripts/DXF.py | 16 +++ 5 files changed, 301 insertions(+) create mode 100644 applications/SALOME-DXF.pyconf create mode 100644 products/DXF.pyconf create mode 100644 products/compil_scripts/DXF.bat create mode 100644 products/compil_scripts/DXF.sh create mode 100644 products/env_scripts/DXF.py diff --git a/applications/SALOME-DXF.pyconf b/applications/SALOME-DXF.pyconf new file mode 100644 index 0000000..4d4a0fe --- /dev/null +++ b/applications/SALOME-DXF.pyconf @@ -0,0 +1,214 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +APPLICATION : +{ + name : 'SALOME-DXF' + workdir : $LOCAL.workdir + $VARS.sep + $APPLICATION.name + cmake_generator : 'Visual Studio 15 2017 Win64' + tag : 'V9_11_0' + dev : 'no' + verbose : 'no' + debug : 'no' + base : 'no' + python3 : 'yes' + environ : + { + build : + { + CONFIGURATION_ROOT_DIR : $workdir + $VARS.sep + "SOURCES" + $VARS.sep + "CONFIGURATION" + RESTRICTED_ROOT_DIR : $workdir + $VARS.sep + "SOURCES" + $VARS.sep + "RESTRICTED" + SALOME_HAS_GLOBAL_ENV : "1" + SALOME_USE_64BIT_IDS : '1' + SET_usr_docs_VARS : "1" # required for PyEditor build + CMAKE_GENERATOR : '"Visual Studio 15 2017 Win64"' + } + launch : + { + PYTHONIOENCODING:"UTF_8", + SALOME_MODULES_ORDER:"SHAPER:SHAPERSTUDY:GEOM:SMESH", + SALOME_ON_DEMAND: "HIDE" + } + SALOME_trace : "local" # local/file:.../with_logger + SALOME_MODULES : "SHAPER,SHAPERSTUDY,GEOM,SMESH,PARAVIS,YACS,JOBMANAGER" # specify the first modules to display in gui + SALOME_TMP_DIR : "%appdata%" + HOME : "%userprofile%" + } + products : + { + # PREREQUISITES : + alabaster : '0.7.6' + Babel : '2.7.0' + boost : '1.67.0' + CAS : {tag : 'eefcafca', section: 'version_CR753_SALOME_PATCH_win', base: 'no'} + certifi : '2019.6.16' + cgns : '4.2.0' + chardet : '3.0.4' + click : '7.0' + cmake : '3.24.2' + colorama: '0.4.1' + cppunit : '1.13.2' + cycler : '0.10.0' + Cython : '0.29.12' + dateutil : '2.8.0' + dill : '0.3.4' + docutils : '0.14' + doxygen : '1.8.3.1' + DXF : '7.5.0' + eigen : '3.3.4' + embree : '3.12.2' + expat : '2.0.1' + f2c : '1.0.0' + freeimage : '3.18.0' + freetype : '2.9.1' + gmsh : '4.10.3' + graphviz : '2.44.1' + hdf5 : '1.10.3' + idna : '2.8' + imagesize : '1.1.0' + ispc : '1.15.0' + Jinja2 : '2.10.1' + kiwisolver : '1.1.0' + lapack : '3.8.0' + libjpeg: '9c' + libpng: '1.5.10' + libxml2 : '2.9.1' + llvm : '8.0.1-clang-win' + markupsafe : '1.1.1' + matplotlib : '3.1.0' + medfile : '4.1.1' + mesa : '19.2.3' + MeshGems : '2.15-1' + metis : '5.1.0' + msvc : '2017' + netgen : '5.3.1_with_CAS_7.2' + # comment out line above and uncomment the line below to use Netgen 6. + #netgen : '6.2.2101' + nlopt : '2.5.0' + numpy : '1.16.4' + omniORB : '4.2.3' + omniORBpy : '4.2.3' + opencv : '3.2.0' + openVKL: '0.11.0' + openturns: '1.19' + ospray : '2.4.0' + packaging : '19.0' + ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0'} + perl : '5.28.1.1' + Pillow : '7.1.1' + planegcs : '0.18-3cb6890' + psutil : '5.7.2' + pthreads : '2.9.1' + Pygments : '2.4.2' + pyparsing : '2.4.0' + PyQt : '5.15.3' + pyreadline : '2.1' + Python : '3.6.5' + pytz : '2019.1' + qt : '5.12.10' + qwt : '6.1.2' + requests : '2.22.0' + rkCommon : '1.5.1' + ruby : '2.5.5-1' + scipy : '1.4.1' + setuptools : '41.0.1' + sip : '5.5.0' + six : '1.12.0' + snowballstemmer : '1.9.0' + Sphinx : '2.1.2' + sphinxcontrib_applehelp : '1.0.1' + sphinxcontrib_devhelp : '1.0.1' + sphinxcontrib_jsmath : '1.0.1' + sphinxcontrib_htmlhelp : '1.0.2' + sphinxcontrib_qthelp : '1.0.2' + sphinxcontrib_serializinghtml :'1.1.3' + sphinxcontrib_websupport : '1.1.2' + sphinx_rtd_theme : '0.4.3' + sphinxintl: '2.0.0' + StaticMeshPlugin: '5.11.0' + swig : '3.0.12' + tbb : '2019_U8_win' + toml : '0.10.2' + tcltk : '8.6.9' + urllib3 : '1.25.3' + zlib : '1.2.5' + + # SALOME MODULES : + 'CONFIGURATION' + 'SALOME' + 'SHAPER' : {tag :'dxf'} + 'SHAPERSTUDY' + 'RESTRICTED' + 'LIBBATCH' : {tag :'V2_4_6'} + 'KERNEL' + 'MEDCOUPLING' + 'GUI' + 'GEOM' + 'SMESH' + 'NETGENPLUGIN' + 'BLSURFPLUGIN' + 'GHS3DPLUGIN' + 'HYBRIDPLUGIN' + 'HexoticPLUGIN' + 'GMSHPLUGIN' + 'HEXABLOCK' + 'HEXABLOCKPLUGIN' + #'HOMARD' + 'FIELDS' + 'PARAVIS' + 'JOBMANAGER' + 'YACS' + 'YACSGEN' + 'DOCUMENTATION' + 'SAMPLES' + 'COMPONENT' + 'PYCALCULATOR' + 'CALCULATOR' + 'HELLO' + 'PYHELLO' + 'EFICAS' + 'EFICAS_TOOLS' + 'ADAO' + 'PARAVISADDONS' + 'pmml' + 'TESTBASE' + #'CEATESTBASE' : 'SalomeV9' + } + profile : + { + launcher_name : "salome" + } + test_base : + { + name : "SALOME" + tag : "SalomeV9" + } + properties : + { + mesa_launcher_in_package : "no" + repo_dev : "yes" + pip : 'yes' + pip_install_dir : 'python' + single_install_dir : "yes" + } +} + +__overwrite__ : +[ + { + __condition__ : "APPLICATION.debug == 'yes'" + 'APPLICATION.rm_products' : ['matplotlib', 'openturns', 'scipy', 'Pillow'] + # TODO: cmake 3.24 screws things up by adding _d suffix to debug libraries to KERNEL + 'APPLICATION.products.cmake' : {tag: '3.12.1', base: 'no', section : 'version_3_12_1' } + 'APPLICATION.products.numpy' : {tag: '1.16.4', base: 'no', section : 'version_1_16_4_win_dbg' } + 'APPLICATION.products.Cython' : {tag: '0.29.12', base: 'no', section : 'version_0_29_12_win_dbg' } + 'APPLICATION.products.sphinxintl' : {tag: '2.0.0', base: 'no', section : 'version_2_0_0_win_dbg' } + 'APPLICATION.products.llvm' : {tag: '8.0.1', base: 'no', section : 'version_8_0_1_clang_win_dbg'} + 'APPLICATION.products.tbb' : {tag: '2019_U8', base: 'no', section : 'version_2019_U8_win_dbg' } + 'APPLICATION.products.omniORB' : {tag: '4.2.3', base: 'no', section : 'version_4_2_3_win_dbg' } + 'APPLICATION.products.psutil' : {tag: '5.7.2', base: 'no', section : 'version_5_7_2_win_dbg' } + 'APPLICATION.products.ParaView' : {tag: '5.11.0', base: 'no', section : 'version_5_11_0_win_dbg' } + 'APPLICATION.products.zlib' : {tag: '1.2.5', base: 'no', section : 'version_1_2_5_win_dbg' } + 'APPLICATION.products.gmsh' : {tag: '4.10.3', base: 'no', section : 'version_4_10_3_win_dbg' } + } +] diff --git a/products/DXF.pyconf b/products/DXF.pyconf new file mode 100644 index 0000000..909a02a --- /dev/null +++ b/products/DXF.pyconf @@ -0,0 +1,21 @@ +default : +{ + name : "DXF" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + environ : + { + env_script : $name + ".py" + } + depend : ["CAS"] + patches : [ ] + archive_info : {archive_name : "DXF.tar.gz"} + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : "base" + properties : + { + incremental : "yes" + } +} diff --git a/products/compil_scripts/DXF.bat b/products/compil_scripts/DXF.bat new file mode 100644 index 0000000..22c9f37 --- /dev/null +++ b/products/compil_scripts/DXF.bat @@ -0,0 +1,21 @@ +@echo off + +echo ########################################################################## +echo DXF +echo ########################################################################## + +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 %SOURCE_DIR% + +xcopy %SOURCE_DIR% %PRODUCT_INSTALL% /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy dxf + exit 1 +) + +echo. +echo ########## END diff --git a/products/compil_scripts/DXF.sh b/products/compil_scripts/DXF.sh new file mode 100644 index 0000000..9700668 --- /dev/null +++ b/products/compil_scripts/DXF.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +echo ########################################################################## +echo DXF +echo ########################################################################## + + +cd $SOURCE_DIR + +echo +echo "*** mkdir" $PRODUCT_INSTALL +mkdir -p $PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on mkdir" + exit 1 +fi + +echo +echo "*** cp -r * " $PRODUCT_INSTALL +cp -r $SOURCE_DIR $PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on cp" + exit 2 +fi + +echo +echo "########## END" diff --git a/products/env_scripts/DXF.py b/products/env_scripts/DXF.py new file mode 100644 index 0000000..2ec23ee --- /dev/null +++ b/products/env_scripts/DXF.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path +import platform + +def set_env(env, prereq_dir, version): + env.set('SAMHOME', prereq_dir) + env.set('DXF_ROOT_DIR', prereq_dir) + env.set('DXF_DIR', prereq_dir) + env.prepend('PYTHONPATH', env.get('DXFHOME')) + +def set_nativ_env(env): + env.set('DXF_ROOT_DIR', '/usr') # update for cmake + env.set('DXF_DIR', '/usr') + env.set('DXFHOME', '/usr') \ No newline at end of file -- 2.39.2