diff --git a/contrib/build/build_all.go b/contrib/build/build_all.go index 5260c56..c55efc8 100644 --- a/contrib/build/build_all.go +++ b/contrib/build/build_all.go @@ -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...) diff --git a/go.mod b/go.mod index 81a1df7..b3d9034 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 6c0bd21..247c2ef 100644 --- a/go.sum +++ b/go.sum @@ -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=