1
- REM @echo off
1
+ @ echo off
2
2
REM echo Current dir: %cd%
3
3
REM echo folder: %~dp0
4
4
REM echo arch: %1
5
5
6
6
7
+ IF " %1 " == " " (
8
+ call :print_usage
9
+ exit /b 2
10
+ )
7
11
IF %1 == Win32 (
8
12
set qt_path = %~dp0 ..\..\Qt\5.15.2\msvc2019
9
13
@@ -13,31 +17,29 @@ IF %1 == Win32 (
13
17
set build_arch = Win32
14
18
set qt_params =
15
19
call " C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
16
- )
17
- IF %1 == x64 (
20
+ ) ELSE IF %1 == x64 (
18
21
set qt_path = %~dp0 ..\..\Qt\5.15.2\msvc2019_64
19
- REM set qt_path=%~dp0..\..\Qt\6.3.1\msvc2019_64
22
+ REM set qt_path=%~dp0..\..\Qt\6.3.1\msvc2019_64
20
23
21
24
REM get private headers for QtCore
22
25
Xcopy /E /I /Y /Q %~dp0 ..\..\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2\QtCore %~dp0 ..\..\Qt\5.15.2\msvc2019_64\include\QtCore
23
- REM Xcopy /E /I /Y /Q %~dp0..\..\Qt\6.3.1\msvc2019_64\include\QtCore\6.3.1\QtCore %~dp0..\..\Qt\6.3.1\msvc2019_64\include\QtCore
26
+ REM Xcopy /E /I /Y /Q %~dp0..\..\Qt\6.3.1\msvc2019_64\include\QtCore\6.3.1\QtCore %~dp0..\..\Qt\6.3.1\msvc2019_64\include\QtCore
24
27
25
28
set build_arch = x64
26
29
set qt_params =
27
30
call " C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
28
- )
29
- IF %1 == ARM64 (
31
+ ) ELSE IF %1 == ARM64 (
30
32
set qt_path = %~dp0 ..\..\Qt\6.3.1\msvc2019_64
31
33
32
34
REM get private headers for QtCore
33
35
Xcopy /E /I /Y /Q %~dp0 ..\..\Qt\6.3.1\msvc2019_arm64\include\QtCore\6.3.1\QtCore %~dp0 ..\..\Qt\6.3.1\msvc2019_arm64\include\QtCore
34
36
35
37
set build_arch = ARM64
36
38
37
- REM set qt_params=-qtconf "%~dp0..\..\Qt\6.3.1\msvc2019_arm64\bin\target_qt.conf"
38
-
39
- REM type %~dp0..\..\Qt\6.3.1\msvc2019_arm64\bin\target_qt.conf
40
-
39
+ REM set qt_params=-qtconf "%~dp0..\..\Qt\6.3.1\msvc2019_arm64\bin\target_qt.conf"
40
+
41
+ REM type %~dp0..\..\Qt\6.3.1\msvc2019_arm64\bin\target_qt.conf
42
+
41
43
REM
42
44
REM The target_qt.conf as provided by the windows-2019 github action runner
43
45
REM is non functional, hence we create our own working edition here.
@@ -58,8 +60,12 @@ REM type %~dp0..\..\Qt\6.3.1\msvc2019_arm64\bin\target_qt.conf
58
60
59
61
set qt_params = -qtconf " %~dp0 ..\..\Qt\6.3.1\msvc2019_arm64\bin\my_target_qt.conf"
60
62
61
- REM set VSCMD_DEBUG=3
62
- call " C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
63
+ REM set VSCMD_DEBUG=3
64
+ call " C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
65
+ ) ELSE (
66
+ echo Unknown architecture!
67
+ call :print_usage
68
+ exit /b 2
63
69
)
64
70
@ echo on
65
71
@@ -121,8 +127,13 @@ rem dir .\bin
121
127
rem dir .\bin\%build_arch%
122
128
rem dir .\bin\%build_arch%\Release
123
129
124
- goto :eof
130
+ exit /b 0
131
+
132
+ :print_usage
133
+ echo Usage: qmake_plus.cmd ^ < architecture^ >
134
+ echo Architecture can be Win32 / x64 / ARM64
125
135
126
136
:error
127
137
echo Build failed
128
- exit 1
138
+ exit /b 1
139
+
0 commit comments