mirror of
https://github.com/lwch/natpass.git
synced 2024-04-21 12:41:54 +00:00
linux下的libx11库支持静态连接
This commit is contained in:
@@ -190,14 +190,15 @@ func build(t target) {
|
||||
fmt.Sprintf("GOARCH=%s", t.arch),
|
||||
fmt.Sprintf("CC=%s", t.cc),
|
||||
fmt.Sprintf("CXX=%s", t.cxx))
|
||||
args := []string{"build", "-o", path.Join(buildDir, "np-cli"+t.ext), "-ldflags", ldflags}
|
||||
if t.os == "windows" && !strings.Contains(t.arch, "arm") {
|
||||
env = append(env, "CGO_ENABLED=1")
|
||||
} else if t.os == "linux" && !strings.Contains(t.arch, "arm") {
|
||||
env = append(env, "CGO_ENABLED=1")
|
||||
ldflags += "-extldflags -static"
|
||||
} else {
|
||||
env = append(env, "CGO_ENABLED=0")
|
||||
}
|
||||
args := []string{"build", "-o", path.Join(buildDir, "np-cli"+t.ext), "-ldflags", ldflags}
|
||||
args = append(args,
|
||||
path.Join("code", "client", "main.go"))
|
||||
cmd = exec.Command("go", args...)
|
||||
|
||||
@@ -10,7 +10,7 @@ require (
|
||||
github.com/kardianos/service v1.2.1
|
||||
github.com/kisielk/errcheck v1.6.1 // indirect
|
||||
github.com/lwch/logging v0.0.0-20220322084100-ec48185d95ab
|
||||
github.com/lwch/rdesktop v1.0.0
|
||||
github.com/lwch/rdesktop v1.0.1-0.20220628063626-7a6b7d0f55ed
|
||||
github.com/lwch/runtime v0.0.0-20190520054850-8c97e19e0c6d
|
||||
github.com/lwch/yaml v0.0.0-20211206085137-772f80e85a26
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
|
||||
|
||||
@@ -19,6 +19,8 @@ github.com/lwch/logging v0.0.0-20220322084100-ec48185d95ab h1:zqeHtNXEg707Tq8gv5
|
||||
github.com/lwch/logging v0.0.0-20220322084100-ec48185d95ab/go.mod h1:aXQui5bsF/d4I+z6szuiBWY5m4y9t6pyZ2Q/sLgkBBg=
|
||||
github.com/lwch/rdesktop v1.0.0 h1:i+i+U5fu+400UJISSiFT+JV55yogb231PDj6ao6AMCc=
|
||||
github.com/lwch/rdesktop v1.0.0/go.mod h1:vZtkNUaG1bDuzJavu8OQQoBbHVS6cYJE7y4oxtmhYYM=
|
||||
github.com/lwch/rdesktop v1.0.1-0.20220628063626-7a6b7d0f55ed h1:dqhAvlOZjOp/GB74KMJ6FzIz1q8wvjTWWTrzW29/uWI=
|
||||
github.com/lwch/rdesktop v1.0.1-0.20220628063626-7a6b7d0f55ed/go.mod h1:vZtkNUaG1bDuzJavu8OQQoBbHVS6cYJE7y4oxtmhYYM=
|
||||
github.com/lwch/runtime v0.0.0-20190520054850-8c97e19e0c6d h1:Xg+zzPtvX22DaoJD5Bp0tqPdB8gn5WypghIJ4fluqiQ=
|
||||
github.com/lwch/runtime v0.0.0-20190520054850-8c97e19e0c6d/go.mod h1:uEt0zu1MDC7WnVvodPBGSYAD/KMKk0v36xE8UE5veM8=
|
||||
github.com/lwch/yaml v0.0.0-20211206085137-772f80e85a26 h1:sR3nbPhdfstDxYLp7c1EnsKH3z8+u+wgnhC3AI9/qf0=
|
||||
|
||||
Reference in New Issue
Block a user