fix assetPath on windows (#354)
the build was successful Details

Merge branch 'master' into winassetPath

fix assetDir path on windows

Co-authored-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
Co-authored-by: Dan Ballard <dan@mindstab.net>
Reviewed-on: #354
This commit is contained in:
Dan Ballard 2020-10-28 16:58:15 -07:00 committed by Sarah Jamie Lewis
parent a247fd91c0
commit f2a4c61610
4 changed files with 4 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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)