diff --git a/pan-light.go b/pan-light.go index 06d70c6..2ce053e 100644 --- a/pan-light.go +++ b/pan-light.go @@ -140,7 +140,7 @@ func pcDev() { log.Println("打包qml...") cmd(qtBin("rcc"), "-binary", "pc/gui/qml/qml.qrc", "-o", "pc/gui/qml/qml.rcc").Run() log.Println("启动客户端...") - //runCmd("./pc", "go", "run", "-tags=plugin", "pan-light-pc-dev.go") + runCmd("./pc", "go", "run", "-tags=plugin", "pan-light-pc-dev.go") } func pcBuild() { diff --git a/pc/pan-download/pan-download.go b/pc/pan-download/pan-download.go index e05f52e..2442b87 100644 --- a/pc/pan-download/pan-download.go +++ b/pc/pan-download/pan-download.go @@ -2,6 +2,7 @@ package pan_download import ( "bytes" + "encoding/base64" "fmt" "github.com/peterq/pan-light/pc/dep" "github.com/peterq/pan-light/pc/downloader" @@ -89,11 +90,21 @@ func LinkResolver(fileId string) (link string, err error) { case "share": fileSize, _ := strconv.ParseInt(args[3], 10, 64) return VipLinkByMd5(args[1], args[2], fileSize) + case "link": + return decodeHyperLink(args[1]) default: err = errors.New("unknown download method: " + args[0]) } return } +func decodeHyperLink(s string) (string, error) { + bin, err := base64.StdEncoding.DecodeString(s) + return string(bin), err +} + +func encodeHyperLink(s string) string { + return base64.StdEncoding.EncodeToString([]byte(s)) +} func vipLink(fileId string) (link string, err error) { md5, sliceMd5, fileSize, err := RapidUploadMd5(fileId) diff --git a/qt/tool-chain/cmd/deploy/deploy.go b/qt/tool-chain/cmd/deploy/deploy.go index 036c630..2833831 100644 --- a/qt/tool-chain/cmd/deploy/deploy.go +++ b/qt/tool-chain/cmd/deploy/deploy.go @@ -70,11 +70,11 @@ func Deploy(mode, target, path string, docker bool, ldFlags, tags string, fast b } //rcc.Rcc(path, target, tags, os.Getenv("QTRCC_OUTPUT_DIR")) - if !fast { + if false && !fast { moc.Moc(path, target, tags, false, false) } - if ((!fast || utils.QT_STUB()) || ((target == "js" || target == "wasm") && (utils.QT_DOCKER() || utils.QT_VAGRANT()))) && !utils.QT_FAT() { + if false && ((!fast || utils.QT_STUB()) || ((target == "js" || target == "wasm") && (utils.QT_DOCKER() || utils.QT_VAGRANT()))) && !utils.QT_FAT() { minimal.Minimal(path, target, tags) }