-
Notifications
You must be signed in to change notification settings - Fork 2
/
remove-interfering-tools-on-windows.yml
84 lines (82 loc) · 2.4 KB
/
remove-interfering-tools-on-windows.yml
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
steps:
- task: PowerShell@2
displayName: "Remove interfering tools"
inputs:
targetType: 'inline'
script: |
# These packages interfere with conan builds, which provide their own versions
$cdirs = ('msys64', 'Strawberry', 'vcpkg')
foreach($cdir in $cdirs) {
if (Test-Path "C:\$cdir") {
Move-Item "C:\$cdir" -Destination "C:\removed-$cdir" -Force
}
}
$chocolibs = ('OpenSSL.Light', 'mingw')
foreach($chocolib in $chocolibs) {
if (Test-Path "$env:ChocolateyInstall\lib\$chocolib") {
Move-Item "$env:ChocolateyInstall\lib\$chocolib" -Destination "C:\removed-$chocolib" -Force
}
}
$chocoexes = (
'addr2line.exe',
'ar.exe',
'as.exe',
'c++.exe',
'c++filt.exe',
'cc1.exe',
'cc1plus.exe',
'collect2.exe',
'cpp.exe',
'elfedit.exe',
'f951.exe',
'fixincl.exe',
'g++.exe',
'gcc-ar.exe',
'gcc-nm.exe',
'gcc-ranlib.exe',
'gcc.exe',
'gdb.exe',
'gdbmtool.exe',
'gdbm_dump.exe',
'gdbm_load.exe',
'gdborig.exe',
'gdbserver.exe',
'gfortran.exe',
'ld.bfd.exe',
'ld.exe',
'ld.gold.exe',
'lto-wrapper.exe',
'lto1.exe',
'make.exe',
'mingw32-make.exe',
'mingw64-pkg.bat',
'nm.exe',
'objcopy.exe',
'objdump.exe',
'ranlib.exe',
'readelf.exe',
'x86_64-w64-mingw32-c++.exe',
'x86_64-w64-mingw32-g++.exe',
'x86_64-w64-mingw32-gcc-8.1.0.exe',
'x86_64-w64-mingw32-gcc-ar.exe',
'x86_64-w64-mingw32-gcc-nm.exe',
'x86_64-w64-mingw32-gcc-ranlib.exe',
'x86_64-w64-mingw32-gcc.exe',
'x86_64-w64-mingw32-gfortran.exe'
)
foreach($chocoexe in $chocoexes) {
if (Test-Path "$env:ChocolateyInstall\bin\$chocoexe") {
Remove-Item "$env:ChocolateyInstall\bin\$chocoexe" -Force
}
}
- task: PowerShell@2
displayName: "Remove older windows SDKs"
inputs:
targetType: 'inline'
script: |
$oldsdks = ('10.0.17763.0')
foreach($oldsdk in $oldsdks) {
if (Test-Path "C:\Program Files (x86)\Windows Kits\10\Include\$oldsdk") {
Move-Item "C:\Program Files (x86)\Windows Kits\10\Include\$oldsdk" -Destination "C:\removed-$oldsdk" -Force
}
}