fix assetPath on windows #354
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
main.go
5
main.go
|
@ -25,6 +25,7 @@ import (
|
|||
mrand "math/rand"
|
||||
"os"
|
||||
"os/user"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"time"
|
||||
|
@ -168,8 +169,10 @@ func mainUi(flagLocal bool, flagClientUI bool) {
|
|||
if runtime.GOOS == "windows" {
|
||||
dir = "/" + dir
|
||||
}
|
||||
gcd.SetAssetPath("file://" + filepath.Join(dir, "assets") + "/")
|
||||
// QML uses '/' regardless of platform (so we use path.Join here not filepath.Join)
|
||||
gcd.SetAssetPath("file://" + path.Join(dir, "assets") + "/")
|
||||
}
|
||||
log.Infof("gcd.assetPath = '%v'\n", gcd.AssetPath())
|
||||
|
||||
if buildVer != "" {
|
||||
gcd.SetVersion(buildVer)
|
||||
|
|
Reference in New Issue