From f2a4c616105004e3d77cab4aa8255cef3f78c933 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 28 Oct 2020 16:58:15 -0700 Subject: [PATCH] fix assetPath on windows (#354) Merge branch 'master' into winassetPath fix assetDir path on windows Co-authored-by: Sarah Jamie Lewis Co-authored-by: Dan Ballard Reviewed-on: https://git.openprivacy.ca/cwtch.im/ui/pulls/354 --- i18n/translation_de.qm | Bin 3211 -> 3221 bytes i18n/translation_fr.qm | Bin 3125 -> 3135 bytes i18n/translation_pt.qm | Bin 2923 -> 2933 bytes main.go | 5 ++++- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/i18n/translation_de.qm b/i18n/translation_de.qm index 371e5a8364da467ae9ee9152dca9bdce9795fee1..9ec5da3e8635a0e59f8dcdc2c3921865a0c80bb0 100644 GIT binary patch delta 35 rcmeB{oGK}0vm-^~)cZM8&nn97PguD3?s5hO2G*3+co)}=0@XYK37QSi delta 25 hcmbO#*)1txvm-^~)cZM8&nn97PguD3?nbF<9srHA3v&Pf diff --git a/i18n/translation_fr.qm b/i18n/translation_fr.qm index 42e1df36cf2b6a7e640c4cff2a4dbca8740d16a2..e13d08626af42d5bbe2a2b8850d81a9098ddfa18 100644 GIT binary patch delta 35 rcmdlgv0p;UW=D#|srPfHo>i3DpRjQ6-Q^4n46JEI@oqsI1yp$e6q^m| delta 25 hcmdllu~kCAW=D#|srPfHo>i3DpRjQ6-HlSJJOGrr3vU1b diff --git a/i18n/translation_pt.qm b/i18n/translation_pt.qm index f0ec24706be7a09648130b9059bb25e1e9f6e956..8c6f6d5924f6021ff4ad7f7e12d4cdee240f1822 100644 GIT binary patch delta 35 rcmaDY_Ek*EW=D#|srPfHo>i3DpRjQ6-Q^4n46Fqu@lHV-1){kDBPi3DpRjQ6-HlSw+yI{F3=9AO diff --git a/main.go b/main.go index 40aae889..8b91a035 100644 --- a/main.go +++ b/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)