@@ -20,34 +20,42 @@ $ErrorActionPreference = "Stop"
20
20
# ##################
21
21
22
22
$QtDir = ' C:\Qt'
23
+ $ChocoCacheDir = ' C:\ChocoCache'
23
24
$Qt32Version = " 5.15.2"
24
25
$Qt64Version = " 5.15.2"
25
26
$AqtinstallVersion = " 2.0.5"
26
27
$JackVersion = " 1.9.17"
27
28
$MsvcVersion = " 2019"
28
29
29
- echo " Install Qt..."
30
- # Install Qt
31
- pip install " aqtinstall==$AqtinstallVersion "
32
- if ( ! $? )
30
+ if ( Test-Path - Path $QtDir )
33
31
{
34
- throw " pip install aqtinstall failed with exit code $LastExitCode "
32
+ echo " Using Qt installation from previous run (actions/cache) "
35
33
}
36
-
37
- echo " Get Qt 64 bit..."
38
- # intermediate solution if the main server is down: append e.g. " -b https://mirrors.ocf.berkeley.edu/qt/" to the "aqt"-line below
39
- aqt install-qt -- outputdir " ${QtDir} " windows desktop " ${Qt64Version} " " win64_msvc${MsvcVersion} _64"
40
- if ( ! $? )
34
+ else
41
35
{
42
- throw " 64bit Qt installation failed with exit code $LastExitCode "
43
- }
36
+ echo " Install Qt..."
37
+ # Install Qt
38
+ pip install " aqtinstall==$AqtinstallVersion "
39
+ if ( ! $? )
40
+ {
41
+ throw " pip install aqtinstall failed with exit code $LastExitCode "
42
+ }
44
43
45
- echo " Get Qt 32 bit..."
46
- # intermediate solution if the main server is down: append e.g. " -b https://mirrors.ocf.berkeley.edu/qt/" to the "aqt"-line below
47
- aqt install-qt -- outputdir " ${QtDir} " windows desktop " ${Qt32Version} " " win32_msvc${MsvcVersion} "
48
- if ( ! $? )
49
- {
50
- throw " 32bit Qt installation failed with exit code $LastExitCode "
44
+ echo " Get Qt 64 bit..."
45
+ # intermediate solution if the main server is down: append e.g. " -b https://mirrors.ocf.berkeley.edu/qt/" to the "aqt"-line below
46
+ aqt install-qt -- outputdir " ${QtDir} " windows desktop " ${Qt64Version} " " win64_msvc${MsvcVersion} _64"
47
+ if ( ! $? )
48
+ {
49
+ throw " 64bit Qt installation failed with exit code $LastExitCode "
50
+ }
51
+
52
+ echo " Get Qt 32 bit..."
53
+ # intermediate solution if the main server is down: append e.g. " -b https://mirrors.ocf.berkeley.edu/qt/" to the "aqt"-line below
54
+ aqt install-qt -- outputdir " ${QtDir} " windows desktop " ${Qt32Version} " " win32_msvc${MsvcVersion} "
55
+ if ( ! $? )
56
+ {
57
+ throw " 32bit Qt installation failed with exit code $LastExitCode "
58
+ }
51
59
}
52
60
53
61
@@ -57,6 +65,8 @@ if ( !$? )
57
65
58
66
if ($BuildOption -Eq " jackonwindows" )
59
67
{
68
+ choco config set cacheLocation $ChocoCacheDir
69
+
60
70
echo " Install JACK2 64-bit..."
61
71
# Install JACK2 64-bit
62
72
choco install -- no- progress - y jack -- version " ${JackVersion} "
0 commit comments