autotypist/globalBuildOptions.go

35 lines
786 B
Go
Raw Permalink Normal View History

package main
import (
"os"
"go.wit.com/gui"
"go.wit.com/lib/gadgets"
)
func globalBuildOptions(vbox *gui.Node) {
group1 := vbox.NewGroup("Global Build Options")
2024-02-16 17:55:53 -06:00
grid := group1.NewGrid("buildOptions", 0, 0)
// me.autoWorkingPwd = gadgets.NewOneLiner(grid, "working directory (pwd)")
me.userHomePwd = gadgets.NewOneLiner(grid, "user home")
2024-02-16 17:55:53 -06:00
grid.NextRow()
me.goSrcPwd = gadgets.NewOneLiner(grid, "go src home")
2024-02-16 17:55:53 -06:00
grid.NextRow()
2024-11-13 11:56:58 -06:00
me.stopOnErrors = grid.NewCheckbox("Stop on errors").SetChecked(true)
grid.NextRow()
me.autoDryRun = grid.NewCheckbox("autotypist --dry-run")
me.autoDryRun.Custom = func() {
if me.autoDryRun.Checked() {
os.Setenv("REPO_DRYRUN", "on")
} else {
os.Setenv("REPO_DRYRUN", "off")
}
}
me.autoDryRun.SetChecked(true)
grid.NextRow()
}