提交 4458b57c 编写于 作者: P peterq

fix: build linux

上级 f484f3c3
......@@ -8,4 +8,5 @@ qml.rcc
gui-plugin.so
.env
/demo
*.pb.go
\ No newline at end of file
*.pb.go
deploy
\ No newline at end of file
......@@ -114,6 +114,8 @@ func pcCmd() {
pcMoc()
case "dev":
pcDev()
case "build":
pcBuild()
case "download-icon":
downloadIcon()
default:
......@@ -137,6 +139,10 @@ func pcDev() {
runCmd("./pc", "go", "run", "-tags=plugin", "pan-light-pc-dev.go")
}
func pcBuild() {
runCmd("./pc", "go", "run", "../qt/cmd/qtdeploy/main.go", "-fast", "build", "desktop")
}
func qtBin(name string) string {
v, ok1 := os.LookupEnv("QT_VERSION")
d, ok2 := os.LookupEnv("QT_DIR")
......
......@@ -103,7 +103,7 @@ func bundle(mode, target, path, name, depPath string, tagsCustom string, fast bo
}()
//copy default assets
if target != "linux" || name == "lib" {
if target != "linux" || name == "lib" || true {
utils.SaveExec(filepath.Join(depPath, fmt.Sprintf("%v.sh", name)), linux_sh(target, name))
}
......
......@@ -80,7 +80,7 @@ func Deploy(mode, target, path string, docker bool, ldFlags, tags string, fast b
build(mode, target, path, ldFlags, tags, name, depPath, fast, comply)
if !(fast || (utils.QT_DEBUG_QML() && target == runtime.GOOS)) || (target == "js" || target == "wasm") {
if !(fast || (utils.QT_DEBUG_QML() && target == runtime.GOOS)) || (target == "js" || target == "wasm") || true {
bundle(mode, target, path, name, depPath, tags, fast)
} else if fast {
switch target {
......
......@@ -295,7 +295,7 @@ func GoList(args ...string) *exec.Cmd {
if UseGOMOD("") {
if true || /*strings.Contains(strings.Join(args, "|"), "github.com/therecipe/env_"+runtime.GOOS+"_amd64") ||*/ strings.Contains(strings.Join(args, "|"), "github.com/peterq/pan-light/qt/tool-chain") {
//TODO: make env readonly if it can't be found inside ./vendor ...
cmd.Args = append(cmd.Args, "-mod=readonly")
//cmd.Args = append(cmd.Args, "-mod=readonly")
} else {
cmd.Args = append(cmd.Args, GOFLAGS())
}
......
......@@ -95,7 +95,7 @@ func GoQtPkgPath(s ...string) (r string) {
if len(goQtPkgPath) == 0 {
goQtPkgPath = strings.TrimSpace(RunCmd(GoList("{{.Dir}}", packageName), "utils.GoQtPkgPath"))
fmt.Println(goQtPkgPath)
os.Exit(0)
//os.Exit(0)
}
r = goQtPkgPath
goQtPkgPathMutex.Unlock()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册