初始化

This commit is contained in:
杨国锋
2026-02-02 09:45:02 +08:00
parent cf06443441
commit e0181cc7ac
40 changed files with 8771 additions and 0 deletions

37
main.go Normal file
View File

@@ -0,0 +1,37 @@
package main
import (
"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: "GoNavi",
Width: 1024,
Height: 768,
AssetServer: &assetserver.Options{
Assets: assets,
},
BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
OnStartup: app.startup,
OnShutdown: app.shutdown, // Bind shutdown method
Bind: []interface{}{
app,
},
})
if err != nil {
println("Error:", err.Error())
}
}