forked from COVESA/dlt-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_qwt_windows_qt5_MSVC.bat
125 lines (94 loc) · 2.79 KB
/
build_qwt_windows_qt5_MSVC.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
@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
)