Compare commits

..

No commits in common. "master" and "v0.22.2" have entirely different histories.

7 changed files with 171 additions and 34 deletions

View File

@ -1,13 +1,12 @@
.PHONY: build .PHONY: debian
VERSION = $(shell git describe --tags) VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d) BUILDTIME = $(shell date +%Y.%m.%d)
all: build all: build
./go-gui-toolkits @echo fixme
ls -l ~/go/lib/go-gui/
build: goimports build:
GO111MODULE=off go build \ GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
@ -19,9 +18,94 @@ install:
GO111MODULE=off go install \ GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
build:
goimports: goimports:
reset
goimports -w *.go goimports -w *.go
# Test the README.md & doc.go file
# this runs pkgsite, the binary that does dev.go.dev
# go install golang.org/x/pkgsite/cmd/pkgsite@latest
pkgsite:
GO111MODULE= pkgsite
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
download:
go get -v go.wit.com/toolkits/debian
go get -v go.wit.com/toolkits/tree
go get -v go.wit.com/toolkits/nocui
go get -v go.wit.com/toolkits/gocui
go get -v go.wit.com/toolkits/andlabs
notes:
ifeq ($(GO111MODULE),)
@echo
@echo If you are compiling this here, you probably want to set GO111MODULE
@echo
@echo Setting GO111MODULE means that the version you are compiling has plugins
@echo that get compiled against this current running version of the code
@echo Otherwise, the GO language plugins can complain about being compiled against
@echo mis-matched versions
@echo
@echo export GO111MODULE=off
@echo
sleep 1
endif
make nocui gocui andlabs
nocui:
# go build -C nocui -v -buildmode=plugin -o ../nocui.so
make -C ../nocui
gocui:
# go build -C gocui -v -buildmode=plugin -o ../gocui.so
make -C ../gocui
andlabs:
# go build -C andlabs -v -buildmode=plugin -o ../andlabs.so
make -C ../andlabs
build-dep:
apt install -f libgtk-3-dev
# should update every go dependancy (?)
update:
git pull
go get -v -t -u ./...
debian:
cd debian && make
@#dpkg-deb -c ../go-gui-toolkit*.deb
@#-wit mirrors
goget:
go get -v -t -u
make -C toolkit/gocui goget
make -C toolkit/andlabs goget
clean: clean:
rm -f ~/go/lib/go-gui/*.so rm -f ../*.so
cd debian && make clean
plugins: plugins-gocui plugins-andlabs
plugins-gocui:
go build -C toolkit/gocui -v -buildmode=plugin -o ../gocui.so
go build -C toolkit/nocui -v -buildmode=plugin -o ../nocui.so
plugins-andlabs:
go build -C toolkit/andlabs -v -buildmode=plugin -o ../andlabs.so
objdump:
objdump -t toolkit/andlabs.so |less
log:
reset
tail -f /tmp/witgui.* /tmp/guilogfile
submit-to-docs:
GOPROXY=https://proxy.golang.org GO111MODULE=on go get go.wit.com/gui@v1.0.0

View File

@ -13,13 +13,13 @@ because the underlying OS is proprietary. Whenever possible, the Linux ones are
To build all the toolkits so you can build your own GUI applications: To build all the toolkits so you can build your own GUI applications:
```go ```go
go install go.wit.com/apps/go-clone@latest go get -v go.wit.com/toolkits/debian
go-clone go.wit.com/toolkits/debian
cd ~/go/src/toolkits/debian cd ~/go/src/toolkits/debian
make make
``` ```
To build the go-gui-toolkits .deb package: To build the go-gui-toolkits .deb package:
```go ```go
go get go.wit.com/apps/go-deb@latest
go-deb go.wit.com/apps/go-gui-toolkits go-deb go.wit.com/apps/go-gui-toolkits
``` ```

18
build
View File

@ -1,6 +1,18 @@
#!/bin/bash -x #!/bin/bash -x
# make build make -C ../../toolkits/nocui
make -C ../../toolkits/gocui
make -C ../../toolkits/andlabs
make -C ../../toolkits/pixelgl
mkdir -p files/usr/lib/go-gui-toolkits mkdir -p files/usr/lib/go-gui
cp -a ~/go/lib/go-gui/*.so files/usr/lib/go-gui-toolkits/ cp ../../toolkits/*.so files/usr/lib/go-gui/
# add the sources list file here until
# there is a seperate package for this
mkdir -p files/etc/apt/sources.list.d/
cp resources/wit.list files/etc/apt/sources.list.d/
# add the key for the wit repo
mkdir -p files/etc/apt/trusted.gpg.d/
cp resources/wit-public-key.asc files/etc/apt/trusted.gpg.d/

View File

@ -1,6 +1,5 @@
Maintainer: Jeff Carr <jcarr@wit.com> Maintainer: Jeff Carr <jcarr@wit.com>
Depends: Depends: chafa
Architecture: amd64
Build-Depends: golang Build-Depends: golang
Recommends: libgtk-3-0 Recommends: libgtk-3-0
Description: The GUI toolkit plugins Description: The GUI toolkit plugins

41
main.go
View File

@ -1,30 +1,29 @@
package main package main
import ( import (
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/log" "go.wit.com/log"
"go.wit.com/gui"
) )
var myGui *gui.Node // This is the beginning of the binary tree of widgets
// go will sit here until the window exits // go will sit here until the window exits
func main() { func main() {
forge := forgepb.Init() myGui = gui.New().Default()
all := forge.Repos.SortByFullPath() // myGui.LoadToolkit("nocui")
for all.Scan() {
check := all.Next()
repotype := check.GetRepoType() buildworld()
if repotype != "plugin" { gui.Watchdog()
continue }
}
// This initializes the first window, a group and a button
if forge.Config.IsReadOnly(check.GetGoPath()) { func buildworld() {
// ignore read only stuff window := myGui.NewWindow("build world")
continue
} box := window.NewBox("vbox", false)
group := box.NewGroup("groupy")
log.Info("STARTING 'make install' in", check.GetGoPath()) grid := group.NewGrid("gridiron", 2, 1)
if err := forge.Install(check, nil); err != nil { grid.NewButton("build", func() {
log.Warn("INSTALL FAILED", check.GetGoPath(), err) log.Println("make something to build everything")
} })
}
} }

View File

@ -0,0 +1,41 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGC6jbgBDACmFK7p+f/hWpNfBJVf0vuq7PP8Pn05qnM1bUU2rlYybXj3nrwU
yd4RjIA8AhEPuyQPMk4S6i0JJa1OLFlaJpQVJdEBHdr0eQsX/kPDE8fTnB7CS1Xw
8CQVwBHpJ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QzIe2YYqFjuL8SzOglzcv8oefVTG05AfJIhH210fJdOJTQEc2TfTK3U9
+aQgnsKpizN/VD/E1IwoltuyX0ghU+sHZOg=
=BlSA
-----END PGP PUBLIC KEY BLOCK-----

2
resources/wit.list Normal file
View File

@ -0,0 +1,2 @@
deb http://mirrors.wit.com/wit/ sid main
deb-src http://mirrors.wit.com/wit/ sid main