From f0abe2bcddfef5b4bb98b0688782fd3b388e296f Mon Sep 17 00:00:00 2001 From: Alexander Wenzel Date: Wed, 17 Jan 2024 13:38:38 +0100 Subject: [PATCH] Revert "Support Qt6 only. (#397)" (#409) This reverts commit 54b77708bb393762320833e1e4659a31df5fec7d. Signed-off-by: Alexander Wenzel --- build_config.bat | 30 ++++- ...C.bat => build_parser_windows_qt5_MSVC.bat | 0 build_qwt_windows_qt5_MSVC.bat | 125 ++++++++++++++++++ ...MSVC.bat => build_sdk_windows_qt5_MSVC.bat | 0 ...at => build_sdk_windows_qt5_MSVC_cmake.bat | 0 ...sdk_windows_qt5_MSVC_cmake_interactive.bat | 2 +- ...build_sdk_windows_qt5_MSVC_interactive.bat | 2 +- 7 files changed, 152 insertions(+), 7 deletions(-) rename build_parser_windows_MSVC.bat => build_parser_windows_qt5_MSVC.bat (100%) create mode 100644 build_qwt_windows_qt5_MSVC.bat rename build_sdk_windows_MSVC.bat => build_sdk_windows_qt5_MSVC.bat (100%) rename build_sdk_windows_MSVC_cmake.bat => build_sdk_windows_qt5_MSVC_cmake.bat (100%) rename build_sdk_windows_MSVC_cmake_interactive.bat => build_sdk_windows_qt5_MSVC_cmake_interactive.bat (60%) rename build_sdk_windows_MSVC_interactive.bat => build_sdk_windows_qt5_MSVC_interactive.bat (64%) diff --git a/build_config.bat b/build_config.bat index 4ac12cb3..3c803ac2 100644 --- a/build_config.bat +++ b/build_config.bat @@ -4,18 +4,32 @@ echo ************************************ echo *** Setting up environment *** +REM Currently supported combinations by Qt installation +REM 5.12.12 msvc2015,msvc2017 +REM 5.15.2 msvc2015,msvc2019 +REM 6.2.2 msvc2019 + if "%QTVER%"=="" ( -REM set QTVER=6.4.3 -REM set QTVER=6.5.3 -set QTVER=6.6.1 +REM set QTVER=5.12.12 + set QTVER=5.15.2 +REM set QTVER=6.4.1 +REM set QTVER=6.2.2 ) if "%MSVC_VER%"=="" ( +REM set MSVC_VER=2015 +REM set MSVC_VER=2017 set MSVC_VER=2019 ) -if "%MSVC_DIR%"=="" ( - set "MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio\%MSVC_VER%\BuildTools\VC\Auxiliary\Build" +if "%MSVC_VER%"=="2015" ( + if "%MSVC_DIR%"=="" set "MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC" +) else ( + if exist "C:\Program Files (x86)\Microsoft Visual Studio\%MSVC_VER%\Enterprise\VC\Auxiliary\Build" ( + if "%MSVC_DIR%"=="" set "MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio\%MSVC_VER%\Enterprise\VC\Auxiliary\Build" + ) else ( + if "%MSVC_DIR%"=="" set "MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio\%MSVC_VER%\BuildTools\VC\Auxiliary\Build" + ) ) echo Set QT directory for %QTVER% and %MSVC_VER% @@ -23,4 +37,10 @@ if "%QTDIR%"=="" ( set QTDIR=C:\Qt\%QTVER%\msvc%MSVC_VER%_64 ) +if "%QWT%"=="" ( + set QWT=6.1.4 +REM set QWT=6.1.6 +REM set QWT=6.2.0 +) + set PATH=%QTDIR%\bin;%MSVC_DIR%;%PATH% diff --git a/build_parser_windows_MSVC.bat b/build_parser_windows_qt5_MSVC.bat similarity index 100% rename from build_parser_windows_MSVC.bat rename to build_parser_windows_qt5_MSVC.bat diff --git a/build_qwt_windows_qt5_MSVC.bat b/build_qwt_windows_qt5_MSVC.bat new file mode 100644 index 00000000..27cfd45c --- /dev/null +++ b/build_qwt_windows_qt5_MSVC.bat @@ -0,0 +1,125 @@ +@echo off +cls + +REM Date Version Author Changes +REM 30.1.18 1.0 Gernot Wirschal First versioned file +REM 4.7.19 1.1 Alexander Wenzel Update to Qt 5.12.4, Qwt 6.1.4 and Visual Studio 2015 +REM 11.1.21 1.2 Alexander Wenzel Update to Qt 5.12.12, Visual Studio 2017 Build Tools and simplify + +echo ************************************ +echo *** Build QWT Library *** +echo ************************************ + +call build_config.bat + +set WORKINGDIR=%CD% + +if '%WORKSPACE%'=='' ( + IF "%QWT_DIR%"=="" ( + set QWT_DIR=C:\Qwt-%QWT%_%QTVER% + ) + + set SOURCE_DIR=%CD%\qwt-%QWT% +) else ( + if '%QWT_DIR%'=='' ( + set QWT_DIR=%WORKSPACE%\Qwt-%QWT%_%QTVER% + ) + + set SOURCE_DIR=%WORKSPACE%\qwt-%QWT% +) + +IF '%SEVENZ_DIR%'=='' ( + set SEVENZ_DIR="C:\Program Files\7-Zip" +) + +echo ************************************ +echo * QTDIR = %QTDIR% +echo * MSVC_DIR = %MSVC_DIR% +echo * PATH = %PATH% +echo * QWT_DIR = %QWT_DIR% +echo * SOURCE_DIR = %SOURCE_DIR% +echo ************************************ + +IF not exist "%MSVC_DIR%" ( + echo "\!" + echo "No valid MSVC directory found in %MSVC_DIR%" + echo "\!" + GOTO ERROR_HANDLER +) + +IF exist %QWT_DIR% ( +echo ************************************ +echo *** Delete old qwt Directory *** +echo ************************************ + + rmdir /s /q %QWT_DIR% + IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER +) + +echo ************************************ +echo *** Unzip Archives *** +echo ************************************ + +IF exist qwt-%QWT% ( + + rmdir /s /q qwt-%QWT% + IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER +) + +%SEVENZ_DIR%\7z.exe x qwt-%QWT%.zip -y +IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER + +cd %SOURCE_DIR% +IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER + +echo ************************************ +echo *** Configure MSVC environment *** +echo ************************************ + +call vcvarsall.bat x86_amd64 +if %ERRORLEVEL% NEQ 0 goto error +echo configuring was successful + +echo ************************************ +echo *** Build QWT *** +echo ************************************ + +set QMAKEFEATURES=%QWT_DIR%\features + +qmake qwt.pro +IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER + +nmake clean + +nmake +IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER + +nmake install +IF %ERRORLEVEL% NEQ 0 GOTO ERROR_HANDLER + +echo *** Move QWT folder *** +move "C:\Qwt-%QWT%" %QWT_DIR% + +GOTO QUIT + +:ERROR_HANDLER +echo #################################### +echo ### ERROR occured ### +echo #################################### +cd %WORKINGDIR% +IF '%WORKSPACE%'=='' ( + pause +) +exit 1 + + +:QUIT +echo ************************************ +echo *** SUCCESS finish *** +echo ************************************ +echo Qwt installed in: %QWT_DIR% +cd %WORKINGDIR% +IF '%WORKSPACE%'=='' ( + pause +) + diff --git a/build_sdk_windows_MSVC.bat b/build_sdk_windows_qt5_MSVC.bat similarity index 100% rename from build_sdk_windows_MSVC.bat rename to build_sdk_windows_qt5_MSVC.bat diff --git a/build_sdk_windows_MSVC_cmake.bat b/build_sdk_windows_qt5_MSVC_cmake.bat similarity index 100% rename from build_sdk_windows_MSVC_cmake.bat rename to build_sdk_windows_qt5_MSVC_cmake.bat diff --git a/build_sdk_windows_MSVC_cmake_interactive.bat b/build_sdk_windows_qt5_MSVC_cmake_interactive.bat similarity index 60% rename from build_sdk_windows_MSVC_cmake_interactive.bat rename to build_sdk_windows_qt5_MSVC_cmake_interactive.bat index 3565f952..87c38712 100644 --- a/build_sdk_windows_MSVC_cmake_interactive.bat +++ b/build_sdk_windows_qt5_MSVC_cmake_interactive.bat @@ -1,4 +1,4 @@ -call build_sdk_windows_MSVC_cmake.bat +call build_sdk_windows_qt5_MSVC_cmake.bat SET RETCODE=%ERRORLEVEL% set /p name= Continue exit /b %RETCODE% \ No newline at end of file diff --git a/build_sdk_windows_MSVC_interactive.bat b/build_sdk_windows_qt5_MSVC_interactive.bat similarity index 64% rename from build_sdk_windows_MSVC_interactive.bat rename to build_sdk_windows_qt5_MSVC_interactive.bat index f80763a0..ce3f7cf1 100644 --- a/build_sdk_windows_MSVC_interactive.bat +++ b/build_sdk_windows_qt5_MSVC_interactive.bat @@ -1,4 +1,4 @@ -call build_sdk_windows_MSVC.bat +call build_sdk_windows_qt5_MSVC.bat SET RETCODE=%ERRORLEVEL% set /p name= Continue exit /b %RETCODE% \ No newline at end of file