1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
  | 
// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
// Use of this source code is governed by the GPL 3.0
package main
import (
	"go.wit.com/lib/protobuf/argvpb"
	"go.wit.com/log"
)
// An app to submit patches for the 30 GO GUI repos
func doGui() {
	log.Info("The GUI is disabled for now. This app is under development currently")
	argvpb.GoodExit("it works fine from the command line")
}
/*
func doGuiTODO() {
	log.Warn("init basicWindow state")
	win := gadgets.NewGenericWindow("Create .deb files for GO applications", "things")
	win.Custom = func() {
		log.Info("got to close")
		os.Exit(0)
	}
	var cbox *controlBox
	vbox := win.Middle.Box().Horizontal()
	group1 := vbox.NewGroup("controls").Horizontal() // Vertical()
	group1.NewButton("go build", func() {
		shell.Run([]string{"go", "build", "-v", "-x"})
	})
	group1.NewButton("read control file", func() {
		readControlFile(me.repo)
	})
	group1.NewButton("write control file", func() {
		writeDebianControlFile(me.repo)
	})
	group1.NewButton("dump repo.Control", func() {
		// log.Info("CONTROL:", me.repo.Control)
		for v := range me.repo.Control {
			log.Infof("CONTROL: %s: %s\n", v, me.repo.Control[v])
		}
	})
	group1.NewButton("Make .deb", func() {
		win.Disable()
		if ok, err := buildPackage(me.repo); ok {
			log.Info("build worked")
			os.Exit(0)
		} else {
			log.Warn("build failed with err:", err)
		}
		win.Enable()
	})
	grid := win.Middle.RawGrid()
	cbox = newControl(grid)
	updateControl(cbox)
}
// This initializes the control box
func newControl(grid *gui.Node) *controlBox {
	c := new(controlBox)
	c.grid = grid
	c.Package = gadgets.NewOneLiner(c.grid, "Package")
	c.grid.NextRow()
	c.Source = gadgets.NewOneLiner(c.grid, "Source")
	c.grid.NextRow()
	c.Version = gadgets.NewOneLiner(c.grid, "Version")
	c.grid.NextRow()
	c.Architecture = gadgets.NewBasicDropdown(c.grid, "Architecture")
	c.Architecture.AddText("all")
	c.Architecture.AddText("riscv64")
	c.Architecture.AddText("amd64")
	c.Architecture.AddText("arm64")
	c.Architecture.AddText("ppc64")
	c.Architecture.AddText("i386")
	c.Architecture.AddText("sparc64")
	c.Architecture.AddText("alpha")
	c.Architecture.SetText("riscv64")
	c.grid.NextRow()
	c.InstallPath = gadgets.NewBasicCombobox(c.grid, "Install Path")
	c.InstallPath.AddText("/usr/bin")
	c.InstallPath.AddText("/usr/local/bin")
	c.InstallPath.AddText("/bin")
	c.InstallPath.AddText("/opt/<pkg>/bin")
	c.InstallPath.SetText("/usr/bin")
	c.grid.NextRow()
	c.Maintainer = gadgets.NewOneLiner(c.grid, "Maintainer")
	c.grid.NextRow()
	c.Packager = gadgets.NewBasicEntry(c.grid, "Packager")
	c.grid.NextRow()
	c.GoPath = gadgets.NewBasicEntry(c.grid, "GoPath")
	c.grid.NextRow()
	c.Namespace = gadgets.NewBasicEntry(c.grid, "Namespace")
	c.grid.NextRow()
	c.URL = gadgets.NewBasicEntry(c.grid, "URL")
	c.grid.NextRow()
	c.Depends = gadgets.NewOneLiner(c.grid, "Depends")
	c.grid.NextRow()
	c.BuildDepends = gadgets.NewOneLiner(c.grid, "Build-Depends")
	c.grid.NextRow()
	c.Recommends = gadgets.NewOneLiner(c.grid, "Recommends")
	c.grid.NextRow()
	c.Conflicts = gadgets.NewBasicEntry(c.grid, "Conflicts")
	c.grid.NextRow()
	c.Description = gadgets.NewOneLiner(c.grid, "Description")
	c.Description.SetText("na")
	c.grid.NextRow()
	return c
}
*/
  |