attempt to embedded gocui plugin toolkit
This commit is contained in:
parent
ef1a306352
commit
4721184398
6
Makefile
6
Makefile
|
@ -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
|
||||
|
|
6
doGui.go
6
doGui.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()
|
||||
|
|
6
main.go
6
main.go
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
Loading…
Reference in New Issue