diff --git a/Makefile b/Makefile index d94a15f..ac78871 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ VERSION = $(shell git describe --tags) all: + -rm resources/*.so + touch resources/blank.so + -cp -a ~/go/src/go.wit.com/toolkits/*.so resources/ # embed the toolkit plugins in the binary GO111MODULE=off go build -v -x \ -ldflags "-X main.VERSION=${VERSION}" ./helloworld diff --git a/argv.go b/argv.go index 4183d11..429b61c 100644 --- a/argv.go +++ b/argv.go @@ -15,7 +15,7 @@ import ( var argv args type args struct { - Demo string `arg:"positional" help:"this is just a demo"` + Demo string `arg:"positional" help:"this is just a demo"` } func (a args) Description() string { diff --git a/main.go b/main.go index 090a612..ac0e8ec 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,8 @@ package main import ( + "embed" + "go.wit.com/gui" "go.wit.com/log" ) @@ -11,8 +13,13 @@ var VERSION string // This is the beginning of our binary tree of widgets var myGui *gui.Node +//go:embed resources/* +var resources embed.FS + func main() { - myGui = gui.New().Default() + myGui = gui.New() + myGui.InitEmbed(resources) + myGui.Default() helloworld()