Skip to content

Instantly share code, notes, and snippets.

@envolution
Created January 5, 2025 23:52
Show Gist options
  • Save envolution/4c6da6874f882172fd15cd9a65c69583 to your computer and use it in GitHub Desktop.
Save envolution/4c6da6874f882172fd15cd9a65c69583 to your computer and use it in GitHub Desktop.
dont-care-about-sandbox.patch
diff -rub Bottles-51.16/bottles/frontend/meson.build Bottles-51.16-patched/bottles/frontend/meson.build
--- Bottles-51.16/bottles/frontend/meson.build 2024-12-12 22:50:52.000000000 +0100
+++ Bottles-51.16-patched/bottles/frontend/meson.build 2024-12-13 07:44:56.242543882 +0100
@@ -25,10 +25,6 @@
fs = import('fs')
-if not fs.is_file('/' + '.flatpak-info')
- error('file does not exist')
-endif
-
bottles_sources = [
'__init__.py',
'main.py',
diff -rub Bottles-51.16/bottles/frontend/windows/window.py Bottles-51.16-patched/bottles/frontend/windows/window.py
--- Bottles-51.16/bottles/frontend/windows/window.py 2024-12-12 22:50:52.000000000 +0100
+++ Bottles-51.16-patched/bottles/frontend/windows/window.py 2024-12-13 07:57:41.559466569 +0100
@@ -99,35 +99,6 @@
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":
- quit(1)
-
- body = _(
- "Bottles is only supported within a sandboxed environment. Official sources of Bottles are available at"
- )
- download_url = "usebottles.com/download"
-
- error_dialog = Adw.AlertDialog.new(
- _("Unsupported Environment"),
- f"{body} <a href='https://{download_url}' title='https://{download_url}'>{download_url}.</a>",
- )
-
- error_dialog.add_response("close", _("Close"))
- 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
-
# Loading view
self.page_loading = LoadingView()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment