package main import ( "cloudsave/pkg/tools/windows" _ "embed" "os" "github.com/getlantern/systray" ) const defaultDocumentRoot string = "C:\\ProgramData\\CloudSave" //go:embed res/icon.ico var icon []byte func main() { go systray.Run(onReady, onExit) run() } func fatal(message string, exitCode int) { windows.MessageBox(windows.NULL, message, "CloudSave", windows.MB_OK) os.Exit(exitCode) } func onReady() { systray.SetTitle("CloudSave") systray.SetTooltip("CloudSave") systray.SetIcon(icon) mQuit := systray.AddMenuItem("Quit", "Quit") go func() { <-mQuit.ClickedCh os.Exit(0) }() } func onExit() { // clean up here }