From e799d25371d00dc0b530f9bc29ccf4b724c51744 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 9 Mar 2021 11:08:19 +0100 Subject: [PATCH] URANIE/Openturns/ROOT windows --- applications/SALOME-master-windows.pyconf | 2 +- products/compil_scripts/URANIE.bat | 66 +++++++++++++++++ products/compil_scripts/openturns.bat | 65 +++++++++++++++++ products/env_scripts/URANIE.py | 88 ++++++++--------------- products/root.pyconf | 12 +++- 5 files changed, 174 insertions(+), 59 deletions(-) create mode 100644 products/compil_scripts/URANIE.bat create mode 100644 products/compil_scripts/openturns.bat diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index a9a6a60..52acc17 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -97,7 +97,7 @@ APPLICATION : qt : '5.9.1' qwt : '6.1.2' requests : '2.22.0' - root: '6.22.02' + root: '6.22.06' ruby : '2.5.5-1' scipy : '1.4.1' setuptools : '41.0.1' diff --git a/products/compil_scripts/URANIE.bat b/products/compil_scripts/URANIE.bat new file mode 100644 index 0000000..e819807 --- /dev/null +++ b/products/compil_scripts/URANIE.bat @@ -0,0 +1,66 @@ +@echo off + +echo ########################################################################## +echo URANIE %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +SET PRODUCT_BUILD_TYPE=Release +REM TODO: NGH: not Tested yet +if %SAT_DEBUG% == 1 ( + set PRODUCT_BUILD_TYPE=Debug +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +SET CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DWITH-OPT++:BOOL=ON +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DWITH-JSONCPP:BOOL=ON +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -D--enable-doc:BOOL=ON +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64" + +cd %BUILD_DIR% +echo. +echo -------------------------------------------------------------------------- +echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +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% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +echo -------------------------------------------------------------------------- + +msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild ALL_BUILD.vcxproj + exit 2 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +echo -------------------------------------------------------------------------- + +msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild INSTALL.vcxproj + exit 3 +) + +taskkill /F /IM "mspdbsrv.exe" + +echo. +echo ########## END diff --git a/products/compil_scripts/openturns.bat b/products/compil_scripts/openturns.bat new file mode 100644 index 0000000..b229e3b --- /dev/null +++ b/products/compil_scripts/openturns.bat @@ -0,0 +1,65 @@ +@echo off + +echo ########################################################################## +echo ROOT %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 +) +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=-DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE% +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_EXECUTABLE=%PYTHON_ROOT_DIR:\=/%/python.exe +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64" + +cd %BUILD_DIR% + +echo. +echo -------------------------------------------------------------------------- +echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +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% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +echo -------------------------------------------------------------------------- + +msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild ALL_BUILD.vcxproj + exit 2 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +echo -------------------------------------------------------------------------- + +msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64 +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild INSTALL.vcxproj + exit 3 +) + +taskkill /F /IM "mspdbsrv.exe" + +echo. +echo ########## END diff --git a/products/env_scripts/URANIE.py b/products/env_scripts/URANIE.py index fb8dae1..cc1a141 100644 --- a/products/env_scripts/URANIE.py +++ b/products/env_scripts/URANIE.py @@ -4,67 +4,41 @@ import os.path, platform def set_env(env, prereq_dir, version, forBuild=None): - version = '.'.join(version.replace('-', '.').split('.')[:2]) - env.set('URANIE_VERSION', version) - - if platform.system()=="Windows" : - # URANIE - uranie_root = os.path.join(prereq_dir, 'uranie-3.9.0') - env.set('URANIE_ROOT_DIR', uranie_root) - env.set('URANIESYS', uranie_root) - env.prepend('PATH', os.path.join(uranie_root, 'bin')) - env.prepend('PATH', os.path.join(uranie_root, 'lib')) - - # ROOT - root_dir = os.path.join(prereq_dir, 'root5.34.14') - env.set('ROOT_ROOT_DIR', root_dir) - env.set('ROOTSYS', root_dir) - env.set('ROOTSYSLIB', os.path.join(root_dir, 'lib')) - env.prepend('PATH', os.path.join(root_dir, 'bin')) - - env.prepend('PATH', os.path.join(prereq_dir, 'zlib-1.2.5', 'bin')) - env.prepend('PATH', os.path.join(prereq_dir, 'libxml2-2.7.8.win32', 'bin')) - env.prepend('PATH', os.path.join(prereq_dir, 'libxml2-2.7.8.win32', 'lib')) - env.prepend('PATH', os.path.join(prereq_dir, 'iconv-1.9.2.win32', 'bin')) - env.prepend('PATH', os.path.join(prereq_dir, 'libxslt-1.1.26.win32', 'bin')) - env.prepend('PATH', os.path.join(prereq_dir, 'fftw-3.3.3-dll32')) - env.prepend('PATH', os.path.join(prereq_dir, 'nlopt-2.4.2-dll32')) - env.prepend('PATH', os.path.join(prereq_dir, 'pcl-1.10-modified', 'debug')) - env.prepend('PATH', os.path.join(prereq_dir, 'optpp-2.4', 'lib')) - env.prepend('PATH', os.path.join(prereq_dir, 'pthread-win32', 'Pre-built.2', 'dll', 'x86')) - else : - env.set('URANIE_ROOT_DIR', prereq_dir) - uranie = env.get('URANIE_ROOT_DIR') + version = '.'.join(version.replace('-', '.').split('.')[:2]) + env.set('URANIE_VERSION', version) - ### - # FORMAT URANIE - - # URANIE PATH - env.set('URANIESYS', prereq_dir) + if platform.system()=="Windows" : + pass + else : + env.set('URANIE_ROOT_DIR', prereq_dir) + uranie = env.get('URANIE_ROOT_DIR') + + # URANIE PATH + env.set('URANIESYS', prereq_dir) + + # PYTHON PATH + env.prepend('PYTHONPATH', os.path.join(uranie, 'lib', 'python')) - # PYTHON PATH - env.prepend('PYTHONPATH', os.path.join(uranie, 'lib', 'python')) - - # LD LIBRARY PATH - env.prepend('LD_LIBRARY_PATH', os.path.join(uranie, 'lib')) + # LD LIBRARY PATH + env.prepend('LD_LIBRARY_PATH', os.path.join(uranie, 'lib')) - # ROOT PATH - root_env = env.get('ROOT_ROOT_DIR') - env.set('ROOTSYS', root_env) + # ROOT PATH + root_env = env.get('ROOT_ROOT_DIR') + env.set('ROOTSYS', root_env) - root_lib_env = os.path.join(root_env,'lib','root') - if os.path.isdir(root_lib_env): - env.prepend('ROOTSYSLIB', root_lib_env) - else: - env.prepend('ROOTSYSLIB', os.path.join(root_env,'lib')) - - # PATH - env.prepend('PATH', os.path.join(uranie,'bin')) - env.prepend('PATH', os.path.join(root_env,'bin')) + root_lib_env = os.path.join(root_env,'lib','root') + if os.path.isdir(root_lib_env): + env.prepend('ROOTSYSLIB', root_lib_env) + else: + env.prepend('ROOTSYSLIB', os.path.join(root_env,'lib')) - # OPT - opt_env = os.path.join(uranie, 'OPT++','optpp-2.4','lib') - env.prepend('LD_LIBRARY_PATH', opt_env) + # PATH + env.prepend('PATH', os.path.join(uranie,'bin')) + env.prepend('PATH', os.path.join(root_env,'bin')) + + # OPT + opt_env = os.path.join(uranie, 'OPT++','optpp-2.4','lib') + env.prepend('LD_LIBRARY_PATH', opt_env) def set_nativ_env(env): - pass + pass diff --git a/products/root.pyconf b/products/root.pyconf index ecdb45c..a7398e1 100644 --- a/products/root.pyconf +++ b/products/root.pyconf @@ -27,4 +27,14 @@ version_6_16_00_win: archive_info : {archive_name : "root_v6.16.00-windows.tar.gz"} build_source : "script" compil_script : "root.bat" -} \ No newline at end of file +} + +version_6_22_06: +{} + +version_6_22_06_win: +{ + archive_info : {archive_name : "root_v6.22.06.win32.vc16.tar.gz"} + build_source : "script" + compil_script : "root.bat" +} -- 2.39.2