Allow building as a non-flatpak app

This commit is contained in:
kramo
2023-03-16 17:24:03 +01:00
parent bb159f6503
commit 516c020cbc
10 changed files with 65 additions and 13 deletions

View File

@@ -39,10 +39,20 @@ def bottles_parser(parent_widget, action):
"bottles-location", "~/.var/app/com.usebottles.bottles/data/bottles/"
)
action(None, None)
elif os.path.exists(os.path.join(os.environ.get("XDG_DATA_HOME"), "bottles")):
elif os.path.exists(
os.path.join(
os.getenv("XDG_DATA_HOME")
or os.path.expanduser(os.path.join("~", ".local", "share")),
"bottles",
)
):
schema.set_string(
"bottles-location",
os.path.join(os.environ.get("XDG_DATA_HOME"), "bottles"),
os.path.join(
os.getenv("XDG_DATA_HOME")
or os.path.expanduser(os.path.join("~", ".local", "share")),
"bottles",
),
)
action(None, None)
else: