Skip to content

Commit

Permalink
Fix packaging on Windows
Browse files Browse the repository at this point in the history
And also improve to use the "build gui" flag
Fixes #586
  • Loading branch information
andydotxyz committed Dec 24, 2019
1 parent 11fcb2e commit e93855f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ More detailed release notes can be found on the [releases page](https://github.c
* Issues when settings changes may not be monitored (#576)
* Layout of hidden tab container contents on mobile (#578)
* Mobile apps would not quit when Quit() was called (#580)
* Fyne package could fail on Windows (#586)


## 1.2 - 12 December 2019
Expand Down
9 changes: 7 additions & 2 deletions cmd/fyne/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ func (b *builder) build() error {
goos = runtime.GOOS
}

cmd := exec.Command("go", "build", b.srcdir)
var cmd *exec.Cmd
if goos == "windows" {
cmd = exec.Command("go", "build", "-ldflags", "-H=windowsgui", ".")
} else {
cmd = exec.Command("go", "build", ".")
}
cmd.Dir = b.srcdir
env := os.Environ()
env = append(env, "GOOS=", goos)
env = append(env, "GOOS="+goos)
cmd.Env = env

out, err := cmd.CombinedOutput()
Expand Down

0 comments on commit e93855f

Please sign in to comment.