mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-30 06:55:23 -04:00
Set gsettings schemas correctly
This commit is contained in:
parent
4bb0066714
commit
9eafa39eeb
1 changed files with 21 additions and 1 deletions
|
@ -1,8 +1,28 @@
|
|||
package main
|
||||
|
||||
import wiiudownloader "github.com/Xpl0itU/WiiUDownloader"
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
wiiudownloader "github.com/Xpl0itU/WiiUDownloader"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Check if user is running macOS
|
||||
if os.Getenv("GOOS") != "darwin" {
|
||||
execPath, err := os.Executable()
|
||||
if err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
bundlePath := filepath.Join(filepath.Dir(filepath.Dir(execPath)))
|
||||
filePath := filepath.Join(bundlePath, "MacOS/lib/share/glib-2.0/schemas")
|
||||
if _, err := os.Stat("/path/to/whatever"); os.IsExist(err) {
|
||||
os.Setenv("GSETTINGS_SCHEMA_DIR", filePath)
|
||||
}
|
||||
}
|
||||
win := NewMainWindow(wiiudownloader.GetTitleEntries(wiiudownloader.TITLE_CATEGORY_GAME))
|
||||
|
||||
win.ShowAll()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue