main.go (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
//go:build eclient
package main
import (
"embed"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
)
const (
ApplicationTitle = "EMessage"
ApplicationWidth = 0
ApplicationHeight = 0
)
//go:embed all:frontend/build
var assets embed.FS
func main() {
app := NewApp(AppConfig{
Title: "EMessage",
Version: EMessageVersionHistory[0],
})
app.Log("Running %s...", app.GetTitle()).
Stdout()
err := wails.Run(&options.App{
Title: app.GetTitle(),
Width: ApplicationWidth,
Height: ApplicationHeight,
OnStartup: app.startup,
OnShutdown: app.shutdown,
AssetServer: &assetserver.Options{Assets: assets},
BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 255},
Bind: []interface{}{app},
})
app.Log("Exited.").
Stdout()
if err != nil {
println("Error:", err.Error())
}
}
|