diff --git a/Other/aiodns/build.ps1 b/Other/aiodns/build.ps1 index b28593dd..ed7a8772 100644 --- a/Other/aiodns/build.ps1 +++ b/Other/aiodns/build.ps1 @@ -1,4 +1,4 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) $Env:CGO_ENABLED='1' $Env:GOROOT_FINAL='/usr' @@ -6,6 +6,4 @@ $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -buildmode=c-shared -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\release\aiodns.bin' - -Pop-Location exit $lastExitCode diff --git a/Other/cloak/build.ps1 b/Other/cloak/build.ps1 index 1ff33eb5..72c07750 100644 --- a/Other/cloak/build.ps1 +++ b/Other/cloak/build.ps1 @@ -1,11 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/cbeuw/Cloak -b 'v2.5.5' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' @@ -13,9 +12,4 @@ $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\..\release\ck-client.exe' '.\cmd\ck-client' - -Pop-Location -rm -Recurse -Force src - -Pop-Location exit $lastExitCode \ No newline at end of file diff --git a/Other/cloak/deps.ps1 b/Other/cloak/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/dnsproxy/build.ps1 b/Other/dnsproxy/build.ps1 index 6b5c98b1..ba66cb21 100644 --- a/Other/dnsproxy/build.ps1 +++ b/Other/dnsproxy/build.ps1 @@ -1,11 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/AdguardTeam/dnsproxy -b 'v0.39.5' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' @@ -13,9 +12,4 @@ $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\..\release\dnsproxy.exe' - -Pop-Location -rm -Recurse -Force src - -Pop-Location exit $lastExitCode \ No newline at end of file diff --git a/Other/dnsproxy/deps.ps1 b/Other/dnsproxy/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/libev-mingw/build.ps1 b/Other/libev-mingw/build.ps1 index eaf4bf13..6e08551c 100644 --- a/Other/libev-mingw/build.ps1 +++ b/Other/libev-mingw/build.ps1 @@ -1,22 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/shadowsocks/libev -b 'mingw' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src msys2 ..\build.sh -if ( -Not $? ) { - Pop-Location - - rm -Recurse -Force src - exit $lastExitCode -} - -Pop-Location -rm -Recurse -Force src - -Pop-Location exit $lastExitCode \ No newline at end of file diff --git a/Other/libev-mingw/deps.ps1 b/Other/libev-mingw/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/shadowsocks-rust/build.ps1 b/Other/shadowsocks-rust/build.ps1 index a6493f70..5af2442c 100644 --- a/Other/shadowsocks-rust/build.ps1 +++ b/Other/shadowsocks-rust/build.ps1 @@ -1,24 +1,15 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/shadowsocks/shadowsocks-rust -b 'v1.11.2' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src cargo build --release if ( -Not $? ) { - Pop-Location - - rm -Recurse -Force src exit $lastExitCode } cp -Force '.\target\release\sslocal.exe' '..\..\release\ss-local.exe' - -Pop-Location -rm -Recurse -Force src - -Pop-Location -exit $lastExitCode \ No newline at end of file +exit 0 \ No newline at end of file diff --git a/Other/shadowsocks-rust/deps.ps1 b/Other/shadowsocks-rust/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/shadowsocksr-libev/build.ps1 b/Other/shadowsocksr-libev/build.ps1 index bdd943be..4d27dda7 100644 --- a/Other/shadowsocksr-libev/build.ps1 +++ b/Other/shadowsocksr-libev/build.ps1 @@ -1,24 +1,15 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/shadowsocksrr/shadowsocksr-libev -b 'Akkariiin/develop' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src msys2 ..\build.sh if ( -Not $? ) { - Pop-Location - - rm -Recurse -Force src exit $lastExitCode } cp -Force '.\ss-local.exe' '..\..\release\ssr-local.exe' - -Pop-Location -rm -Recurse -Force src - -Pop-Location -exit $lastExitCode \ No newline at end of file +exit 0 \ No newline at end of file diff --git a/Other/shadowsocksr-libev/deps.ps1 b/Other/shadowsocksr-libev/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/simple-obfs/build.ps1 b/Other/simple-obfs/build.ps1 index 58a8420c..fa04b085 100644 --- a/Other/simple-obfs/build.ps1 +++ b/Other/simple-obfs/build.ps1 @@ -1,24 +1,15 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/shadowsocks/simple-obfs src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src msys2 ..\build.sh if ( -Not $? ) { - Pop-Location - - rm -Recurse -Force src exit $lastExitCode } cp -Force '.\simple-obfs.exe' '..\..\release\simple-obfs.exe' - -Pop-Location -rm -Recurse -Force src - -Pop-Location -exit $lastExitCode \ No newline at end of file +exit 0 \ No newline at end of file diff --git a/Other/simple-obfs/deps.ps1 b/Other/simple-obfs/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/trojan-go/build.ps1 b/Other/trojan-go/build.ps1 index d8b53566..1f33f38c 100644 --- a/Other/trojan-go/build.ps1 +++ b/Other/trojan-go/build.ps1 @@ -1,11 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/p4gefau1t/trojan-go -b 'v0.10.6' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' @@ -13,9 +12,4 @@ $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -tags 'full' -o '..\..\release\trojan-go.exe' - -Pop-Location -rm -Recurse -Force src - -Pop-Location exit $lastExitCode \ No newline at end of file diff --git a/Other/trojan-go/deps.ps1 b/Other/trojan-go/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/tun2socks/build.ps1 b/Other/tun2socks/build.ps1 index 7d310b84..1529d769 100644 --- a/Other/tun2socks/build.ps1 +++ b/Other/tun2socks/build.ps1 @@ -1,11 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/xjasonlyu/tun2socks -b 'v2.3.0' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' @@ -13,9 +12,4 @@ $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\..\release\tun2socks.exe' - -Pop-Location -rm -Recurse -Force src - -Pop-Location exit $lastExitCode \ No newline at end of file diff --git a/Other/tun2socks/deps.ps1 b/Other/tun2socks/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/v2ray-core/build.ps1 b/Other/v2ray-core/build.ps1 index 48d8d23c..6d5c47d5 100644 --- a/Other/v2ray-core/build.ps1 +++ b/Other/v2ray-core/build.ps1 @@ -1,11 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/v2fly/v2ray-core -b 'v4.42.2' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' @@ -14,26 +13,13 @@ $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w -buildid=' -o '..\..\release\v2ray.exe' '.\main' if ( -Not $? ) { - Pop-Location - rm -Recurse -Force src - - Pop-Location exit $lastExitCode } go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w -buildid=' -tags confonly -o '..\..\release\v2ctl.exe' '.\infra\control\main' if ( -Not $? ) { - Pop-Location - rm -Recurse -Force src - - Pop-Location exit $lastExitCode } go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w -buildid= -H windowsgui' -o '..\..\release\wv2ray.exe' '.\main' - -Pop-Location -rm -Recurse -Force src - -Pop-Location exit $lastExitCode \ No newline at end of file diff --git a/Other/v2ray-core/deps.ps1 b/Other/v2ray-core/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/v2ray-plugin/build.ps1 b/Other/v2ray-plugin/build.ps1 index d2b3e6b9..8c5d3dff 100644 --- a/Other/v2ray-plugin/build.ps1 +++ b/Other/v2ray-plugin/build.ps1 @@ -1,11 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/teddysun/v2ray-plugin -b 'v4.42.2' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' @@ -13,9 +12,4 @@ $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\..\release\v2ray-plugin.exe' - -Pop-Location -rm -Recurse -Force src - -Pop-Location exit $lastExitCode \ No newline at end of file diff --git a/Other/v2ray-plugin/deps.ps1 b/Other/v2ray-plugin/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/xray-core/build.ps1 b/Other/xray-core/build.ps1 index 033159f4..9cf04d76 100644 --- a/Other/xray-core/build.ps1 +++ b/Other/xray-core/build.ps1 @@ -1,11 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/xtls/xray-core -b 'v1.4.5' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' @@ -13,9 +12,4 @@ $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w -buildid=' -o '..\..\release\xray.exe' '.\main' - -Pop-Location -rm -Recurse -Force src - -Pop-Location -exit $lastExitCode +exit $lastExitCode \ No newline at end of file diff --git a/Other/xray-core/deps.ps1 b/Other/xray-core/deps.ps1 deleted file mode 100644 index e69de29b..00000000 diff --git a/Other/xray-plugin/build.ps1 b/Other/xray-plugin/build.ps1 index bf6bfdfd..7b50b31a 100644 --- a/Other/xray-plugin/build.ps1 +++ b/Other/xray-plugin/build.ps1 @@ -1,11 +1,10 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) git clone https://github.com/teddysun/xray-plugin -b 'v1.4.5' src if ( -Not $? ) { - Pop-Location exit $lastExitCode } -Push-Location src +Set-Location src $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' @@ -13,9 +12,4 @@ $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\..\release\xray-plugin.exe' - -Pop-Location -rm -Recurse -Force src - -Pop-Location exit $lastExitCode \ No newline at end of file diff --git a/Other/xray-plugin/deps.ps1 b/Other/xray-plugin/deps.ps1 deleted file mode 100644 index e69de29b..00000000