-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
58 lines (51 loc) · 1.44 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
// Vencord WailsInstaller, a cross-platform installer for Vencord.
// Copyright (c) 2023 Vendicated, Lewis Crichton, and Vencord contributors
// SPDX-License-Identifier: GPL-3.0-or-later
package main
import (
"embed"
"runtime"
"github.com/vencord/wailsinstaller/installer"
"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/mac"
)
//go:embed all:frontend/dist
var assets embed.FS
func main() {
// Create an instance of the installer binding
installer := installer.NewInstaller()
// Create application with options
err := wails.Run(&options.App{
Title: "Vencord Installer",
Width: 1024,
Height: 768,
DisableResize: true,
AssetServer: &assetserver.Options{
Assets: assets,
},
Frameless: runtime.GOOS == "windows",
BackgroundColour: &options.RGBA{R: 40, G: 40, B: 40, A: 1},
OnStartup: installer.Startup,
Bind: []any{
installer,
},
Mac: &mac.Options{
TitleBar: &mac.TitleBar{
TitlebarAppearsTransparent: true,
HideTitle: true,
UseToolbar: false,
FullSizeContent: true,
},
Appearance: mac.NSAppearanceNameDarkAqua,
About: &mac.AboutInfo{
Title: "Vencord Installer",
Message: "A cross-platform installer for Vencord.",
},
},
})
if err != nil {
println("Error:", err.Error())
}
}