closer to purer plugin testing
This commit is contained in:
parent
9d965ee05a
commit
6f08f22ca8
11
Makefile
11
Makefile
|
@ -1,13 +1,16 @@
|
||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
all: plugin
|
all: andlabs.so
|
||||||
|
|
||||||
plugin:
|
andlabs.so:
|
||||||
GO111MODULE=off go build -v -x -buildmode=plugin -o 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:
|
install:
|
||||||
rm -f andlabs.so
|
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:
|
goget:
|
||||||
GO111MODULE="off" go get -v -t -u
|
GO111MODULE="off" go get -v -t -u
|
||||||
|
|
4
main.go
4
main.go
|
@ -14,6 +14,10 @@ import (
|
||||||
_ "go.wit.com/dev/andlabs/ui/winmanifest"
|
_ "go.wit.com/dev/andlabs/ui/winmanifest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// sent via -ldflags
|
||||||
|
var VERSION string
|
||||||
|
var BUILDTIME string
|
||||||
|
|
||||||
var uiMainUndef bool = true
|
var uiMainUndef bool = true
|
||||||
var uiMain sync.Once
|
var uiMain sync.Once
|
||||||
var muAction sync.Mutex
|
var muAction sync.Mutex
|
||||||
|
|
Loading…
Reference in New Issue