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"
|
mrand "math/rand"
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
@ -168,8 +169,10 @@ func mainUi(flagLocal bool, flagClientUI bool) {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
dir = "/" + dir
|
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 != "" {
|
if buildVer != "" {
|
||||||
gcd.SetVersion(buildVer)
|
gcd.SetVersion(buildVer)
|
||||||
|
|
Reference in New Issue