Update build scripts

This commit is contained in:
Netch
2021-07-20 09:53:19 +08:00
parent fbac1a0629
commit ed60926cd5
15 changed files with 149 additions and 129 deletions

View File

@@ -1,9 +1,16 @@
param([string]$OutputPath)
$name="ck-client.exe"
$address="https://github.com/cbeuw/Cloak/releases/download/v2.5.4/ck-client-windows-amd64-v2.5.4.exe"
param (
[string]
$OutputPath
)
..\scripts\download.ps1 $name $address
if (-Not $?) { exit $lastExitCode }
try {
Invoke-WebRequest `
-Uri 'https://github.com/cbeuw/Cloak/releases/download/v2.5.4/ck-client-windows-amd64-v2.5.4.exe' `
-OutFile 'ck-client.exe'
}
catch {
exit 1
}
Move-Item -Force $name $OutputPath
mv -Force 'ck-client.exe' $OutputPath
exit 0

View File

@@ -1,9 +1,16 @@
param([string]$OutputPath)
$name="geoip.dat"
$address="https://github.com/v2fly/geoip/releases/download/202107150023/geoip.dat"
param (
[string]
$OutputPath
)
..\scripts\download.ps1 $name $address
if (-Not $?) { exit $lastExitCode }
try {
Invoke-WebRequest `
-Uri 'https://github.com/v2fly/geoip/releases/download/202107150023/geoip.dat' `
-OutFile 'geoip.dat'
}
catch {
exit 1
}
Move-Item -Force $name $OutputPath
mv -Force 'geoip.dat' $OutputPath
exit 0

View File

@@ -1,9 +1,16 @@
param([string]$OutputPath)
$name="geosite.dat"
$address="https://github.com/v2fly/domain-list-community/releases/download/20210718155822/dlc.dat"
param (
[string]
$OutputPath
)
..\scripts\download.ps1 $name $address
if (-Not $?) { exit $lastExitCode }
try {
Invoke-WebRequest `
-Uri 'https://github.com/v2fly/domain-list-community/releases/download/20210718155822/dlc.dat' `
-OutFile 'geosite.dat'
}
catch {
exit 1
}
Move-Item -Force $name $OutputPath
mv -Force 'geosite.dat' $OutputPath
exit 0

View File

@@ -1,17 +1,24 @@
param([string]$OutputPath)
$name="v2ray-core.zip"
$address="https://github.com/v2fly/v2ray-core/releases/download/v4.40.1/v2ray-windows-64.zip"
param (
[string]
$OutputPath
)
..\scripts\download.ps1 $name $address
if (-Not $?) { exit $lastExitCode }
try {
Invoke-WebRequest `
-Uri 'https://github.com/v2fly/v2ray-core/releases/download/v4.40.1/v2ray-windows-64.zip' `
-OutFile 'v2ray-core.zip'
}
catch {
exit 1
}
..\scripts\extract.ps1 $name "v2ray-core"
if (-Not $?) { exit $lastExitCode }
7z x 'v2ray-core.zip' -o'v2ray-core'
if ( -Not $? ) { exit $lastExitCode }
Move-Item -Force v2ray-core\v2ctl.exe $OutputPath
Move-Item -Force v2ray-core\v2ray.exe $OutputPath
Move-Item -Force v2ray-core\wv2ray.exe $OutputPath
mv -Force 'v2ray-core\v2ctl.exe' $OutputPath
mv -Force 'v2ray-core\v2ray.exe' $OutputPath
mv -Force 'v2ray-core\wv2ray.exe' $OutputPath
Remove-Item -Recurse -Force v2ray-core
Remove-Item -Recurse -Force v2ray-core.zip
rm -Recurse -Force v2ray-core
rm -Recurse -Force v2ray-core.zip
exit 0

View File

@@ -1,18 +1,25 @@
param([string]$OutputPath)
$name="v2ray-plugin.tar.gz"
$address="https://github.com/teddysun/v2ray-plugin/releases/download/v4.40.1/v2ray-plugin-windows-amd64-v4.40.1.tar.gz"
param (
[string]
$OutputPath
)
..\scripts\download.ps1 $name $address
if (-Not $?) { exit $lastExitCode }
try {
Invoke-WebRequest `
-Uri 'https://github.com/teddysun/v2ray-plugin/releases/download/v4.40.1/v2ray-plugin-windows-amd64-v4.40.1.tar.gz' `
-OutFile 'v2ray-plugin.tar.gz'
}
catch {
exit 1
}
7z x $name
if (-Not $?) { exit $lastExitCode }
7z x 'v2ray-plugin.tar.gz'
if ( -Not $? ) { exit $lastExitCode }
7z x "v2ray-plugin.tar"
if (-Not $?) { exit $lastExitCode }
7z x 'v2ray-plugin.tar'
if ( -Not $? ) { exit $lastExitCode }
Move-Item -Force "v2ray-plugin_windows_amd64.exe" "$OutputPath\v2ray-plugin.exe"
mv -Force 'v2ray-plugin_windows_amd64.exe' "$OutputPath\v2ray-plugin.exe"
Remove-Item -Recurse -Force $name
Remove-Item -Recurse -Force v2ray-plugin.tar
rm -Force 'v2ray-plugin.tar'
rm -Force 'v2ray-plugin.tar.gz'
exit 0

View File

@@ -1,15 +1,22 @@
param([string]$OutputPath)
$name="xray-core.zip"
$address="https://github.com/XTLS/Xray-core/releases/download/v1.4.2/Xray-windows-64.zip"
param (
[string]
$OutputPath
)
..\scripts\download.ps1 $name $address
if (-Not $?) { exit $lastExitCode }
try {
Invoke-WebRequest `
-Uri 'https://github.com/XTLS/Xray-core/releases/download/v1.4.2/Xray-windows-64.zip' `
-OutFile 'xray-core.zip'
}
catch {
exit 1
}
..\scripts\extract.ps1 $name "xray-core"
if (-Not $?) { exit $lastExitCode }
7z x 'xray-core.zip' -o'xray-core'
if ( -Not $? ) { exit $lastExitCode }
Move-Item -Force "xray-core\xray.exe" $OutputPath
mv -Force 'xray-core\xray.exe' $OutputPath
Remove-Item -Recurse -Force xray-core
Remove-Item -Recurse -Force xray-core.zip
rm -Recurse -Force xray-core
rm -Recurse -Force xray-core.zip
exit 0

View File

@@ -1,18 +1,25 @@
param([string]$OutputPath)
$name="xray-plugin.tar.gz"
$address="https://github.com/teddysun/xray-plugin/releases/download/v1.4.2/xray-plugin-windows-amd64-v1.4.2.tar.gz"
param (
[string]
$OutputPath
)
..\scripts\download.ps1 $name $address
if (-Not $?) { exit $lastExitCode }
try {
Invoke-WebRequest `
-Uri 'https://github.com/teddysun/xray-plugin/releases/download/v1.4.2/xray-plugin-windows-amd64-v1.4.2.tar.gz' `
-OutFile 'xray-plugin.tar.gz'
}
catch {
exit 1
}
7z x $name
if (-Not $?) { exit $lastExitCode }
7z x 'xray-plugin.tar.gz'
if ( -Not $? ) { exit $lastExitCode }
7z x "xray-plugin.tar"
if (-Not $?) { exit $lastExitCode }
7z x 'xray-plugin.tar'
if ( -Not $? ) { exit $lastExitCode }
Move-Item -Force "xray-plugin_windows_amd64.exe" "$OutputPath\xray-plugin.exe"
mv -Force 'xray-plugin_windows_amd64.exe' "$OutputPath\xray-plugin.exe"
Remove-Item -Recurse -Force $name
Remove-Item -Recurse -Force xray-plugin.tar
rm -Force 'xray-plugin.tar'
rm -Force 'xray-plugin.tar.gz'
exit 0

View File

@@ -1,18 +0,0 @@
param (
[string]
$name,
[string]
$address
)
try
{
Invoke-WebRequest -OutFile $name -Uri $address
}
catch
{
exit 1
}
exit 0

View File

@@ -1,19 +0,0 @@
param (
[string]
$name,
[string]
$address
)
try
{
Expand-Archive -Force -Path $name -DestinationPath $address
}
catch
{
Write-Host "Extract $name failed"
exit 1
}
exit 0