feat: remove ui completely

This commit is contained in:
zarazaex69
2026-05-03 01:32:54 +03:00
parent 71d164729f
commit de006acdc7
13 changed files with 2 additions and 806 deletions

View File

@@ -27,9 +27,9 @@ var (
goarch = envOr("GOARCH", runtime.GOARCH)
)
// Build builds both olcrtc CLI and UI binaries.
// Build builds the olcrtc CLI binary.
func Build() error {
mg.Deps(BuildCLI, BuildUI)
mg.Deps(BuildCLI)
return nil
}
@@ -39,11 +39,6 @@ func BuildCLI() error {
return buildBinary("olcrtc", "./cmd/olcrtc", goos, goarch)
}
// BuildUI builds the Fyne desktop UI binary.
func BuildUI() error {
return buildUIBinary(goos, goarch)
}
// Cross builds olcrtc for all supported platforms.
func Cross() error {
mg.Deps(Deps)
@@ -153,40 +148,6 @@ func buildBinary(name, pkg, os_, arch string) error {
return sh.RunWithV(env, goexe, args...)
}
func buildUIBinary(os_, arch string) error {
if err := ensureBuildDir(); err != nil {
return err
}
ext := ""
if os_ == "windows" {
ext = ".exe"
}
outName := fmt.Sprintf("%s-%s-%s%s", "olcrtc-ui", os_, arch, ext)
absOut, err := filepath.Abs(filepath.Join(buildDir, outName))
if err != nil {
return err
}
fmt.Printf("building olcrtc-ui (%s/%s)\n", os_, arch)
cmd := exec.Command(goexe, "build",
"-trimpath",
"-ldflags", ldflags,
"-o", absOut,
".",
)
cmd.Dir = "ui"
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Env = append(os.Environ(),
"GOOS="+os_,
"GOARCH="+arch,
)
return cmd.Run()
}
func ensureBuildDir() error {
return os.MkdirAll(buildDir, 0o755)
}