Skip to content

Commit

Permalink
support UMU
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Nov 9, 2024
1 parent ef459ab commit 93a5194
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package config
import (
"errors"
"fmt"
"log/slog"
"os"
"os/exec"
"strings"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 93a5194

Please sign in to comment.