Skip to content

Commit

Permalink
build darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
peterq committed Jun 29, 2019
1 parent 4a9adce commit 806497b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pan-light.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
11 changes: 11 additions & 0 deletions pc/pan-download/pan-download.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions qt/tool-chain/cmd/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 806497b

Please sign in to comment.