sk-matrix-project/app/wails/main.go

46 lines
852 B
Go
Raw Normal View History

2023-07-05 16:41:13 +08:00
package main
import (
2023-07-08 22:59:16 +08:00
"changeme/lib/env"
2023-07-09 23:04:17 +08:00
"changeme/lib/system"
2023-07-09 21:03:39 +08:00
"changeme/lib/utils"
2023-07-05 16:41:13 +08:00
"embed"
"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() {
// Create an instance of the app structure
app := NewApp()
// Create application with options
err := wails.Run(&options.App{
Title: "wails",
Width: 1024,
Height: 768,
AssetServer: &assetserver.Options{
Assets: assets,
},
BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 1},
OnStartup: app.startup,
Bind: []interface{}{
app,
2023-07-08 22:59:16 +08:00
&env.Env{},
2023-07-09 21:03:39 +08:00
&utils.Utils{},
2023-07-09 23:04:17 +08:00
&system.InfoUtils{},
2023-07-05 16:41:13 +08:00
},
2023-07-08 20:46:27 +08:00
Debug: options.Debug{
OpenInspectorOnStartup: true,
},
2023-07-05 16:41:13 +08:00
})
if err != nil {
println("Error:", err.Error())
}
}