diff --git a/Makefile b/Makefile index 7e46b2d..d913ece 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,9 @@ no-gui: build ./go-deb --no-gui --repo go.wit.com/apps/autotypist build: + -rm resources/*.so + # embed the ncurses gui plugin + -cp -a ~/go/src/go.wit.com/toolkits/gocui.so resources/ GO111MODULE="off" go build -v install: diff --git a/main.go b/main.go index 921a787..f7bc634 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( + "embed" "os" "path/filepath" @@ -20,6 +21,9 @@ var cBox *controlBox // this is a basic window. the user can open and close it var basicWindow *gadgets.BasicWindow +//go:embed resources/* +var resources embed.FS + func main() { if argv.Repo == "" { log.Info("You need to tell me what repo you want to work on") @@ -28,6 +32,7 @@ func main() { os.Exit(0) } myGui = gui.New() + myGui.InitEmbed(resources) myGui.Default() basicWindow = makebasicWindow()