diff --git a/src/win/Makefile b/src/win/Makefile new file mode 100644 index 00000000..61a862df --- /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 1cbb4cba..cc266f34 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())