Files

48 lines
1.0 KiB
Go
Executable File

package main
import (
"embed"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
"github.com/wailsapp/wails/v2/pkg/options/linux"
)
//go:embed all:frontend/dist
var assets embed.FS
// appIcon is the window/taskbar icon (the app logo) shown by the window manager.
// Embed the source icon (frontend/icons/) rather than the build-copied
// frontend/dist/icons/ — the latter is gitignored (dist/), so it isn't present
// on a fresh checkout / in CI.
//
//go:embed frontend/icons/ICON.png
var appIcon []byte
func main() {
app := NewApp()
err := wails.Run(&options.App{
Title: "Sliver GUI " + Version,
Width: 1280,
Height: 800,
AssetServer: &assetserver.Options{
Assets: assets,
},
BackgroundColour: &options.RGBA{R: 15, G: 15, B: 20, A: 1},
Linux: &linux.Options{
Icon: appIcon,
},
OnStartup: app.startup,
OnShutdown: app.shutdown,
Bind: []interface{}{
app,
},
})
if err != nil {
println("Error:", err.Error())
}
}