summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-05 19:08:29 -0600
committerJeff Carr <[email protected]>2024-12-05 19:08:29 -0600
commit6f08f22ca86e95c3bd8b130773704066d9dcb3c8 (patch)
tree8f7504e202f68d41e5823914fdeca9340b0931f0
parent9d965ee05af4e2bc6a197eba29c8fe9fad75b5d0 (diff)
closer to purer plugin testingv0.22.7
-rw-r--r--Makefile11
-rw-r--r--main.go4
2 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 2d44646..30a7a46 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,16 @@
VERSION = $(shell git describe --tags)
+BUILDTIME = $(shell date +%Y.%m.%d)
-all: plugin
+all: andlabs.so
-plugin:
- GO111MODULE=off go build -v -x -buildmode=plugin -o andlabs.so
+andlabs.so:
+ GO111MODULE=off go build -v -buildmode=plugin -o andlabs.so \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
install:
rm -f andlabs.so
- go build -buildmode=plugin -o ~/go/lib/andlabs-${VERSION}.so
+ go build -v -buildmode=plugin -o ~/go/lib/andlabs-${VERSION}.so \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
goget:
GO111MODULE="off" go get -v -t -u
diff --git a/main.go b/main.go
index 916a781..add53a2 100644
--- a/main.go
+++ b/main.go
@@ -14,6 +14,10 @@ import (
_ "go.wit.com/dev/andlabs/ui/winmanifest"
)
+// sent via -ldflags
+var VERSION string
+var BUILDTIME string
+
var uiMainUndef bool = true
var uiMain sync.Once
var muAction sync.Mutex