summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--main.go6
2 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6ffa75c..ba8afbc 100644
--- a/Makefile
+++ b/Makefile
@@ -33,10 +33,14 @@ vet:
build:
echo "build it!"
+ -rm resources/*.so
+ cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
GO111MODULE=off go build -v -x -ldflags " \
-X main.VERSION=${VERSION}"
install:
+ -rm resources/*.so
+ cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
GO111MODULE=off go install -v -x -ldflags " \
-X main.VERSION=${VERSION}"
# go install -v -x
diff --git a/main.go b/main.go
index 8e5731e..8cb05e2 100644
--- a/main.go
+++ b/main.go
@@ -1,6 +1,7 @@
package main
import (
+ "embed"
"os"
"path/filepath"
@@ -12,6 +13,10 @@ import (
)
var VERSION string
+
+//go:embed resources/*
+var resources embed.FS
+
var myargs argv
func main() {
@@ -34,6 +39,7 @@ func main() {
os.Unsetenv("GO111MODULE")
me.myGui = gui.New()
+ me.myGui.InitEmbed(resources)
me.myGui.Default()
// our main window