From afaa6698c8999357e4305854fbc8cc73e08d6706 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Mon, 8 May 2023 20:03:43 +0200 Subject: [PATCH] spns #33005: move to URANIE 4.7 --- products/URANIE.pyconf | 20 ++++++ products/compil_scripts/URANIE-4.5.0.sh | 46 ++++++++++++++ products/compil_scripts/URANIE-4.7.0.bat | 77 ++++++++++++++++++++++++ products/compil_scripts/URANIE-4.7.0.sh | 46 ++++++++++++++ 4 files changed, 189 insertions(+) create mode 100755 products/compil_scripts/URANIE-4.5.0.sh create mode 100644 products/compil_scripts/URANIE-4.7.0.bat create mode 100755 products/compil_scripts/URANIE-4.7.0.sh diff --git a/products/URANIE.pyconf b/products/URANIE.pyconf index d9fbb8d..1991215 100644 --- a/products/URANIE.pyconf +++ b/products/URANIE.pyconf @@ -20,13 +20,33 @@ default : } } +version_4_7_0 : +{ + compil_script : "URANIE-4.7.0.sh" + archive_info : + { + archive_name : "URANIE-4.7.0-Source.tar.gz" + } + #patches: ['URANIE-4.5.0.patch'] +} + +version_4_7_0_win : +{ + compil_script : "URANIE-4.7.0.bat" + depend : ['Python', 'root','nlopt', 'boost', 'pthreads'] + build_depend : ["cmake", 'swig', 'cppunit'] +# patches: ['URANIE-4.5.0.patch', 'URANIE-FindROOT.cmake.patch'] +} + version_4_5_0 : { + compil_script : "URANIE-4.5.0.sh" patches: ['URANIE-4.5.0.patch'] } version_4_5_0_win : { + compil_script : "URANIE-4.5.0.bat" depend : ['Python', 'root','nlopt', 'boost', 'pthreads'] build_depend : ["cmake", 'swig', 'cppunit'] patches: ['URANIE-4.5.0.patch', 'URANIE-FindROOT.cmake.patch'] diff --git a/products/compil_scripts/URANIE-4.5.0.sh b/products/compil_scripts/URANIE-4.5.0.sh new file mode 100755 index 0000000..bbf720d --- /dev/null +++ b/products/compil_scripts/URANIE-4.5.0.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +echo "##########################################################################" +echo "URANIE " $VERSION +echo "##########################################################################" + +CMAKE_OPTIONS="" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" +CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" +CMAKE_OPTIONS+=" -DWITH-OPT++:BOOL=ON" +CMAKE_OPTIONS+=" -DWITH-JSONCPP:BOOL=ON" +CMAKE_OPTIONS+=" -D--enable-doc:BOOL=ON" + +rm -rf $BUILD_DIR +mkdir -p $BUILD_DIR +cd $BUILD_DIR + +echo "*** cmake $CMAKE_OPTIONS $SOURCE_DIR" +cmake $CMAKE_OPTIONS $SOURCE_DIR + +if [ $? -ne 0 ] +then + echo "ERROR on CMake" + exit 2 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 3 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 4 +fi + +echo +echo "########## END" diff --git a/products/compil_scripts/URANIE-4.7.0.bat b/products/compil_scripts/URANIE-4.7.0.bat new file mode 100644 index 0000000..b7709db --- /dev/null +++ b/products/compil_scripts/URANIE-4.7.0.bat @@ -0,0 +1,77 @@ +@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 +) + +set PLATFORM_TARGET=Win32 + +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=%CMAKE_GENERATOR% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -D--enable-WIN32-DEBUG=OFF +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_ROOT_DIR=%PTHREAD_ROOT_DIR:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_INCLUDE_DIR=%PTHREAD_ROOT_DIR:\=/%/include +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_DLL_LIBRARY=%PTHREAD_ROOT_DIR:\=/%/lib/pthreadVC2.dll +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPTHREAD_LIBRARY=%PTHREAD_ROOT_DIR:\=/%/lib/pthreadVCE2.lib + + +SET INCLUDE= + +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=%PLATFORM_TARGET% +echo -------------------------------------------------------------------------- + +msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% +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=%PLATFORM_TARGET% +echo -------------------------------------------------------------------------- + +msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% +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/URANIE-4.7.0.sh b/products/compil_scripts/URANIE-4.7.0.sh new file mode 100755 index 0000000..bbf720d --- /dev/null +++ b/products/compil_scripts/URANIE-4.7.0.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +echo "##########################################################################" +echo "URANIE " $VERSION +echo "##########################################################################" + +CMAKE_OPTIONS="" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" +CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" +CMAKE_OPTIONS+=" -DWITH-OPT++:BOOL=ON" +CMAKE_OPTIONS+=" -DWITH-JSONCPP:BOOL=ON" +CMAKE_OPTIONS+=" -D--enable-doc:BOOL=ON" + +rm -rf $BUILD_DIR +mkdir -p $BUILD_DIR +cd $BUILD_DIR + +echo "*** cmake $CMAKE_OPTIONS $SOURCE_DIR" +cmake $CMAKE_OPTIONS $SOURCE_DIR + +if [ $? -ne 0 ] +then + echo "ERROR on CMake" + exit 2 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 3 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 4 +fi + +echo +echo "########## END" -- 2.39.2