package main import ( "embed" "time" "os" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/wailsapp/wails/v2" "github.com/wailsapp/wails/v2/pkg/logger" "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() { // Configure the logger log.Logger = log.Output(zerolog.ConsoleWriter{ Out: os.Stderr, TimeFormat: "2006-01-02 15:04:05", }) zerolog.TimestampFunc = func() time.Time { return time.Now().Local() } zerolog.SetGlobalLevel(zerolog.TraceLevel) // Create an instance of the app structure app := NewApp() // Create application with options err := wails.Run(&options.App{ Title: "dmxconnect", Width: 1024, Height: 768, WindowStartState: options.Maximised, AssetServer: &assetserver.Options{ Assets: assets, }, OnStartup: app.onStartup, OnDomReady: app.onReady, OnShutdown: app.onShutdown, Bind: []interface{}{ app, }, LogLevel: logger.ERROR, }) if err != nil { log.Err(err).Str("file", "main").Msg("unable to start the application") } }