From 161f3934ceab7943445389daf199ad3901c091e8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 7 Nov 2024 13:30:17 -0600 Subject: update to also embed toolkit plugins in the binary Signed-off-by: Jeff Carr --- main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 2204571..df6c40f 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,8 @@ -// This creates a simple hello world window package main import ( + "embed" + "go.wit.com/gui" "go.wit.com/lib/debugger" "go.wit.com/lib/gadgets" @@ -9,9 +10,15 @@ import ( "go.wit.com/log" ) +// sent via -ldflags +var VERSION string + // This is the beginning of the binary tree of widgets var myGui *gui.Node +//go:embed resources/* +var resources embed.FS + // this is the primary window. If you close it, the program will exit var mainWindow *gui.Node @@ -28,6 +35,7 @@ func main() { log.ShowFlags() } myGui = gui.New() + myGui.InitEmbed(resources) myGui.Default() helloworld() -- cgit v1.2.3