summaryrefslogtreecommitdiff
path: root/globalResetOptions.go
diff options
context:
space:
mode:
Diffstat (limited to 'globalResetOptions.go')
-rw-r--r--globalResetOptions.go60
1 files changed, 60 insertions, 0 deletions
diff --git a/globalResetOptions.go b/globalResetOptions.go
index bf6f5cb..390cda2 100644
--- a/globalResetOptions.go
+++ b/globalResetOptions.go
@@ -1,6 +1,7 @@
package main
import (
+ "os"
"path/filepath"
"go.wit.com/gui"
@@ -9,6 +10,7 @@ import (
func globalResetOptions(box *gui.Node) {
group2 := box.NewGroup("Global Destructive Options")
+ globalTestingOptions(group2)
buildOptions := group2.NewGrid("buildOptions", 2, 1)
buildOptions.NewLabel("start over")
@@ -36,3 +38,61 @@ func globalResetOptions(box *gui.Node) {
}
})
}
+
+// things being testing
+func globalTestingOptions(box *gui.Node) {
+
+ var listallB *gui.Node
+ listallB = box.NewButton("go.wit.com/list", func() {
+ listallB.Disable()
+ listWindow()
+ listallB.Enable()
+ })
+
+ me.autoRebuildButton = box.NewButton("rebuild autotypist", func() {
+ me.autoRebuildButton.Disable()
+ me.autoRebuildButton.SetLabel("running....")
+ attemptAutoRebuild()
+ me.autoRebuildButton.Enable()
+ me.autoRebuildButton.SetLabel("rebuild autotypist")
+ })
+
+ me.stopOnErrors = box.NewCheckbox("Stop on errors")
+ me.stopOnErrors.SetChecked(true)
+
+ me.autoDryRun = box.NewCheckbox("autotypist --dry-run")
+ me.autoDryRun.SetChecked(true)
+}
+
+func attemptAutoRebuild() {
+ os.Setenv("GO111MODULE", "off")
+
+ homeDir := me.userHomePwd.String()
+ fullpath := filepath.Join(homeDir, "go")
+ quickCmd(fullpath, []string{"mkdir", "-p", "src/go.wit.com/apps/"})
+
+ fullpath = filepath.Join(homeDir, "go/src/go.wit.com/apps/")
+
+ quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/apps/autotypist"})
+ quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/debian"})
+ quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/tree"})
+ quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/nocui"})
+ quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/gocui"})
+ quickCmd(fullpath, []string{"go", "get", "-v", "go.wit.com/toolkits/andlabs"})
+
+ fullpath = filepath.Join(homeDir, "go/src/go.wit.com/toolkits/nocui/")
+ quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."})
+ quickCmd(fullpath, []string{"go", "build", "-v", "-x", "-buildmode=plugin", "-o", "../nocui.so"})
+
+ fullpath = filepath.Join(homeDir, "go/src/go.wit.com/toolkits/gocui/")
+ quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."})
+ quickCmd(fullpath, []string{"go", "build", "-v", "-x", "-buildmode=plugin", "-o", "../gocui.so"})
+
+ fullpath = filepath.Join(homeDir, "go/src/go.wit.com/toolkits/andlabs/")
+ quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."})
+ quickCmd(fullpath, []string{"go", "build", "-v", "-x", "-buildmode=plugin", "-o", "../andlabs.so"})
+
+ fullpath = filepath.Join(homeDir, "go/src/go.wit.com/apps/autotypist")
+ quickCmd(fullpath, []string{"go", "get", "-v", "-u", "."})
+ quickCmd(fullpath, []string{"go", "build", "-v", "-x"})
+}