-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.go
More file actions
40 lines (30 loc) · 939 Bytes
/
Copy pathmain.go
File metadata and controls
40 lines (30 loc) · 939 Bytes
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
package main
//go:generate go run github.com/tc-hib/go-winres@latest simply --icon app/assets/logo.png
import (
"fmt"
"os"
"runtime"
fyneApp "fyne.io/fyne/v2/app"
"github.com/LEX0RE/rockpload/app"
"github.com/LEX0RE/rockpload/app/constant"
"github.com/LEX0RE/rockpload/app/tools/logger"
)
var Version = "dev"
// This function run BEFORE main()
func init() {
if runtime.GOOS == "windows" {
// Handle Window Driver without OpenGL, but client will need to download opengl32.dll and libgallium_wgl.dll from mesa-dist-win on git
os.Setenv("GALLIUM_DRIVER", "llvmpipe")
}
}
func main() {
fmt.Printf("Init Rockpload (GOOS: %s)", runtime.GOOS)
fApp := fyneApp.NewWithID("gg.lexore.rockpload")
// Always before logger as logger need to know the paths to log to file
constant.InitPaths(fApp)
logger.SetLogger()
logger.Rlogger.Info("Starting Rockpload")
logger.FuncDebug()
app := app.NewApp(Version, fApp)
app.Run()
}