From 4ee008225e0b1c5d6087fc519ec6a4803c5b9567 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Wed, 17 Oct 2018 16:57:36 -0700 Subject: [PATCH] add makefile for the windows version --- src/win/Makefile | 13 +++++++++++++ src/win/main.go | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/win/Makefile diff --git a/src/win/Makefile b/src/win/Makefile new file mode 100644 index 0000000..61a862d --- /dev/null +++ b/src/win/Makefile @@ -0,0 +1,13 @@ +VERSION=$(shell git describe --abbrev=0) +LDFLAGS=-ldflags "-X main.Version=${VERSION}" + +.PHONY: linux +linux: + GO111MODULE=off qtdeploy ${LDFLAGS} --tags='wincroc' --debug build desktop + +.PHONY: fast +fast: + GO111MODULE=off qtdeploy ${LDFLAGS} --fast --tags='wincroc' --debug build desktop + +windows: + GO111MODULE=off qtdeploy ${LDFLAGS} --tags='wincroc' --debug --docker build windows_64_static \ No newline at end of file diff --git a/src/win/main.go b/src/win/main.go index 1cbb4cb..cc266f3 100644 --- a/src/win/main.go +++ b/src/win/main.go @@ -21,6 +21,8 @@ type CustomLabel struct { _ func(string) `signal:"updateTextFromGoroutine,auto(this.QLabel.setText)"` //TODO: support this.setText as well } +var Version string + func main() { if len(os.Args) > 1 { cli.Run() @@ -32,7 +34,7 @@ func main() { window := widgets.NewQMainWindow(nil, 0) window.SetFixedSize2(400, 150) - window.SetWindowTitle("🐊📦 croc") + window.SetWindowTitle("🐊📦 croc " + Version) widget := widgets.NewQWidget(nil, 0) widget.SetLayout(widgets.NewQVBoxLayout())