45 lines
876 B
Go
45 lines
876 B
Go
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
|
|
|
|
func main() {
|
|
// Create an instance of the app structure
|
|
app := NewApp()
|
|
|
|
// Create application with options
|
|
err := wails.Run(&options.App{
|
|
Title: "Railgun",
|
|
Width: 800,
|
|
Height: 600,
|
|
AssetServer: &assetserver.Options{
|
|
Assets: assets,
|
|
},
|
|
BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 0},
|
|
OnStartup: app.startup,
|
|
Bind: []interface{}{
|
|
app,
|
|
},
|
|
DisableResize: true,
|
|
Frameless: true,
|
|
AlwaysOnTop: true,
|
|
Linux: &linux.Options{
|
|
WindowIsTranslucent: true,
|
|
ProgramName: "Railgun",
|
|
},
|
|
})
|
|
|
|
if err != nil {
|
|
println("Error:", err.Error())
|
|
}
|
|
}
|