Merge branch 'windows_build' of cwtch.im/ui into master
the build was successful Details

This commit is contained in:
Sarah Jamie Lewis 2020-01-23 14:14:54 -08:00 committed by Gogs
commit dbb7a563f1
2 changed files with 12 additions and 7 deletions

View File

@ -79,8 +79,8 @@ pipeline:
commands:
- export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
- apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git zip
- rm -r vendor
- make clean
- rm -r vendor || true
- make clean || true
- go mod download
- export VERSION=`git describe --tags`
- export BUILDDATE=`date +%G-%m-%d-%H-%M`
@ -126,9 +126,10 @@ pipeline:
- echo $BUILDFILES_KEY > ~/id_rsab64
- base64 -d ~/id_rsab64 > ~/id_rsa
- chmod 400 ~/id_rsa
- git fetch --tags
- export DIR=`date +%G.%m.%d-%H.%M`-`git describe --tags`
- cd deploy
- mkdir windows_build/$DIR
- mkdir -p windows_build/$DIR
- mv cwtch* windows_build/$DIR/
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa windows_build buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
notify-email:

12
main.go
View File

@ -129,13 +129,17 @@ func mainUi(flagLocal bool, flagClientUI bool) {
// our globals
gcd := ui.NewGrandCentralDispatcher(nil)
gcd.SetOs(runtime.GOOS)
ex, err := os.Executable()
if err != nil { log.Errorf("error getting path: %v", err) }
dir := path.Dir(ex)
dir := core.QCoreApplication_ApplicationDirPath()
log.Infof("core.QCoreApplication_ApplicationDirPath(): %v\n", dir)
if runtime.GOOS == "android" {
gcd.SetAssetPath("assets:/")
} else {
gcd.SetAssetPath("file://" + path.Join(dir, "assets") + string(os.PathSeparator))
// all of these access are QML based, and QML takes URIs which use forward slashes and translates them to local OS sperators
// also windows paths need to be like /c:/PATH
if runtime.GOOS == "windows" {
dir = "/" + dir
}
gcd.SetAssetPath("file://" + path.Join(dir, "assets") + "/")
}
if buildVer != "" {