-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
_build.ps1
38 lines (31 loc) · 1.22 KB
/
_build.ps1
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
Push-Location _make
# swy: configuring the msvc environment variables
Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build"
# swy: https://stackoverflow.com/a/41399983/674685
# Invokes a Cmd.exe shell script and updates the environment.
function Invoke-CmdScript {
param(
[String] $scriptName
)
$cmdLine = """$scriptName"" $args & set"
& $Env:SystemRoot\system32\cmd.exe /c $cmdLine |
select-string '^([^=]*)=(.*)$' | foreach-object {
$varName = $_.Matches[0].Groups[1].Value
$varValue = $_.Matches[0].Groups[2].Value
set-item Env:$varName $varValue
}
}
Invoke-CmdScript vcvarsall.bat x64
Pop-Location
# swy: configuring the Qt environment variables
$env:Path += ";..\_qt\; ..\_qt\6.7.3\msvc2019_64\bin\"
# swy: run qmake and generate the msvc nmake makefile
& ..\_qt\6.7.3\msvc2019_64\bin\qmake ..\openBrf.pro
# swy: refresh the .ts files from the source code with lupdate; lrelease compiles .qm files from .ts
& ..\_qt\6.7.3\msvc2019_64\bin\lupdate ..\openBrf.pro
& ..\_qt\6.7.3\msvc2019_64\bin\lrelease ..\openBrf.pro
while (1) {
# swy: start the actual build with jom instead of nmake; for speed
& ..\_qt\jom
pause
}