diff options
| author | Jeff Carr <[email protected]> | 2024-11-07 16:54:16 -0600 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-07 16:54:16 -0600 | 
| commit | af99bd179c75f331497dbdc23e83b9e6c0a5f349 (patch) | |
| tree | 89876d7e9350994c454cba648559f47c870f48d9 | |
| parent | 3133bb0801bcfd3912e994d67349443fd3230512 (diff) | |
include toolkit resources in binaryv0.21.2
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | argv.go | 2 | ||||
| -rw-r--r-- | main.go | 9 | 
3 files changed, 12 insertions, 2 deletions
@@ -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 @@ -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 { @@ -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()  | 
