1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

add makefile for the windows version

This commit is contained in:
Zack Scholl 2018-10-17 16:57:36 -07:00
parent 24e0573116
commit 4ee008225e
2 changed files with 16 additions and 1 deletions

13
src/win/Makefile Normal file
View file

@ -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

View file

@ -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())