From 93a5194e65c2d8be1422a94b45fcb8699b4f56e3 Mon Sep 17 00:00:00 2001 From: sewn Date: Sat, 9 Nov 2024 16:48:41 +0300 Subject: [PATCH] support UMU --- config/config.go | 8 +++++++- go.mod | 2 +- go.sum | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index 2c7d3a2..51180d7 100644 --- a/config/config.go +++ b/config/config.go @@ -4,6 +4,7 @@ package config import ( "errors" "fmt" + "log/slog" "os" "os/exec" "strings" @@ -12,6 +13,7 @@ import ( "github.com/apprehensions/rbxbin" "github.com/apprehensions/wine" "github.com/vinegarhq/vinegar/splash" + "github.com/vinegarhq/vinegar/sysinfo" ) // LogoPath is set at build-time to set the logo icon path, which is @@ -143,10 +145,14 @@ func (b *Binary) validate() error { } if b.WineRoot != "" { - w := wine.New("", b.WineRoot).Wine("") + pfx := wine.New("", b.WineRoot) + w := pfx.Wine("") if w.Err != nil { return fmt.Errorf("wineroot: %w", w.Err) } + if pfx.IsProton() && w.Args[0] != "umu-run" && !sysinfo.InFlatpak { + slog.Warn("wineroot: umu-run reccomended for Proton usage!") + } } return nil diff --git a/go.mod b/go.mod index a4cc3cc..2db4593 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/altfoxie/drpc v0.0.0-20240929140334-e714e6291275 github.com/apprehensions/rbxbin v0.0.0-20241108182759-6d92e1ecbfab github.com/apprehensions/rbxweb v0.0.0-20240329184049-0bdedc184942 - github.com/apprehensions/wine v0.0.0-20241109121733-f99088878030 + github.com/apprehensions/wine v0.0.0-20241109134522-9b24688c6e4e github.com/folbricht/pefile v0.1.0 github.com/fsnotify/fsnotify v1.8.0 github.com/godbus/dbus/v5 v5.1.0 diff --git a/go.sum b/go.sum index d0593bb..2647823 100644 --- a/go.sum +++ b/go.sum @@ -29,6 +29,10 @@ github.com/apprehensions/wine v0.0.0-20241109115212-21fe280585b5 h1:u4mK0UyuGXrX github.com/apprehensions/wine v0.0.0-20241109115212-21fe280585b5/go.mod h1:t54gBblDmNAdLoRNLKk/338+JQvCiyt6qS8EUpD3RYw= github.com/apprehensions/wine v0.0.0-20241109121733-f99088878030 h1:p9wQhjrCVORRZStMXw3IBjiQ7yS5fd6ugvxFCbZngEs= github.com/apprehensions/wine v0.0.0-20241109121733-f99088878030/go.mod h1:t54gBblDmNAdLoRNLKk/338+JQvCiyt6qS8EUpD3RYw= +github.com/apprehensions/wine v0.0.0-20241109122757-ee219685b6aa h1:jgL5XNu2Au4e0NsRVfCUA4GdkNbITTM/2rsQjaG0tec= +github.com/apprehensions/wine v0.0.0-20241109122757-ee219685b6aa/go.mod h1:t54gBblDmNAdLoRNLKk/338+JQvCiyt6qS8EUpD3RYw= +github.com/apprehensions/wine v0.0.0-20241109134522-9b24688c6e4e h1:Kr0pNptZi2anYD+RsYNybga0e9uskW8szUkFRoTtdCU= +github.com/apprehensions/wine v0.0.0-20241109134522-9b24688c6e4e/go.mod h1:t54gBblDmNAdLoRNLKk/338+JQvCiyt6qS8EUpD3RYw= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/folbricht/pefile v0.1.0 h1:y9aMwgNlPO/iyp8Izll3Au4XNp7Fi7uDH8OKZ1Nl+lw=