diff options
| author | Jeff Carr <[email protected]> | 2025-01-20 05:08:52 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-20 05:08:52 -0600 |
| commit | 4721184398013ac30160bc5bbde5244256f15d88 (patch) | |
| tree | 618520cfed22daf36276205835bdc94e92f7ab94 | |
| parent | ef1a3063527e17507af88c644ca1ef7851ab53b0 (diff) | |
attempt to embedded gocui plugin toolkitv0.22.58
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | doGui.go | 6 | ||||
| -rw-r--r-- | main.go | 6 | ||||
| -rw-r--r-- | resources/forge.text | 25 |
4 files changed, 42 insertions, 1 deletions
@@ -14,10 +14,14 @@ verbose: GO111MODULE=off go build -v -x \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" -install: goimports vet +install: goimports vet plugin GO111MODULE=off go install \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" +plugin: + rm -f resources/*.so + cp ~/go/lib/gocui.so resources/ + goimports: reset goimports -w *.go @@ -26,7 +26,13 @@ func debug() { } func doGui() { + if me.forge.Config.GetDefaultGui() == "" { + me.forge.Config.DefaultGui = "gocui" + me.forge.ConfigSave() + } me.myGui = gui.New() + me.myGui.InitEmbed(resources) + me.myGui.SetAppDefaultPlugin(me.forge.Config.DefaultGui) // sets the default GUI plugin to use me.myGui.Default() // debug() @@ -3,6 +3,7 @@ package main // An app to submit patches for the 30 GO GUI repos import ( + "embed" "os" "strings" @@ -17,6 +18,11 @@ import ( var VERSION string var BUILDTIME string +// this optionally can store the GUI plugins +// +//go:embed resources/* +var resources embed.FS + // used for shell auto completion var ARGNAME string = "forge" diff --git a/resources/forge.text b/resources/forge.text new file mode 100644 index 0000000..3ad9842 --- /dev/null +++ b/resources/forge.text @@ -0,0 +1,25 @@ +# this file is automatically re-generated from forge.pb, however, +# if you want to edit it by hand, you can: +# stop forge; remove forge.pb; edit forge.text; start forge +# this will cause the default behavior to fallback to parsing this file for the config + +# this file is intended to be used to customize settings on what +# git repos you have write access to. That is, where you can run 'git push' + +ForgeConfigs: { + goPath: "go.wit.com" + writable: true + directory: true +} +repos: { + goPath: "go.wit.com/apps/zookeeper" + debName: "zookeeper-go" +} +xterm: "xterm" +xtermArgv: "-bg" +xtermArgv: "black" +xtermArgv: "-fg" +xtermArgv: "white" +xtermArgv: "-geometry" +xtermArgv: "140x32" +xtermArgv: "-e" |
