From a3467d7480b6a3470903ef45495b1d51ffdfb53c Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Thu, 13 Jun 2024 14:41:54 +0200 Subject: [PATCH] spns #41595: move to Qt 5.15 [Windows] + Fix sip 5.5.0 installation issue if embedded sip [FD32] + Embed Qt 5.15 [UB20.04] --- applications/SALOME-master-native.pyconf | 4 + applications/SALOME-master-windows.pyconf | 4 +- products/compil_scripts/qwt-6.1.6.bat | 101 ++++++++++++++++++++++ products/compil_scripts/sip-5.5.0.sh | 58 +++++++------ products/qwt.pyconf | 9 ++ products/salome_system.pyconf | 9 +- 6 files changed, 156 insertions(+), 29 deletions(-) create mode 100644 products/compil_scripts/qwt-6.1.6.bat diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 989b310..c0300f2 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -221,6 +221,10 @@ __overwrite__ : 'APPLICATION.products.opencv' : '3.2.0' 'APPLICATION.products.cminpack' : 'native' 'APPLICATION.products.netcdf' : '4.6.2' + 'APPLICATION.products.qt' : '5.15.2' + 'APPLICATION.products.qwt' : '6.1.6' + 'APPLICATION.products.PyQt' : '5.15.3' + 'APPLICATION.products.sip' : '5.5.0' 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_no_pip' } 'APPLICATION.products.scipy' : {tag: '1.5.2', base: 'no', section: 'version_1_5_2_no_pip' } # scipy >= 1.4 - system one too old 'APPLICATION.products.mdurl' : {tag: '0.1.2', base: 'no', section: 'version_0_1_2_no_pip' } diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 12ed282..eab2b27 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -125,8 +125,8 @@ APPLICATION : pyreadline : '3.4.1' Python : '3.9.14' pytz : '2020.1' - qt : '5.12.10' - qwt : '6.1.2' + qt : '5.15.2' + qwt : '6.1.6' requests : '2.22.0' rich : '13.7.1' rkCommon : '1.5.1' diff --git a/products/compil_scripts/qwt-6.1.6.bat b/products/compil_scripts/qwt-6.1.6.bat new file mode 100644 index 0000000..ada27e3 --- /dev/null +++ b/products/compil_scripts/qwt-6.1.6.bat @@ -0,0 +1,101 @@ +@echo off + +echo ########################################################################## +echo qwt %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% + +if exist "%BUILD_DIR%" rmdir /Q /S "%BUILD_DIR%" +mkdir %BUILD_DIR% + +cd %SOURCE_DIR% +xcopy * %BUILD_DIR% /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy + exit 1 +) +cd %BUILD_DIR% + +echo. +echo -------------------------------------------------------------------------- +echo *** prepare qmake +echo -------------------------------------------------------------------------- +echo. + +rem # Remplacement des antislashs par des slashs +set str=%PRODUCT_INSTALL% +set str=%str:\=/% + +call :GETTEMPNAME +attrib -R qwtconfig.pri +sed "s|\(QWT_INSTALL_PREFIX[[:space:]]*\)=\([[:space:]]*\)\(.*\)|\1=\2%str%|g" < qwtconfig.pri > %tmpfile% +move /y %tmpfile% qwtconfig.pri + +cd designer +call :GETTEMPNAME +attrib -R designer.pro +sed "s|\(target\.path[[:space:]]*\)=\([[:space:]]*\).*|\1=\2\$\$QWT_INSTALL_PREFIX/plugins/designer|g" < designer.pro > %tmpfile% +move /y %tmpfile% designer.pro +cd .. + +REM remove debug build only if release build is requested +if %SAT_DEBUG% == 0 ( + call :GETTEMPNAME + attrib -R qwtbuild.pri + sed "s|\(CONFIG[[:space:]]*+=[[:space:]]*debug_and_release\)|#\1|g" < qwtbuild.pri > %tmpfile% + move /y %tmpfile% qwtbuild.pri + sed "s|\(CONFIG[[:space:]]*+=[[:space:]]*build_all\)|#\1|g" < qwtbuild.pri > %tmpfile% + move /y %tmpfile% qwtbuild.pri +) + +echo. +echo -------------------------------------------------------------------------- +echo *** qmake +echo -------------------------------------------------------------------------- +echo. + +qmake +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on qmake : %ERRORLEVEL% + exit 1 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** nmake +echo -------------------------------------------------------------------------- +echo. + +nmake +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on nmake + exit 2 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** nmake install +echo -------------------------------------------------------------------------- +echo. + +nmake install +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on nmake install + exit 3 +) + +echo. +echo ########## END + +:: ========== FUNCTIONS ========== +exit /B + +:GETTEMPNAME + set tmpfile=%TMP%\mytempfile-%RANDOM%.tmp + if exist "%tmpfile%" GOTO :GETTEMPNAME + exit /B diff --git a/products/compil_scripts/sip-5.5.0.sh b/products/compil_scripts/sip-5.5.0.sh index 3460a80..9c658f1 100755 --- a/products/compil_scripts/sip-5.5.0.sh +++ b/products/compil_scripts/sip-5.5.0.sh @@ -55,20 +55,24 @@ else echo "ERROR on install" exit 3 fi - # ensure that lib is used - if [ -d "$PRODUCT_INSTALL/lib64" ]; then - echo "WARNING: renaming lib64 directory to lib" - mv $PRODUCT_INSTALL/lib64 $PRODUCT_INSTALL/lib - elif [ -d "$PRODUCT_INSTALL/local/lib64" ]; then - echo "WARNING: renaming local/lib64 directory to lib" - mv $PRODUCT_INSTALL/local/lib64 $PRODUCT_INSTALL/lib - rm -rf $PRODUCT_INSTALL/local - elif [ -d $PRODUCT_INSTALL/lib ]; then - : - else - echo "WARNING: unhandled case! Please ensure that script is consistent!" - fi fi + +mkdir -p $PRODUCT_INSTALL/lib/python$PYTHON_VERSION +# ensure that lib is used +if [ -d "$PRODUCT_INSTALL/lib64" ]; then + echo "WARNING: renaming lib64 directory to lib" + mv $PRODUCT_INSTALL/lib64/* $PRODUCT_INSTALL/lib/ + rm -rf $PRODUCT_INSTALL/lib64 +elif [ -d "$PRODUCT_INSTALL/local/lib64" ]; then + echo "WARNING: renaming local/lib64 directory to lib" + mv $PRODUCT_INSTALL/local/lib64/* $PRODUCT_INSTALL/lib + rm -rf $PRODUCT_INSTALL/local +elif [ -d $PRODUCT_INSTALL/lib ]; then + : +else + echo "WARNING: unhandled case! Please ensure that script is consistent!" +fi + cd $BUILD_DIR cp -R $SOURCE_DIR/PyQt5_sip-12.8.1 $BUILD_DIR/PyQt5_sip-12.8.1 cd $BUILD_DIR/PyQt5_sip-12.8.1 @@ -100,19 +104,21 @@ else echo "ERROR on install" exit 3 fi - # ensure that lib is used - if [ -d "$PRODUCT_INSTALL/lib64" ]; then - echo "WARNING: renaming lib64 directory to lib" - mv $PRODUCT_INSTALL/lib64 $PRODUCT_INSTALL/lib - elif [ -d "$PRODUCT_INSTALL/local/lib64" ]; then - echo "WARNING: renaming local/lib64 directory to lib" - mv $PRODUCT_INSTALL/local/lib64 $PRODUCT_INSTALL/lib - rm -rf $PRODUCT_INSTALL/local - elif [ -d $PRODUCT_INSTALL/lib ]; then - : - else - echo "WARNING: unhandled case! Please ensure that script is consistent!" - fi +fi + +# ensure that lib is used +if [ -d "$PRODUCT_INSTALL/lib64" ]; then + echo "WARNING: renaming lib64 directory to lib" + cp -r $PRODUCT_INSTALL/lib64/* $PRODUCT_INSTALL/lib + rm -rf $PRODUCT_INSTALL/lib64 +elif [ -d "$PRODUCT_INSTALL/local/lib64" ]; then + echo "WARNING: renaming local/lib64 directory to lib" + mv $PRODUCT_INSTALL/local/lib64/* $PRODUCT_INSTALL/lib + rm -rf $PRODUCT_INSTALL/local +elif [ -d $PRODUCT_INSTALL/lib ]; then + : +else + echo "WARNING: unhandled case! Please ensure that script is consistent!" fi mkdir $PRODUCT_INSTALL/include diff --git a/products/qwt.pyconf b/products/qwt.pyconf index 0bebc18..0ae4e56 100644 --- a/products/qwt.pyconf +++ b/products/qwt.pyconf @@ -75,6 +75,15 @@ version_6_1_6 : } } +version_6_1_6_win : +{ + compil_script : "qwt-6.1.6.bat" + archive_info: + { + archive_name : "qwt-6.1.6.tar.gz" + } +} + version_5_2_1 : { archive_info: diff --git a/products/salome_system.pyconf b/products/salome_system.pyconf index 2d589d5..1085c15 100644 --- a/products/salome_system.pyconf +++ b/products/salome_system.pyconf @@ -144,7 +144,14 @@ default : "libxml++2.6-2v5", "python3-netcdf4"] apt_dev : ["libtbb-dev", "cython3", "libfftw3-dev", "libopenblas-dev", "qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools", "libopenmpi-dev", - "libpng-dev", "libtiff5-dev", "libgeotiff-dev", "libjpeg-dev", "libgif-dev", "libgeos-dev", "libsqlite3-dev", "libgdal-dev", "dvipng", "libxml++2.6-dev"] + "libpng-dev", "libtiff5-dev", "libgeotiff-dev", "libjpeg-dev", "libgif-dev", "libgeos-dev", "libsqlite3-dev", "libgdal-dev", "dvipng", "libxml++2.6-dev", + "libxcb1-dev", "libxcb-composite0-dev", "libxcb-cursor-dev", "libxcb-damage0-dev", "libxcb-dpms0-dev", + "libxcb-dri2-0-dev", "libxcb-dri3-dev", "libxcb-glx0-dev", "libxcb-screensaver0-dev", "libxcb-util0-dev", + "libxcb-present-dev", "libxcb-randr0-dev", "libxcb-record0-dev", "libxcb-render0-dev", "libxcb-res0-dev", + "libxcb-shape0-dev", "libxcb-shm0-dev", "libxcb-sync-dev", "libxcb-xf86dri0-dev", "libxcb-xfixes0-dev", + "libxcb-xinerama0-dev", "libxcb-xinput-dev", "libxcb-xkb-dev", "libxcb-xtest0-dev", "libxcb-xv0-dev", "libxcb-xvmc0-dev", + "libxcb-imdkit-dev", "libxcb-image0-dev", "libxcb-keysyms1-dev", "libxcb-render-util0-dev", "libxcb-ewmh-dev", + "libxcb-icccm4-dev", "libxcb-xrm-dev"] } "UB22.04" : { -- 2.39.2