38 lines
830 B
Go
38 lines
830 B
Go
//go:build !windows
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os/exec"
|
|
"runtime"
|
|
|
|
"github.com/VeraeLLC/PrintToVeraeTimeStamp/internal/vlog"
|
|
)
|
|
|
|
func notify(title, subtitle string) {
|
|
if runtime.GOOS != "darwin" {
|
|
return
|
|
}
|
|
script := fmt.Sprintf(`display notification %q with title "Verae Timestamp" subtitle %q`, subtitle, title)
|
|
_ = exec.Command("osascript", "-e", script).Run()
|
|
}
|
|
|
|
func notifyUser(title, body string) {
|
|
vlog.Printf("notify: %s — %s", title, body)
|
|
notify(title, body)
|
|
}
|
|
|
|
func openFolderPath(p string) {
|
|
if runtime.GOOS == "darwin" {
|
|
_ = exec.Command("open", p).Run()
|
|
return
|
|
}
|
|
_ = exec.Command("xdg-open", p).Start()
|
|
}
|
|
|
|
func launchSetupUI() { vlog.Printf("setup: no signing key — run: verae-print setup") }
|
|
|
|
func runInstallPrinterWindows() int { return 1 }
|
|
|
|
func debugFromRegistry() bool { return false }
|