|
|
|
|
$ErrorActionPreference = 'Stop'; # stop on all errors
|
|
|
|
|
$packagename = 'i2pd'
|
|
|
|
|
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
|
|
|
|
|
$url = 'https://github.com/PurpleI2P/i2pd/releases/download/2.21.1/i2pd_2.21.1_win32_mingw.zip'
|
|
|
|
|
$checksum = 'DCEFCFF8B3F3CD8351CE5C7C07729B02D531533A9B02304113E0A8CBDADA28AD'
|
|
|
|
|
$checksumType = 'sha256'
|
|
|
|
|
$url64 = 'https://github.com/PurpleI2P/i2pd/releases/download/2.21.1/i2pd_2.21.1_win64_mingw.zip'
|
|
|
|
|
$checksum64 = '7A12AB280B6E46E9E5A740CE5FD6062F7D244396DF4AB4FDA99E3D54EF38A035'
|
|
|
|
|
$checksumType64 = 'sha256'
|
|
|
|
|
|
|
|
|
|
Install-ChocolateyZipPackage -packageName "$packagename" `
|
|
|
|
|
-UnzipLocation "$toolsDir" `
|
|
|
|
|
-Url "$url" `
|
|
|
|
|
-checksum "$checksum" `
|
|
|
|
|
-checksumType "$checksumType" `
|
|
|
|
|
-Url64 "$url64" `
|
|
|
|
|
-checksum64 "$checksum64" `
|
|
|
|
|
-checksumType64 "$checksumType64"
|
|
|
|
|
|
|
|
|
|
# Install configs and certificates if i2pd dir not available, otherwise just update certificates
|
|
|
|
|
$dataDir = Join-Path $Env:APPDATA 'i2pd'
|
|
|
|
|
if (Test-Path -Path $dataDir) {
|
|
|
|
|
Write-Host "Updating i2pd certificates"
|
|
|
|
|
Remove-Item $dataDir\certificates -Recurse
|
|
|
|
|
Copy-Item $toolsDir\contrib\certificates -Destination $dataDir\certificates -Recurse
|
|
|
|
|
} else {
|
|
|
|
|
Write-Host "Copying default configs and certificates"
|
|
|
|
|
Copy-Item $toolsDir\contrib -Destination $dataDir -Recurse
|
|
|
|
|
}
|