From e37773ed65b5147c91c1082b61806552bb42dfc3 Mon Sep 17 00:00:00 2001 From: sewn Date: Sun, 25 Feb 2024 11:20:26 +0300 Subject: [PATCH] config: warn user on multiple instances && inflatpak --- config/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/config.go b/config/config.go index a293531..eda81a4 100644 --- a/config/config.go +++ b/config/config.go @@ -4,6 +4,7 @@ package config import ( "errors" "fmt" + "log/slog" "os" "os/exec" "strings" @@ -11,6 +12,7 @@ import ( "github.com/BurntSushi/toml" "github.com/vinegarhq/vinegar/roblox" "github.com/vinegarhq/vinegar/splash" + "github.com/vinegarhq/vinegar/sysinfo" "github.com/vinegarhq/vinegar/wine" ) @@ -172,6 +174,14 @@ func (c *Config) setup() error { SanitizeEnv() } + // On each Flatpak instance, each one has their own wineserver, which means + // if a new Vinegar flatpak instance is ran, with the intent of having two + // running Player instances, one of the wineservers in either sandboxed + // instance will die. + if c.MultipleInstances && sysinfo.InFlatpak { + slog.Warn("Multiple instances is broken on Flatpak! Please consider using a source installation!") + } + c.Env.Setenv() if err := c.Player.setup(); err != nil {