Skip to content

Commit 806497b

Browse files
committed
build darwin
1 parent 4a9adce commit 806497b

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

pan-light.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func pcDev() {
140140
log.Println("打包qml...")
141141
cmd(qtBin("rcc"), "-binary", "pc/gui/qml/qml.qrc", "-o", "pc/gui/qml/qml.rcc").Run()
142142
log.Println("启动客户端...")
143-
//runCmd("./pc", "go", "run", "-tags=plugin", "pan-light-pc-dev.go")
143+
runCmd("./pc", "go", "run", "-tags=plugin", "pan-light-pc-dev.go")
144144
}
145145

146146
func pcBuild() {

pc/pan-download/pan-download.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package pan_download
22

33
import (
44
"bytes"
5+
"encoding/base64"
56
"fmt"
67
"github.com/peterq/pan-light/pc/dep"
78
"github.com/peterq/pan-light/pc/downloader"
@@ -89,11 +90,21 @@ func LinkResolver(fileId string) (link string, err error) {
8990
case "share":
9091
fileSize, _ := strconv.ParseInt(args[3], 10, 64)
9192
return VipLinkByMd5(args[1], args[2], fileSize)
93+
case "link":
94+
return decodeHyperLink(args[1])
9295
default:
9396
err = errors.New("unknown download method: " + args[0])
9497
}
9598
return
9699
}
100+
func decodeHyperLink(s string) (string, error) {
101+
bin, err := base64.StdEncoding.DecodeString(s)
102+
return string(bin), err
103+
}
104+
105+
func encodeHyperLink(s string) string {
106+
return base64.StdEncoding.EncodeToString([]byte(s))
107+
}
97108

98109
func vipLink(fileId string) (link string, err error) {
99110
md5, sliceMd5, fileSize, err := RapidUploadMd5(fileId)

qt/tool-chain/cmd/deploy/deploy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ func Deploy(mode, target, path string, docker bool, ldFlags, tags string, fast b
7070
}
7171

7272
//rcc.Rcc(path, target, tags, os.Getenv("QTRCC_OUTPUT_DIR"))
73-
if !fast {
73+
if false && !fast {
7474
moc.Moc(path, target, tags, false, false)
7575
}
7676

77-
if ((!fast || utils.QT_STUB()) || ((target == "js" || target == "wasm") && (utils.QT_DOCKER() || utils.QT_VAGRANT()))) && !utils.QT_FAT() {
77+
if false && ((!fast || utils.QT_STUB()) || ((target == "js" || target == "wasm") && (utils.QT_DOCKER() || utils.QT_VAGRANT()))) && !utils.QT_FAT() {
7878
minimal.Minimal(path, target, tags)
7979
}
8080

0 commit comments

Comments
 (0)