summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-14 22:15:13 -0600
committerJeff Carr <[email protected]>2024-12-14 22:15:13 -0600
commitedfa36b419e0be1a46ee8150e408b08ef381ed02 (patch)
tree3f59bc2b644c4be38d984dd1c855bfd51eef07fe
parentdbc9206065c47746e1ee493d3a1d9c48306584b2 (diff)
-rw-r--r--Makefile96
-rwxr-xr-xbuild16
-rw-r--r--main.go37
3 files changed, 27 insertions, 122 deletions
diff --git a/Makefile b/Makefile
index fadf5c0..675ce32 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
-.PHONY: debian
+.PHONY: build
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: build
- @echo fixme
+ ./go-gui-toolkits
+ ls -l ~/go/lib/go-gui/
-build:
+build: goimports
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
@@ -18,94 +19,9 @@ install:
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
-build:
-
goimports:
+ reset
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:
- 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/[email protected]
+ rm -f ~/go/lib/go-gui/*.so
diff --git a/build b/build
index 4b65076..2066176 100755
--- a/build
+++ b/build
@@ -1,18 +1,6 @@
#!/bin/bash -x
-make -C ../../toolkits/nocui
-make -C ../../toolkits/gocui
-make -C ../../toolkits/andlabs
-make -C ../../toolkits/pixelgl
+# make build
mkdir -p files/usr/lib/go-gui
-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/
+cp ~/go/lib/go-gui/*.so files/usr/lib/go-gui/
diff --git a/main.go b/main.go
index 7f78565..03e8786 100644
--- a/main.go
+++ b/main.go
@@ -1,29 +1,30 @@
package main
-import (
+import (
+ "go.wit.com/lib/protobuf/forgepb"
"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
func main() {
- myGui = gui.New().Default()
- // myGui.LoadToolkit("nocui")
+ forge := forgepb.Init()
+ all := forge.Repos.SortByGoPath()
+ for all.Scan() {
+ check := all.Next()
- buildworld()
- gui.Watchdog()
-}
+ repotype := check.RepoType()
+ if repotype != "plugin" {
+ continue
+ }
-// This initializes the first window, a group and a button
-func buildworld() {
- window := myGui.NewWindow("build world")
+ if forge.Config.IsReadOnly(check.GoPath) {
+ // ignore read only stuff
+ continue
+ }
- box := window.NewBox("vbox", false)
- group := box.NewGroup("groupy")
- grid := group.NewGrid("gridiron", 2, 1)
- grid.NewButton("build", func() {
- log.Println("make something to build everything")
- })
+ log.Info("STARTING 'make install' in", check.GoPath)
+ if err := forge.Install(check, nil); err != nil {
+ log.Warn("INSTALL FAILED", check.GoPath, err)
+ }
+ }
}