Unverified Commit 031f393b authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

[Backport release-25.05] bottles-unwrapped: 51.17 -> 51.21, update patches,...

[Backport release-25.05] bottles-unwrapped: 51.17 -> 51.21, update patches, add gamemode to propagatedBuildInputs, fix typo in warn-unsupported.patch (#408717)
parents 56d78ec9 c9a844d1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -20,24 +20,25 @@
  lsb-release,
  pciutils,
  procps,
  gamemode,
  gamescope,
  mangohud,
  vkbasalt-cli,
  vmtouch,
  libportal,
  nix-update-script,
  removeWarningPopup ? false, # Final reminder to report any issues on nixpkgs' bugtracker
  removeWarningPopup ? false,
}:

python3Packages.buildPythonApplication rec {
  pname = "bottles-unwrapped";
  version = "51.17";
  version = "51.21";

  src = fetchFromGitHub {
    owner = "bottlesdevs";
    repo = "bottles";
    tag = version;
    hash = "sha256-m4ATWpAZxIBp1X0cNeyNGmt6aIBo/cHH+DpOMkLia0E=";
    hash = "sha256-rUS2LRr7NqTvNd706AC/U/QUDcF8tzwkHDuS3R0O1KY=";
  };

  patches =
@@ -45,7 +46,6 @@ python3Packages.buildPythonApplication rec {
      ./vulkan_icd.patch
      ./redirect-bugtracker.patch
      ./remove-flatpak-check.patch
      ./remove-core-tab.patch
    ]
    ++ (
      if removeWarningPopup then
@@ -104,6 +104,7 @@ python3Packages.buildPythonApplication rec {
      imagemagick
      vkbasalt-cli

      gamemode
      gamescope
      mangohud
      vmtouch
@@ -132,6 +133,7 @@ python3Packages.buildPythonApplication rec {
      psydvl
      shamilton
      Gliczy
      XBagon
    ];
    platforms = lib.platforms.linux;
    mainProgram = "bottles";
+0 −76
Original line number Diff line number Diff line
diff --git a/bottles/frontend/ui/preferences.blp b/bottles/frontend/ui/preferences.blp
index 9dd12a16..c1fcf649 100644
--- a/bottles/frontend/ui/preferences.blp
+++ b/bottles/frontend/ui/preferences.blp
@@ -284,20 +284,6 @@ template $PreferencesWindow: Adw.PreferencesWindow {
     }
   }
 
-  Adw.PreferencesPage pref_core {
-    icon-name: "application-x-addon-symbolic";
-    title: _("Core");
-    visible: false;
-
-    Adw.PreferencesGroup list_runtimes {
-      title: _("Runtime");
-    }
-
-    Adw.PreferencesGroup list_winebridge {
-      title: _("WineBridge");
-    }
-  }
-
   Adw.PreferencesPage {
     icon-name: "applications-science-symbolic";
     title: _("Experiments");
diff --git a/bottles/frontend/views/preferences.py b/bottles/frontend/views/preferences.py
index ce7ec958..f46c6e5b 100644
--- a/bottles/frontend/views/preferences.py
+++ b/bottles/frontend/views/preferences.py
@@ -53,8 +53,6 @@ class PreferencesWindow(Adw.PreferencesWindow):
     switch_steam_programs = Gtk.Template.Child()
     switch_epic_games = Gtk.Template.Child()
     switch_ubisoft_connect = Gtk.Template.Child()
-    list_winebridge = Gtk.Template.Child()
-    list_runtimes = Gtk.Template.Child()
     list_runners = Gtk.Template.Child()
     list_dxvk = Gtk.Template.Child()
     list_vkd3d = Gtk.Template.Child()
@@ -66,7 +64,6 @@ class PreferencesWindow(Adw.PreferencesWindow):
     btn_bottles_path_reset = Gtk.Template.Child()
     label_bottles_path = Gtk.Template.Child()
     btn_steam_proton_doc = Gtk.Template.Child()
-    pref_core = Gtk.Template.Child()
 
     # endregion
 
@@ -170,10 +167,6 @@ class PreferencesWindow(Adw.PreferencesWindow):
             self.installers_stack.set_visible_child_name("installers_offline")
             self.dlls_stack.set_visible_child_name("dlls_offline")
 
-        # populate components lists
-        self.populate_runtimes_list()
-        self.populate_winebridge_list()
-
         RunAsync(self.ui_update)
 
         # connect signals
@@ -319,18 +312,6 @@ class PreferencesWindow(Adw.PreferencesWindow):
             list_component.add(_entry)
             self.__registry.append(_entry)
 
-    def populate_runtimes_list(self):
-        for runtime in self.manager.supported_runtimes.items():
-            self.list_runtimes.add(
-                ComponentEntry(self.window, runtime, "runtime", is_upgradable=True)
-            )
-
-    def populate_winebridge_list(self):
-        for bridge in self.manager.supported_winebridge.items():
-            self.list_winebridge.add(
-                ComponentEntry(self.window, bridge, "winebridge", is_upgradable=True)
-            )
-
     def populate_dxvk_list(self):
         self.__populate_component_list(
             "dxvk", self.manager.supported_dxvk, self.list_dxvk
+77 −0
Original line number Diff line number Diff line
@@ -15,3 +15,80 @@ index 6ff7c011..c26ea0b9 100644
 bottles_sources = [
   '__init__.py',
   'main.py',
diff --git a/bottles/frontend/views/bottle_details.py b/bottles/frontend/views/bottle_details.py
index 65667ea9..7ae1eb19 100644
--- a/bottles/frontend/views/bottle_details.py
+++ b/bottles/frontend/views/bottle_details.py
@@ -436,20 +436,19 @@ class BottleView(Adw.PreferencesPage):
             dialog.connect("response", execute)
             dialog.show()
 
-        if Xdp.Portal.running_under_sandbox():
-            if self.window.settings.get_boolean("show-sandbox-warning"):
-                dialog = Adw.MessageDialog.new(
-                    self.window,
-                    _("Be Aware of Sandbox"),
-                    _(
-                        "Bottles is running in a sandbox, a restricted permission environment needed to keep you safe. If the program won't run, consider moving inside the bottle (3 dots icon on the top), then launch from there."
-                    ),
-                )
-                dialog.add_response("dismiss", _("_Dismiss"))
-                dialog.connect("response", show_chooser)
-                dialog.present()
-            else:
-                show_chooser()
+        if self.window.settings.get_boolean("show-sandbox-warning"):
+            dialog = Adw.MessageDialog.new(
+                self.window,
+                _("Be Aware of Sandbox"),
+                _(
+                    "Bottles is running in a sandbox, a restricted permission environment needed to keep you safe. If the program won't run, consider moving inside the bottle (3 dots icon on the top), then launch from there."
+                ),
+            )
+            dialog.add_response("dismiss", _("_Dismiss"))
+            dialog.connect("response", show_chooser)
+            dialog.present()
+        else:
+            show_chooser()
 
     def __backup(self, widget, backup_type):
         """
diff --git a/bottles/frontend/views/bottle_preferences.py b/bottles/frontend/views/bottle_preferences.py
index 288e693b..b8b57618 100644
--- a/bottles/frontend/views/bottle_preferences.py
+++ b/bottles/frontend/views/bottle_preferences.py
@@ -139,7 +139,7 @@ class PreferencesView(Adw.PreferencesPage):
         self.queue = details.queue
         self.details = details
 
-        if not gamemode_available or not Xdp.Portal.running_under_sandbox():
+        if not gamemode_available:
             return
 
         _not_available = _("This feature is unavailable on your system.")
diff --git a/bottles/frontend/views/list.py b/bottles/frontend/views/list.py
index 43ab9c22..a283b178 100644
--- a/bottles/frontend/views/list.py
+++ b/bottles/frontend/views/list.py
@@ -82,8 +82,6 @@ class BottlesBottleRow(Adw.ActionRow):
 
     def run_executable(self, *_args):
         """Display file dialog for executable"""
-        if not Xdp.Portal.running_under_sandbox():
-            return
 
         def set_path(_dialog, response):
             if response != Gtk.ResponseType.ACCEPT:
diff --git a/bottles/frontend/views/new_bottle_dialog.py b/bottles/frontend/views/new_bottle_dialog.py
index a8b007d4..c6f0a156 100644
--- a/bottles/frontend/views/new_bottle_dialog.py
+++ b/bottles/frontend/views/new_bottle_dialog.py
@@ -80,7 +80,7 @@ class BottlesNewBottleDialog(Adw.Dialog):
         super().__init__(**kwargs)
         # common variables and references
         self.window = GtkUtils.get_parent_window()
-        if not self.window or not Xdp.Portal.running_under_sandbox():
+        if not self.window:
             return
 
         self.app = self.window.get_application()
+5 −7
Original line number Diff line number Diff line
diff --git a/bottles/frontend/windows/main_window.py b/bottles/frontend/windows/main_window.py
index 79bf0d72..e37ca43e 100644
--- a/bottles/frontend/windows/main_window.py
index 79bf0d72..e37ca43e 100644
--- a/bottles/frontend/windows/main_window.py
+++ b/bottles/frontend/windows/main_window.py
@@ -104,29 +104,15 @@ class MainWindow(Adw.ApplicationWindow):
diff --git a/bottles/frontend/windows/window.py b/bottles/frontend/windows/window.py
index 802b08b5..c4cada1d 100644
--- a/bottles/frontend/windows/window.py
+++ b/bottles/frontend/windows/window.py
@@ -102,29 +102,15 @@ class BottlesWindow(Adw.ApplicationWindow):
 
             def response(dialog, response, *args):
                 if response == "close":
+8 −8
Original line number Diff line number Diff line
diff --git a/bottles/frontend/windows/main_window.py b/bottles/frontend/windows/main_window.py
index 79bf0d72..e3a15cb5 100644
--- a/bottles/frontend/windows/main_window.py
+++ b/bottles/frontend/windows/main_window.py
@@ -104,29 +104,29 @@ class MainWindow(Adw.ApplicationWindow):
diff --git a/bottles/frontend/windows/window.py b/bottles/frontend/windows/window.py
index 802b08b5..e3de0536 100644
--- a/bottles/frontend/windows/window.py
+++ b/bottles/frontend/windows/window.py
@@ -102,29 +102,30 @@ class BottlesWindow(Adw.ApplicationWindow):
 
             def response(dialog, response, *args):
                 if response == "close":
@@ -15,15 +15,15 @@ index 79bf0d72..e3a15cb5 100644
             )
-            download_url = "usebottles.com/download"
+            bugtracker_url = "github.com/NixOS/nixpkgs/issues"
+
 
             error_dialog = Adw.AlertDialog.new(
                 _("Unsupported Environment"),
-                f"{body} <a href='https://{download_url}' title='https://{download_url}'>{download_url}.</a>",
+                f"{body} <a href='https://{bugtracker_url}' title='https://{bugtracker_url}'>{bugtracker_url}.</a>",
+                f"{body} <a href='https://{bugtracker_url}' title='https://{bugtracker_url}'>{bugtracker_url}.</a> \nThis warning can be disabled by overriding the package: `(pkgs.bottles.override {{ removeWarningPopup = true; }})`",
             )
 
-            error_dialog.add_response("close", _("Close"))
+            error_dialog.add_response("close", _("Understood"))
             error_dialog.add_response("close", _("Close"))
             error_dialog.set_body_use_markup(True)
             error_dialog.connect("response", response)
             error_dialog.present(self)