mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
windows binary with subsystem window
This commit is contained in:
parent
21b6fa5217
commit
41a9aec10e
@ -76,16 +76,29 @@ func build(targetOS, targetArch string, archive bool, version string, metadataFi
|
||||
|
||||
targetFile := getTargetFile(v2rayOS)
|
||||
targetFileFull := filepath.Join(targetDir, targetFile)
|
||||
err = buildV2Ray(targetFileFull, version, v2rayOS, v2rayArch)
|
||||
err = buildV2Ray(targetFileFull, version, v2rayOS, v2rayArch, "")
|
||||
if err != nil {
|
||||
fmt.Println("Unable to build V2Ray: " + err.Error())
|
||||
}
|
||||
if v2rayOS == Windows {
|
||||
err = buildV2Ray(filepath.Join(targetDir, "w"+targetFile), version, v2rayOS, v2rayArch, "-H windowsgui")
|
||||
if err != nil {
|
||||
fmt.Println("Unable to build V2Ray no console: " + err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
if *flagSignBinary {
|
||||
err := signFile(targetFileFull)
|
||||
if err != nil {
|
||||
fmt.Println("Unable to sign V2Ray binary: " + err.Error())
|
||||
}
|
||||
|
||||
if v2rayOS == Windows {
|
||||
err = signFile(filepath.Join(targetDir, "w"+targetFile))
|
||||
if err != nil {
|
||||
fmt.Println("Unable to sign V2Ray no console: " + err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
err = copyConfigFiles(targetDir, v2rayOS)
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func buildV2Ray(targetFile string, version string, goOS GoOS, goArch GoArch) error {
|
||||
func buildV2Ray(targetFile string, version string, goOS GoOS, goArch GoArch, extraLdFlags string) error {
|
||||
goPath := os.Getenv("GOPATH")
|
||||
ldFlags := "-s"
|
||||
ldFlags := "-s " + extraLdFlags
|
||||
if version != "custom" {
|
||||
year, month, day := time.Now().UTC().Date()
|
||||
today := fmt.Sprintf("%04d%02d%02d", year, int(month), day)
|
||||
|
Loading…
Reference in New Issue
Block a user