2022-12-28 12:20:27 +03:00
|
|
|
Set-StrictMode -Version latest
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
|
2023-04-05 12:07:50 +03:00
|
|
|
write-host -foregroundcolor Cyan "----- install system prerequisites -----"
|
2022-09-23 10:21:44 +03:00
|
|
|
|
2023-01-17 12:09:56 +03:00
|
|
|
# update vcpkg install
|
|
|
|
git -C ((Get-command vcpkg).Source | Split-Path) pull
|
|
|
|
|
2022-12-28 02:04:26 +03:00
|
|
|
# install libxml and libcurl[openssl]
|
2022-09-23 10:21:44 +03:00
|
|
|
$vcpkg_dir=(Get-command vcpkg).Source
|
2022-12-29 00:42:27 +03:00
|
|
|
|
2023-03-27 12:48:38 +03:00
|
|
|
vcpkg install curl:x64-windows || true
|
|
|
|
vcpkg install libxml2:x64-windows || true
|
2022-12-29 00:42:27 +03:00
|
|
|
|
2022-09-23 10:21:44 +03:00
|
|
|
vcpkg update
|
2022-12-28 12:20:27 +03:00
|
|
|
if ($LASTEXITCODE) { Throw }
|
2023-03-27 12:48:38 +03:00
|
|
|
vcpkg upgrade --no-dry-run
|
2022-12-28 12:20:27 +03:00
|
|
|
if ($LASTEXITCODE) { Throw }
|
2022-09-23 10:21:44 +03:00
|
|
|
vcpkg integrate install
|
2023-04-05 12:07:50 +03:00
|
|
|
Set-ItemProperty -Path HKCU:\Environment -Name VCPKGRS_DYNAMIC -Value "1"
|
|
|
|
$env:VCPKGRS_DYNAMIC = [System.Environment]::GetEnvironmentVariable("VCPKGRS_DYNAMIC","User")
|
2022-12-28 12:20:27 +03:00
|
|
|
if ($LASTEXITCODE) { Throw }
|
2022-09-23 10:21:44 +03:00
|
|
|
|
|
|
|
# update pip
|
|
|
|
python -m pip install --upgrade pip --quiet
|
2022-12-28 12:20:27 +03:00
|
|
|
if ($LASTEXITCODE) { Throw }
|
2023-04-05 12:07:50 +03:00
|
|
|
|
|
|
|
# install proxy
|
|
|
|
choco install --confirm squid --install-arguments="'TARGETDIR=C:\'"
|
|
|
|
if ($LASTEXITCODE) { Throw }
|
|
|
|
Get-ChildItem -Force C:\Squid\bin
|
|
|
|
C:\Squid\bin\squid --version
|
|
|
|
if ($LASTEXITCODE) { Throw }
|