generated from Kiddinglife/cmake_cpp_starter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlocaldev.ps1
80 lines (76 loc) · 2.65 KB
/
localdev.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
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
$exenames = 'scoop', '7zip', 'sudo', 'coreutils', 'grep', 'sed', 'less', 'llvm', 'python', 'cmake', 'ninja', 'doxygen', 'ccache', 'cppcheck'
function InstallAppWithScoop {
param ([string]$exename)
$found = [bool] (Get-Command -ErrorAction Ignore -Type Application $exename)
if ( $found ) {
scoop update $exename
}
else {
scoop install $exename
}
}
foreach ($exename in $exenames) {
if ($exename -eq 'scoop') {
$found = [bool] (Get-Command -ErrorAction Ignore -Type Application $exename)
if ( $found ) {
scoop update $exename
}
else {
Set-ExecutionPolicy RemoteSigned -scope CurrentUser -force
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
}
continue
}
if ($exename -eq 'llvm') {
$found = [bool] (Get-Command -ErrorAction Ignore -Type Application clang-tidy) -And [bool] (Get-Command -ErrorAction Ignore -Type Application clang-format)
if ( $found ) {
scoop update $exename
}
else {
InstallAppWithScoop $exename
}
continue
}
if ($exename -eq 'python') {
$found = [bool] (Get-Command -ErrorAction Ignore -Type Application python3)
if ( $found ) {
scoop update $exename
}
else {
InstallAppWithScoop $exename
}
continue
}
InstallAppWithScoop $exename
}
python -m pip install --upgrade pip
python -m pip install --upgrade cmake-format
python -m pip install --upgrade codecheck
Set-Location -Path ..
If (!(test-path vcpkg)) {
git clone https://github.com/Microsoft/vcpkg.git
vcpkg\bootstrap-vcpkg.bat
}
Set-Location -Path vcpkg
git pull --rebase
# $env:Path += ";$pwd\vcpkg"
# .\vcpkg integrate powershell
# static
.\vcpkg install gtest:x64-windows-static --recurse
.\vcpkg install argagg:x64-windows-static --recurse
.\vcpkg install spdlog:x64-windows-static --recurse
.\vcpkg install uvw:x64-windows-static --recurse
# .\vcpkg install libuv:x64-windows-static --recurse
# .\vcpkg install curl:x64-windows-static --recurse
# .\vcpkg install boringssl:x64-windows-static --recurse
# dll strange bug ctest reported [ctest] No tests were found!!! when built with dll
.\vcpkg install gtest:x64-windows --recurse
.\vcpkg install argagg:x64-windows --recurse
.\vcpkg install spdlog:x64-windows --recurse
.\vcpkg install uvw:x64-windows --recurse
# .\vcpkg install libuv:x64-windows --recurse
# .\vcpkg install curl:x64-windows --recurse
# .\vcpkg install boringssl:x64-windows --recurse
.\vcpkg integrate install
# Get-Location
Set-Location -Path ../quicplus -PassThru