-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.go
61 lines (55 loc) · 1.55 KB
/
main.go
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package main
import (
"embed"
"log"
"github.com/PiterWeb/RemoteController/src/desktop"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/logger"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
"github.com/wailsapp/wails/v2/pkg/options/windows"
)
//go:embed frontend/build/*
var assets embed.FS
func main() {
// Create an instance of the app structure
app := desktop.NewApp()
// Create application with options
// Create application with options
err := wails.Run(&options.App{
Title: "Remote Controller",
Width: 1024,
Height: 768,
DisableResize: false,
Fullscreen: false,
StartHidden: false,
HideWindowOnClose: false,
BackgroundColour: &options.RGBA{R: 75, G: 107, B: 251, A: 255},
AssetServer: &assetserver.Options{
Assets: assets,
},
Menu: nil,
Logger: nil,
LogLevel: logger.DEBUG,
OnStartup: app.Startup,
OnBeforeClose: app.BeforeClose,
OnShutdown: app.Shutdown,
WindowStartState: options.Normal,
EnableDefaultContextMenu: true,
Bind: []interface{}{
app,
},
// Windows platform specific options
Windows: &windows.Options{
WebviewIsTransparent: false,
WindowIsTranslucent: false,
DisableWindowIcon: true,
Theme: windows.Theme(windows.Acrylic),
// DisableFramelessWindowDecorations: false,
WebviewUserDataPath: "",
},
})
if err != nil {
log.Println(err)
}
}