Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
|
b3dc0e265e | |
|
953a1cd5d5 | |
|
7396af67a1 | |
|
edfa36b419 | |
|
dbc9206065 | |
|
0383207f72 | |
|
2da89882e5 | |
|
df9e3f857e |
108
Makefile
108
Makefile
|
@ -1,97 +1,27 @@
|
||||||
.PHONY: debian
|
.PHONY: build
|
||||||
|
|
||||||
|
VERSION = $(shell git describe --tags)
|
||||||
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
all: build debian
|
all: build
|
||||||
# GO111MODULE=off go build -o build main.go
|
./go-gui-toolkits
|
||||||
|
ls -l ~/go/lib/go-gui/
|
||||||
|
|
||||||
build: nocui gocui andlabs
|
build: goimports
|
||||||
|
GO111MODULE=off go build \
|
||||||
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
|
|
||||||
|
verbose:
|
||||||
|
GO111MODULE=off go build -v -x \
|
||||||
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
|
|
||||||
|
install:
|
||||||
|
GO111MODULE=off go install \
|
||||||
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
|
|
||||||
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 ../*.so
|
rm -f ~/go/lib/go-gui/*.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
|
|
||||||
|
|
|
@ -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 get -v go.wit.com/toolkits/debian
|
go install go.wit.com/apps/go-clone@latest
|
||||||
|
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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
9
build
9
build
|
@ -1,9 +1,6 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
|
|
||||||
make -C ../../toolkits/nocui
|
# make build
|
||||||
make -C ../../toolkits/gocui
|
|
||||||
make -C ../../toolkits/andlabs
|
|
||||||
make -C ../../toolkits/pixelgl
|
|
||||||
|
|
||||||
mkdir -p files/usr/lib/go-gui
|
mkdir -p files/usr/lib/go-gui-toolkits
|
||||||
cp ../../toolkits/*.so files/usr/lib/go-gui/
|
cp -a ~/go/lib/go-gui/*.so files/usr/lib/go-gui-toolkits/
|
||||||
|
|
2
control
2
control
|
@ -1,4 +1,6 @@
|
||||||
Maintainer: Jeff Carr <jcarr@wit.com>
|
Maintainer: Jeff Carr <jcarr@wit.com>
|
||||||
|
Depends:
|
||||||
|
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
|
||||||
|
|
35
main.go
35
main.go
|
@ -1,29 +1,30 @@
|
||||||
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() {
|
||||||
myGui = gui.New().Default()
|
forge := forgepb.Init()
|
||||||
myGui.LoadToolkit("nocui")
|
all := forge.Repos.SortByFullPath()
|
||||||
|
for all.Scan() {
|
||||||
|
check := all.Next()
|
||||||
|
|
||||||
buildworld()
|
repotype := check.GetRepoType()
|
||||||
gui.Watchdog()
|
if repotype != "plugin" {
|
||||||
|
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")
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue