debug embed handling
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
0450de636f
commit
c780a62521
|
@ -3,3 +3,4 @@ wit-new-machine
|
|||
/files/*
|
||||
/*.deb
|
||||
/resources/toolkits/
|
||||
/plugins/
|
||||
|
|
5
Makefile
5
Makefile
|
@ -7,10 +7,9 @@ VERSION = $(shell cat resources/VERSION)
|
|||
|
||||
build:
|
||||
git pull
|
||||
# reset
|
||||
-cp ~/go/src/git.wit.org/wit/gui/toolkit/*.so resources/toolkits/
|
||||
-cp ~/go/src/git.wit.org/wit/gui/toolkit/*.so plugins/
|
||||
GO111MODULE="off" go build -v
|
||||
./wit-new-machine --gui-toolkit gocui >/tmp/witgui.log.stderr 2>&1
|
||||
./wit-new-machine --gui-toolkit gocui >/tmp/witgui.log.stderr 2>&1
|
||||
|
||||
nocui:
|
||||
./wit-new-machine --gui-toolkit nocui
|
||||
|
|
11
main.go
11
main.go
|
@ -20,10 +20,11 @@ var username string
|
|||
var hostname string
|
||||
var geom string = "120x30+500+500"
|
||||
|
||||
|
||||
//go:embed resources
|
||||
var res embed.FS
|
||||
|
||||
//go:embed resources/toolkits
|
||||
//go:embed plugins/*.so
|
||||
var resToolkit embed.FS
|
||||
|
||||
//go:embed resources/ttyS0.conf
|
||||
|
@ -54,9 +55,13 @@ func main() {
|
|||
}
|
||||
|
||||
if (args.GuiToolkit == nil) {
|
||||
myGui = gui.New().InitEmbed(resToolkit).Default()
|
||||
myGui = gui.New().Default()
|
||||
} else {
|
||||
myGui = gui.New().InitEmbed(resToolkit).LoadToolkit(args.GuiToolkit[0])
|
||||
if args.GuiToolkit[0] == "gocui" {
|
||||
myGui = gui.New().LoadToolkit(args.GuiToolkit[0])
|
||||
} else {
|
||||
myGui = gui.New().InitEmbed(resToolkit).LoadToolkit(args.GuiToolkit[0])
|
||||
}
|
||||
}
|
||||
|
||||
drawWindow()
|
||||
|
|
Loading…
Reference in New Issue