2024-02-11 01:00:05 -06:00
|
|
|
// This gets the values for the debian/control file
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.wit.com/gui"
|
|
|
|
"go.wit.com/lib/gadgets"
|
|
|
|
)
|
|
|
|
|
|
|
|
type controlFile struct {
|
|
|
|
group *gui.Node // the group
|
|
|
|
grid *gui.Node // the grid
|
|
|
|
|
|
|
|
Package *gadgets.OneLiner
|
2024-02-11 02:16:51 -06:00
|
|
|
Source *gadgets.OneLiner
|
2024-02-11 03:51:37 -06:00
|
|
|
Version *gadgets.OneLiner
|
2024-02-11 01:00:05 -06:00
|
|
|
Maintainer *gadgets.OneLiner
|
|
|
|
Architecture *gadgets.BasicDropdown
|
|
|
|
InstallPath *gadgets.BasicCombobox
|
|
|
|
Depends *gadgets.OneLiner
|
|
|
|
BuildDepends *gadgets.OneLiner
|
|
|
|
Recommends *gadgets.OneLiner
|
|
|
|
Description *gadgets.OneLiner
|
|
|
|
}
|
|
|
|
|
|
|
|
// This initializes the control box
|
|
|
|
func newControl(parent *gui.Node) *controlFile {
|
|
|
|
var c *controlFile
|
|
|
|
c = new(controlFile)
|
|
|
|
c.group = parent.NewGroup("choices")
|
|
|
|
c.grid = c.group.NewGrid("gridiron", 8, 1)
|
|
|
|
|
|
|
|
c.Package = gadgets.NewOneLiner(c.grid, "Package")
|
|
|
|
c.grid.NextRow()
|
2024-02-11 02:16:51 -06:00
|
|
|
|
|
|
|
c.Source = gadgets.NewOneLiner(c.grid, "Source")
|
|
|
|
c.grid.NextRow()
|
|
|
|
|
2024-02-11 03:51:37 -06:00
|
|
|
c.Version = gadgets.NewOneLiner(c.grid, "Version")
|
|
|
|
c.grid.NextRow()
|
|
|
|
|
2024-02-11 01:00:05 -06:00
|
|
|
c.Architecture = gadgets.NewBasicDropdown(c.grid, "Architecture")
|
|
|
|
c.Architecture.AddText("riscv")
|
|
|
|
c.Architecture.AddText("amd64")
|
|
|
|
c.Architecture.AddText("arm")
|
|
|
|
c.Architecture.AddText("noarch")
|
|
|
|
c.Architecture.AddText("src")
|
|
|
|
c.Architecture.SetText("amd64")
|
|
|
|
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.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.Description = gadgets.NewOneLiner(c.grid, "Description")
|
|
|
|
|
|
|
|
return c
|
|
|
|
}
|
2024-02-11 02:16:51 -06:00
|
|
|
|
|
|
|
func scanConfigFile() {
|
|
|
|
}
|