-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
executable file
·41 lines (37 loc) · 962 Bytes
/
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
package main
import (
"github.com/asticode/go-astilectron"
"flag"
"github.com/asticode/go-astilog"
"github.com/asticode/go-astilectron-bootstrap"
)
var (
AppName string
BuiltAt string
debug = flag.Bool("d", false, "enables the debug mode")
w *astilectron.Window
)
func main() {
flag.Parse()
// Run bootstrap
if err := bootstrap.Run(bootstrap.Options{
Asset: Asset,
AstilectronOptions: astilectron.Options{
AppName: AppName,
AppIconDarwinPath: "resources/icon.icns",
AppIconDefaultPath: "resources/icon.png",
},
Debug: true,
Homepage: "index.html",
MessageHandler: handleMessages,
RestoreAssets: RestoreAssets,
WindowOptions: &astilectron.WindowOptions{
BackgroundColor: astilectron.PtrStr("#333"),
Center: astilectron.PtrBool(true),
Height: astilectron.PtrInt(600),
Width: astilectron.PtrInt(600),
},
}); err != nil {
astilog.Fatal(err)
}
}