2024-11-07 13:18:26 -06:00
|
|
|
VERSION = $(shell git describe --tags)
|
2024-11-16 00:05:55 -06:00
|
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
2024-11-07 13:18:26 -06:00
|
|
|
|
2024-01-17 03:02:12 -06:00
|
|
|
all: build
|
2024-01-17 20:26:07 -06:00
|
|
|
./basicwindow
|
2024-01-16 16:37:43 -06:00
|
|
|
|
2024-01-17 03:02:12 -06:00
|
|
|
build:
|
2024-11-16 00:05:55 -06:00
|
|
|
GO111MODULE=off go build \
|
|
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
|
|
|
|
verbose:
|
2024-11-07 13:18:26 -06:00
|
|
|
GO111MODULE=off go build -v -x \
|
2024-11-16 00:05:55 -06:00
|
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
|
|
|
|
install:
|
|
|
|
GO111MODULE=off go install \
|
|
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f gadgetwindow
|
2024-01-17 03:02:12 -06:00
|
|
|
|
2024-11-16 00:05:55 -06:00
|
|
|
# embed the toolkit plugins in the binary
|
|
|
|
embed:
|
|
|
|
-rm resources/*.so
|
|
|
|
touch resources/blank.so
|
|
|
|
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
|
2024-01-17 03:02:12 -06:00
|
|
|
|
2024-02-12 10:04:36 -06:00
|
|
|
gocui:
|
2024-11-16 00:05:55 -06:00
|
|
|
./basicwindow --gui gocui
|
2024-02-12 10:04:36 -06:00
|
|
|
|
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
2024-11-16 00:05:55 -06:00
|
|
|
# // to globally reset paths:
|
|
|
|
# // gofmt -w -r "go.wit.com/gui -> go.wit.com/gui/gui" .
|
2024-01-16 16:37:43 -06:00
|
|
|
|
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
2024-01-18 19:08:33 -06:00
|
|
|
goimports -w *.go
|
2024-01-16 16:37:43 -06:00
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|
|
|
|
|