Compare commits

..

17 commits

Author SHA1 Message Date
Sandro
dc21781e07
Add vkbasalt-cli dependency (RHBZ#2277182)
It was accidentally dropped when switching to generated dependencies in
commit 60f51c6.
2024-04-25 19:00:33 +02:00
Sandro
3a764068e0
Add .git-blame-ignore-revs
Use with `git blame --ignore-revs-file` or set the git config option
`blame.ignoreRevsFile`.

[skip changelog]
2024-04-21 16:45:58 +02:00
Sandro
307cb5d136
Properly line out sections
Whitespace changes only.

[skip changelog]
2024-04-21 16:45:58 +02:00
Sandro
f2e90931b0
Generate Python requirements
- Fix RHBZ#2276256

Use upstream's `requirements.txt` to generate Python runtime
requirements. Meson isn't helping us in keeping the list of requirements
complete and up to date. With the added script this becomes semi
automated.
2024-04-21 16:45:58 +02:00
Sandro
41b36c93a4
Catch AttributeError in set_manager()
Return empty list if AttributeError is raised (RHBZ#2260135).
2024-03-10 20:26:09 +01:00
Sandro
5886322d24
Make sure Paths.bottles exists
Fixes a FileNotFoundError when opening an executable directly in
Bottles (RHBZ#2257180).

Earlier reported in RHBZ#2249922, RHBZ#2252369 and RHBZ#2249986.
2024-03-10 20:26:09 +01:00
Packit
ba3e6329c7
[packit] 51.11 upstream release
- Resolves rhbz#2264828

Upstream tag: 51.11
Upstream commit: 89abf684
2024-03-10 20:26:09 +01:00
Sandro
0a7e2e162c
Update meta info (summary, description)
Also re-order spec file a little (pedantic).
2024-01-02 18:43:18 +01:00
Sandro
eb26f5222b
Update to 51.10 (RHBZ#2255734)
- Close RHBZ#2247856 RHBZ#2249922 RHBZ#2254894
2024-01-02 18:43:18 +01:00
Sandro
f54334cda4
Fix Packit configuration
Bottles doesn't munge version ('v' prefix). Tell packit to use the plain
version for computing the download URL.
2024-01-02 18:42:46 +01:00
35ef5736a2
Fix %forgesource
Signed-off-by: Nikola Forró <nforro@redhat.com>
2024-01-02 18:42:46 +01:00
Sandro
a57f888361
Add Packit config 2023-09-30 22:50:15 +02:00
Sandro
1e5c89290f
Add python3-chardet (RHBZ#2240292) 2023-09-30 22:50:15 +02:00
Sandro
bcaf1e0c2a
Drop obsolete macro 2023-09-30 22:50:15 +02:00
Sandro
cc6bd153ea
Use forge macros properly
No need to define tag since we have releases on GitHub. That
makes the `gh_name` macro obsolete.
Also setup using forge magic.
2023-09-30 22:49:11 +02:00
Sandro
a5315fda7c
Update to 51.9 (RHBZ#2233358)
- Update License: value
- Update requirements
- Close RHBZ#2229175 RHBZ#2227538 RHBZ#2224722 RHBZ#2222906
- Close RHBZ#2221500
2023-09-17 22:24:02 +02:00
Lyes Saadi
b1256e12ce
blueprint-compiler: ExcludeArch s390x 2023-09-17 22:23:44 +02:00
13 changed files with 69 additions and 484 deletions

View file

@ -1,34 +0,0 @@
From 7e820512cffc4f709a2d00e341306f57d91ddda5 Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Mon, 4 Mar 2024 20:28:49 +0100
Subject: [PATCH 1/3] Make sure Paths.bottles exists
When calling `bottles foo.exe` either from the command line or by
opening the executable from the file browser with Bottles, Bottles will
throw a FileNotFoundError if Paths.bottles does not exist.
It seems check_app_dirs() is never called in that situation.
---
bottles/backend/managers/manager.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bottles/backend/managers/manager.py b/bottles/backend/managers/manager.py
index 5569b663..799ce8c3 100644
--- a/bottles/backend/managers/manager.py
+++ b/bottles/backend/managers/manager.py
@@ -888,7 +888,11 @@ class Manager(metaclass=Singleton):
Check for local bottles and update the local_bottles list.
Will also mark the broken ones if the configuration file is missing
"""
- bottles = os.listdir(Paths.bottles)
+ try:
+ bottles = os.listdir(Paths.bottles)
+ except FileNotFoundError:
+ self.check_app_dirs()
+ bottles = []
# Empty local bottles
self.local_bottles = {}
--
2.51.0

View file

@ -1,33 +0,0 @@
From 602f3b45095fc63728850ba1d636ac52e4a6f156 Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Mon, 4 Mar 2024 21:45:51 +0100
Subject: [PATCH 2/3] Catch AttributeError in set_manager()
Return empty list if AttributeError is raised.
---
bottles/frontend/windows/window.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/bottles/frontend/windows/window.py b/bottles/frontend/windows/window.py
index 26d90728..ce76ab42 100644
--- a/bottles/frontend/windows/window.py
+++ b/bottles/frontend/windows/window.py
@@ -262,9 +262,12 @@ class BottlesWindow(Adw.ApplicationWindow):
def set_manager(result: Manager, error=None):
self.manager = result
- tmp_runners = [
- x for x in self.manager.runners_available if not x.startswith("sys-")
- ]
+ try:
+ tmp_runners = [
+ x for x in self.manager.runners_available if not x.startswith("sys-")
+ ]
+ except AttributeError:
+ tmp_runners = []
if len(tmp_runners) == 0:
self.show_onboard_view()
--
2.51.0

View file

@ -1,33 +0,0 @@
From 3001aaba2b1ea6488b69f8714171eff635043b53 Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Sat, 9 Nov 2024 13:42:00 +0100
Subject: [PATCH 3/3] Catch AttributeError when window is closed
In certain situations Bottles crashes with:
__quit:AttributeError: 'Bottles' object has no attribute 'win'
This should allow Bottles to exit without error.
---
bottles/frontend/main.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bottles/frontend/main.py b/bottles/frontend/main.py
index f6a07b15..ea3d7ad1 100644
--- a/bottles/frontend/main.py
+++ b/bottles/frontend/main.py
@@ -267,7 +267,10 @@ class Bottles(Adw.Application):
logging.info(
_("[Quit] request received."),
)
- self.win.on_close_request()
+ try:
+ self.win.on_close_request()
+ except AttributeError:
+ pass
quit()
@staticmethod
--
2.51.0

View file

@ -1,33 +0,0 @@
From 43278894bd9f1277da14ac187ba7b42ece5cf483 Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Sun, 8 Dec 2024 11:11:27 +0100
Subject: [PATCH 1001/1005] Revert "meson: Add check for Flatpak"
We still want to package Bottle as RPM for our users, despite upstream
having a very strong, almost hostile, preference for Flatpak.
This reverts commit 6206301992c3218060761e5b574b83da485b759a.
---
bottles/frontend/meson.build | 6 ------
1 file changed, 6 deletions(-)
diff --git a/bottles/frontend/meson.build b/bottles/frontend/meson.build
index 6ff7c011..c26ea0b9 100644
--- a/bottles/frontend/meson.build
+++ b/bottles/frontend/meson.build
@@ -23,12 +23,6 @@ params_file = configure_file(
configuration: conf
)
-fs = import('fs')
-
-if not fs.is_file('/' + '.flatpak-info')
- error('file does not exist')
-endif
-
bottles_sources = [
'__init__.py',
'main.py',
--
2.51.0

View file

@ -1,27 +0,0 @@
From 6daaf8a10f2678f1325546992aa27552f0407c1e Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Sun, 8 Dec 2024 11:22:42 +0100
Subject: [PATCH 1002/1005] Change issue URL to Bugzilla
Since upstream does not whish to receive bug reports from non-Flatpak
users, direct them to Bugzilla instead.
---
data/com.usebottles.bottles.metainfo.xml.in.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/com.usebottles.bottles.metainfo.xml.in.in b/data/com.usebottles.bottles.metainfo.xml.in.in
index c380c823..fd2261d9 100644
--- a/data/com.usebottles.bottles.metainfo.xml.in.in
+++ b/data/com.usebottles.bottles.metainfo.xml.in.in
@@ -70,7 +70,7 @@
<translation type="gettext">@APP_ID@</translation>
<content_rating type="oars-1.1"/>
<url type="homepage">https://usebottles.com</url>
- <url type="bugtracker">https://github.com/bottlesdevs/Bottles/issues</url>
+ <url type="bugtracker">https://bugz.fedoraproject.org/bottles</url>
<url type="help">https://docs.usebottles.com</url>
<url type="donation">https://usebottles.com/funding</url>
<url type="translate">https://hosted.weblate.org/engage/bottles</url>
--
2.51.0

View file

@ -1,58 +0,0 @@
From 96e3ec53fe9819cf23bc8369e397d12ef1f06b51 Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Sun, 8 Dec 2024 12:21:57 +0100
Subject: [PATCH 1003/1005] Display warning regarding issue tracker
Make sure users know where to report bugs regarding the RPM package of
Bottles. Revert upstream's outright denial of usage.
---
bottles/frontend/windows/window.py | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/bottles/frontend/windows/window.py b/bottles/frontend/windows/window.py
index ce76ab42..05c20092 100644
--- a/bottles/frontend/windows/window.py
+++ b/bottles/frontend/windows/window.py
@@ -116,29 +116,26 @@ class BottlesWindow(Adw.ApplicationWindow):
def response(dialog, response, *args):
if response == "close":
- quit(1)
+ return
body = _(
- "Bottles is only supported within a sandboxed environment. Official sources of Bottles are available at"
+ "Bottles developers (upstream) only support Flatpak. Please report any issues with the RPM package in"
)
- download_url = "usebottles.com/download"
+ bug_url = "bugz.fedoraproject.org/bottles"
error_dialog = Adw.AlertDialog.new(
- _("Unsupported Environment"),
- f"{body} <a href='https://{download_url}' title='https://{download_url}'>{download_url}.</a>",
+ _("RPM Package Note"),
+ f"{body} <a href='https://{bug_url}' title='https://{bug_url}'>Bugzilla.</a>"
)
- error_dialog.add_response("close", _("Close"))
+ error_dialog.add_response("close", _("Understood"))
error_dialog.set_body_use_markup(True)
error_dialog.connect("response", response)
error_dialog.present(self)
- logging.error(
- _(
- "Bottles is only supported within a sandboxed format. Official sources of Bottles are available at:"
- )
- )
- logging.error("https://usebottles.com/download/")
- return
+ logging.warn(_("Bottles is only supported within a sandboxed environment. Official sources of Bottles are available at:"))
+ logging.warn("https://usebottles.com/download/")
+ logging.warn(_("Please report any issues using the RPM package to:"))
+ logging.warn("https://bugz.fedoraproject.org/bottles")
# Loading view
self.page_loading = LoadingView()
--
2.51.0

View file

@ -1,187 +0,0 @@
From fc49b2eecc0526ac58c029a011b3fb90383f98c7 Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Wed, 8 Jan 2025 09:44:32 +0100
Subject: [PATCH 1004/1005] Do not require Xdp
This is used for Flatpak introspection. No need to depend on Xdp in the
RPM package. We will never run in a sandboxed environment.
Upstream uses this for checking that Bottles is running inside a Flatpak
sandbox with `running_under_sandbox`. This patch removes the check,
allowing us to drop the dependency on Xdp.
Unfortunately, we will have to review this with every release.
---
bottles/frontend/main.py | 2 --
bottles/frontend/views/bottle_details.py | 17 ++----------
bottles/frontend/views/bottle_preferences.py | 5 +---
bottles/frontend/views/list.py | 5 +---
bottles/frontend/views/new_bottle_dialog.py | 4 +--
bottles/frontend/windows/window.py | 28 +-------------------
6 files changed, 7 insertions(+), 54 deletions(-)
diff --git a/bottles/frontend/main.py b/bottles/frontend/main.py
index ea3d7ad1..5a8ecd20 100644
--- a/bottles/frontend/main.py
+++ b/bottles/frontend/main.py
@@ -34,8 +34,6 @@ from bottles.frontend.params import (
gi.require_version("Gtk", "4.0")
gi.require_version("Adw", "1")
gi.require_version("GtkSource", "5")
-gi.require_version("Xdp", "1.0")
-# gi.require_version("XdpGtk4", "1.0")
# ruff: noqa: E402
from gi.repository import Gio, GLib, GObject, Adw # type: ignore
diff --git a/bottles/frontend/views/bottle_details.py b/bottles/frontend/views/bottle_details.py
index 65667ea9..b4f151ea 100644
--- a/bottles/frontend/views/bottle_details.py
+++ b/bottles/frontend/views/bottle_details.py
@@ -21,7 +21,7 @@ from datetime import datetime
from gettext import gettext as _
from typing import List, Optional
-from gi.repository import Gtk, Gio, Adw, Gdk, GLib, Xdp
+from gi.repository import Gtk, Gio, Adw, Gdk, GLib
from bottles.backend.managers.backup import BackupManager
from bottles.backend.models.config import BottleConfig
@@ -436,20 +436,7 @@ 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()
+ 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 0d450f29..eb67714a 100644
--- a/bottles/frontend/views/bottle_preferences.py
+++ b/bottles/frontend/views/bottle_preferences.py
@@ -20,7 +20,7 @@ import os
import re
from gettext import gettext as _
-from gi.repository import Gtk, Adw, Xdp
+from gi.repository import Gtk, Adw
from bottles.backend.globals import (
gamemode_available,
@@ -139,9 +139,6 @@ class PreferencesView(Adw.PreferencesPage):
self.queue = details.queue
self.details = details
- if not gamemode_available or not Xdp.Portal.running_under_sandbox():
- return
-
_not_available = _("This feature is unavailable on your system.")
_flatpak_not_available = _(
"{} To add this feature, please run flatpak install"
diff --git a/bottles/frontend/views/list.py b/bottles/frontend/views/list.py
index 43ab9c22..a8f6c587 100644
--- a/bottles/frontend/views/list.py
+++ b/bottles/frontend/views/list.py
@@ -18,7 +18,7 @@
from datetime import datetime
from gettext import gettext as _
-from gi.repository import Gtk, GLib, Adw, Xdp
+from gi.repository import Gtk, GLib, Adw
from bottles.backend.models.config import BottleConfig
from bottles.backend.models.result import Result
@@ -82,9 +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:
return
diff --git a/bottles/frontend/views/new_bottle_dialog.py b/bottles/frontend/views/new_bottle_dialog.py
index 6774b10b..a34957eb 100644
--- a/bottles/frontend/views/new_bottle_dialog.py
+++ b/bottles/frontend/views/new_bottle_dialog.py
@@ -21,7 +21,7 @@ from threading import Event
from typing import Any, Optional
from bottles.backend.state import Task, TaskManager
-from gi.repository import Gtk, Adw, Pango, Gio, Xdp, GObject, GLib
+from gi.repository import Gtk, Adw, Pango, Gio, GObject, GLib
from bottles.backend.models.config import BottleConfig
from bottles.backend.utils.threading import RunAsync
@@ -86,7 +86,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()
diff --git a/bottles/frontend/windows/window.py b/bottles/frontend/windows/window.py
index 05c20092..f9625016 100644
--- a/bottles/frontend/windows/window.py
+++ b/bottles/frontend/windows/window.py
@@ -21,7 +21,7 @@ import webbrowser
from gettext import gettext as _
from typing import Optional
-from gi.repository import Gtk, GLib, Gio, Adw, GObject, Gdk, Xdp
+from gi.repository import Gtk, GLib, Gio, Adw, GObject, Gdk
from bottles.backend.globals import Paths
from bottles.backend.health import HealthChecker
@@ -111,32 +111,6 @@ class BottlesWindow(Adw.ApplicationWindow):
manager = Adw.StyleManager.get_default()
manager.set_color_scheme(Adw.ColorScheme.FORCE_DARK)
- # Be VERY explicit that non-sandboxed environments are unsupported
- if not Xdp.Portal.running_under_sandbox():
-
- def response(dialog, response, *args):
- if response == "close":
- return
-
- body = _(
- "Bottles developers (upstream) only support Flatpak. Please report any issues with the RPM package in"
- )
- bug_url = "bugz.fedoraproject.org/bottles"
-
- error_dialog = Adw.AlertDialog.new(
- _("RPM Package Note"),
- f"{body} <a href='https://{bug_url}' title='https://{bug_url}'>Bugzilla.</a>"
- )
-
- error_dialog.add_response("close", _("Understood"))
- error_dialog.set_body_use_markup(True)
- error_dialog.connect("response", response)
- error_dialog.present(self)
- logging.warn(_("Bottles is only supported within a sandboxed environment. Official sources of Bottles are available at:"))
- logging.warn("https://usebottles.com/download/")
- logging.warn(_("Please report any issues using the RPM package to:"))
- logging.warn("https://bugz.fedoraproject.org/bottles")
-
# Loading view
self.page_loading = LoadingView()
--
2.51.0

View file

@ -1,30 +0,0 @@
From 9874f7e6d9289c1dd398c26eb9f8c585412aacff Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Sat, 8 Nov 2025 12:06:54 +0100
Subject: [PATCH 1005/1005] Search for system installed vkBasalt
Also look in /usr/local in case a local install is present.
---
bottles/backend/globals.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bottles/backend/globals.py b/bottles/backend/globals.py
index 488acea3..d6a6a466 100644
--- a/bottles/backend/globals.py
+++ b/bottles/backend/globals.py
@@ -52,9 +52,9 @@ class Paths:
@staticmethod
def is_vkbasalt_available():
vkbasalt_paths = [
- "/usr/lib/extensions/vulkan/vkBasalt/etc/vkBasalt",
- "/usr/local",
- "/usr/share/vkBasalt",
+ "/usr/lib64/vkbasalt/libvkbasalt.so",
+ "/usr/local/lib64/libvkbasalt.so",
+ "/usr/local/lib64/vkbasalt/libvkbasalt.so",
]
for path in vkbasalt_paths:
if os.path.exists(path):
--
2.51.0

View file

@ -1,3 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 1.12.0.
The file was generated using packit 0.91.0.post1.dev4+ge6fd4a25.

View file

@ -1,10 +1,11 @@
%global forgeurl https://github.com/bottlesdevs/Bottles
Name: bottles
Epoch: 2
Version: 52.0
Epoch: 1
Version: 51.11
Release: %autorelease
Summary: Run Windows in a Bottle
%global forgeurl https://github.com/bottlesdevs/Bottles
%global tag %{version}
%forgemeta
@ -15,27 +16,19 @@ License: GPL-3.0-or-later AND MIT
URL: %{forgeurl}
Source0: %{forgesource}
# Make sure bottles dir exists when opening executable directly
# https://bugzilla.redhat.com/show_bug.cgi?id=2249922
# https://bugzilla.redhat.com/show_bug.cgi?id=2257180
Patch: 0001-Make-sure-Paths.bottles-exists.patch
Patch: ensure_bottles_dir_exists.patch
# Don't fail on AttributeError
# https://bugzilla.redhat.com/show_bug.cgi?id=2260135
Patch: 0002-Catch-AttributeError-in-set_manager.patch
# Catch AttributeError when closing window
# https://bugzilla.redhat.com/show_bug.cgi?id=2313567
Patch: 0003-Catch-AttributeError-when-window-is-closed.patch
# Downstream only patches counteracting upstream's enforcement of Flatpak
Patch: 1001-Revert-meson-Add-check-for-Flatpak.patch
Patch: 1002-Change-issue-URL-to-Bugzilla.patch
Patch: 1003-Display-warning-regarding-issue-tracker.patch
Patch: 1004-Do-not-require-Xdp.patch
Patch: catch_exception_in_set_manager.patch
# blueprint-compiler does not work on s390x:
# https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/96
ExcludeArch: s390x
BuildArch: noarch
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: meson
BuildRequires: python3-devel
BuildRequires: python3
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk4)
BuildRequires: pkgconfig(libadwaita-1) >= 1.1.99
@ -76,33 +69,6 @@ Requires: python3dist(pefile)
# Requirements not listed in upstream's `requirements.txt`
Requires: python3dist(vkbasalt-cli)
# Optional dependencies which may be required for running 32-bit bottles.
# We recommend those in order to allow users to opt out.
Recommends: freetype.i686
Recommends: mesa-dri-drivers.i686
Recommends: mesa-filesystem.i686
Recommends: mesa-libEGL.i686
Recommends: mesa-libgbm.i686
Recommends: mesa-libglapi.i686
Recommends: mesa-libGL.i686
Recommends: mesa-libGLU.i686
Recommends: mesa-va-drivers.i686
Recommends: mesa-vulkan-drivers.i686
Recommends: SDL2.i686
Recommends: vulkan-loader.i686
# Optional dependencies that will provide extra features in Bottles
# when installed.
Recommends: gamemode
Recommends: gamescope
Recommends: mangohud
# Since this pulls in OBS Studio and is not generally required for gaming
# setups, we only suggest.
Suggests: obs-studio-plugin-vkcapture
Recommends: vkBasalt
Recommends: vmtouch
%description
Bottles lets you run Windows software on Linux, such as applications
and games. It introduces a workflow that helps you organize by
@ -123,9 +89,6 @@ Features:
%prep
%forgeautosetup -p1
# F40 only has meson 1.4.1. Lower requirement.
sed -r -i 's/(meson_version.*)1\.[0-9]\.[0-9]/\11.4.1/' meson.build
%build
%meson

View file

@ -0,0 +1,28 @@
commit 3e1db3c75fee5eedb2190e7dba71239e923affb7
Author: Sandro <devel@penguinpee.nl>
Date: Mon Mar 4 21:45:51 2024 +0100
Catch AttributeError in set_manager()
Return empty list if AttributeError is raised.
diff --git a/bottles/frontend/windows/main_window.py b/bottles/frontend/windows/main_window.py
index 5fb9a15c..cd26408b 100644
--- a/bottles/frontend/windows/main_window.py
+++ b/bottles/frontend/windows/main_window.py
@@ -178,9 +178,12 @@ class MainWindow(Adw.ApplicationWindow):
def set_manager(result: Manager, error=None):
self.manager = result
- tmp_runners = [
- x for x in self.manager.runners_available if not x.startswith("sys-")
- ]
+ try:
+ tmp_runners = [
+ x for x in self.manager.runners_available if not x.startswith("sys-")
+ ]
+ except AttributeError:
+ tmp_runners = []
if len(tmp_runners) == 0:
self.show_onboard_view()

View file

@ -0,0 +1,29 @@
commit 7eed7bbfa5d1da924b4c4e0659f0bf86b0fd7d7b
Author: Sandro <devel@penguinpee.nl>
Date: Mon Mar 4 20:28:49 2024 +0100
Make sure Paths.bottles exists
When calling `bottles foo.exe` either from the command line or by
opening the executable from the file browser with Bottles, Bottles will
throw a FileNotFoundError if Paths.bottles does not exist.
It seems check_app_dirs() is never called in that situation.
diff --git a/bottles/backend/managers/manager.py b/bottles/backend/managers/manager.py
index 01b0039e..9d8ef000 100644
--- a/bottles/backend/managers/manager.py
+++ b/bottles/backend/managers/manager.py
@@ -811,7 +811,11 @@ class Manager(metaclass=Singleton):
Check for local bottles and update the local_bottles list.
Will also mark the broken ones if the configuration file is missing
"""
- bottles = os.listdir(Paths.bottles)
+ try:
+ bottles = os.listdir(Paths.bottles)
+ except FileNotFoundError:
+ self.check_app_dirs()
+ bottles = []
# Empty local bottles
self.local_bottles = {}

View file

@ -1 +1 @@
SHA512 (Bottles-52.0.tar.gz) = d133cf07a224c7f1848786f7b6f90e9e834fec7e855e5c48b4413657a7566f148f8ceece958a2cce575ae5ba66dea0963c19a79a893900b88c0c6af6c8bb1c41
SHA512 (Bottles-51.11.tar.gz) = 42c503a4910a8e6c408caecd723edf1405aa034558d61313937a69c7d5ffb20ba4675fc9022775491cbbe6ba4a35ffac508b4721f9c971c57cbcb888345d546b