A non-flag word no longer stops parsing, and a missing home directory refuses to create or rewrite a config instead of writing an empty log path. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
845 B
Go
40 lines
845 B
Go
//go:build !bindings
|
|
|
|
// Command funknetz is the headset station window.
|
|
package main
|
|
|
|
import (
|
|
"embed"
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/wailsapp/wails/v2"
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
|
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
|
)
|
|
|
|
//go:embed all:frontend/dist
|
|
var assets embed.FS
|
|
|
|
func main() {
|
|
st, err := openStationReported(os.Args[1:], os.Stderr)
|
|
if err != nil {
|
|
os.Exit(1)
|
|
}
|
|
app := &App{station: st}
|
|
err = wails.Run(&options.App{
|
|
Title: "funknetz",
|
|
Width: 420,
|
|
Height: 280,
|
|
BackgroundColour: &options.RGBA{R: 16, G: 20, B: 24, A: 255},
|
|
AssetServer: &assetserver.Options{Assets: assets},
|
|
OnStartup: app.startup,
|
|
OnShutdown: app.shutdown,
|
|
Bind: []any{app},
|
|
})
|
|
if err != nil {
|
|
fmt.Fprintln(os.Stderr, err.Error())
|
|
os.Exit(1)
|
|
}
|
|
}
|