Skip to content

Commit

Permalink
config: check for wine manually
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Mar 8, 2024
1 parent 5082ba4 commit 7cfdd9f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"log/slog"
"os"
"os/exec"
"path/filepath"
"strings"

"github.com/BurntSushi/toml"
"github.com/apprehensions/rbxbin"
"github.com/vinegarhq/vinegar/splash"
"github.com/vinegarhq/vinegar/sysinfo"
"github.com/vinegarhq/vinegar/wine"
)

// LogoPath is set at build-time to set the logo icon path, which is
Expand Down Expand Up @@ -145,8 +145,9 @@ func (b *Binary) validate() error {
}

if b.WineRoot != "" {
if _, err := wine.Wine64(b.WineRoot); err != nil {
return fmt.Errorf("bad wineroot: %w", err)
w := filepath.Join(b.WineRoot, "bin", "wine64")
if _, err := exec.LookPath(w); err != nil {
return fmt.Errorf("wine64 not present in wineroot")
}
}

Expand Down

0 comments on commit 7cfdd9f

Please sign in to comment.