mirror of
https://github.com/netchx/netch.git
synced 2026-05-05 22:35:48 +08:00
Build v2ray-core
This commit is contained in:
29
Other/v2ray-core/build.ps1
Normal file
29
Other/v2ray-core/build.ps1
Normal file
@@ -0,0 +1,29 @@
|
||||
Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
|
||||
|
||||
git clone https://github.com/v2fly/v2ray-core -b 'v4.42.1' src
|
||||
if ( -Not $? ) {
|
||||
Pop-Location
|
||||
exit $lastExitCode
|
||||
}
|
||||
|
||||
$Env:CGO_ENABLED='0'
|
||||
$Env:GOROOT_FINAL='/usr'
|
||||
|
||||
$Env:GOOS='windows'
|
||||
$Env:GOARCH='amd64'
|
||||
go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w -buildid=' -o '..\release\v2ray.exe' '.\src\main'
|
||||
if ( -Not $? ) {
|
||||
Pop-Location
|
||||
exit $lastExitCode
|
||||
}
|
||||
|
||||
go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w -buildid=' -tags confonly -o '..\release\v2ctl.exe' '.\src\infra\control\main'
|
||||
if ( -Not $? ) {
|
||||
Pop-Location
|
||||
exit $lastExitCode
|
||||
}
|
||||
|
||||
go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w -buildid= -H windowsgui' -o '..\release\wv2ray.exe' '.\src\main'
|
||||
|
||||
Pop-Location
|
||||
exit $lastExitCode
|
||||
0
Other/v2ray-core/deps.ps1
Normal file
0
Other/v2ray-core/deps.ps1
Normal file
Reference in New Issue
Block a user