Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
ded4840
data: Update screenshots
TheEvilSkeleton Jan 15, 2025
d0d35d6
appstream: Add brand colors
TheEvilSkeleton Jan 15, 2025
b9f37e1
appstream: Update developer name
TheEvilSkeleton Jan 15, 2025
7d55049
appstream: Use sentence case for summary
TheEvilSkeleton Jan 15, 2025
1f1dc75
appstream: Add screenshot captions
TheEvilSkeleton Jan 15, 2025
02f669b
bottle-row: Rename to BottleRow
TheEvilSkeleton Jan 12, 2025
5f238b7
new-bottle-dialog: Rename to NewBottleDialog
TheEvilSkeleton Jan 12, 2025
870bdd9
check-row: Rename to CheckRow
TheEvilSkeleton Jan 12, 2025
f08dc05
component-entry-row: Rename files and class name
TheEvilSkeleton Jan 12, 2025
458e293
dependency-entry-row: Rename files and class name
TheEvilSkeleton Jan 12, 2025
ac5d0cb
bottle-details-view: Rename files and class name
TheEvilSkeleton Jan 12, 2025
fb234ae
bottle-details-page: Rename files and class name
TheEvilSkeleton Jan 12, 2025
55ef374
details-preferences-page: Rename files and class name
TheEvilSkeleton Jan 12, 2025
10fc8bb
details-task-manager-view: Rename files and class name
TheEvilSkeleton Jan 12, 2025
2014a98
details-versioning-page: Rename files and class name
TheEvilSkeleton Jan 12, 2025
98534f3
bottle-picker-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
65f7350
crash-report-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
b88a4fc
details-dependencies-view: Rename files and class name
TheEvilSkeleton Jan 12, 2025
e4d8c02
details-installers-view: Rename files and class name
TheEvilSkeleton Jan 12, 2025
a5fcad3
dependencies-check-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
6cda10f
display-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
8fbea93
dll-overrides-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
8e17eec
drives-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
4f46b2c
duplicate-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
a762b68
exclusion-patterns-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
b266d17
gamescope-dialog: Rename files
TheEvilSkeleton Jan 12, 2025
508e626
exclusion-pattern-row: Rename files and class name
TheEvilSkeleton Jan 12, 2025
854c31a
fsr-dialog: Rename files and add to POTFILES
TheEvilSkeleton Jan 12, 2025
9451be7
importer-view: Rename files
TheEvilSkeleton Jan 12, 2025
5043948
importer-row: Rename files and class name
TheEvilSkeleton Jan 12, 2025
54988cc
installer-row: Rename files and class name
TheEvilSkeleton Jan 13, 2025
f2a84b4
library-view: Rename files and add to POTFILES
TheEvilSkeleton Jan 13, 2025
5558984
bottles-list-view: Rename files and class name
TheEvilSkeleton Jan 13, 2025
aa2a59d
loading-view: Rename files
TheEvilSkeleton Jan 13, 2025
c5bbdbe
local-resource-row: Rename class name
TheEvilSkeleton Jan 13, 2025
c8f8135
onboard-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
ea587df
program-row: Rename files and class name
TheEvilSkeleton Jan 13, 2025
68f6b26
state-row: Rename files and class name
TheEvilSkeleton Jan 13, 2025
4c17c19
task-row: Rename file and class name
TheEvilSkeleton Jan 13, 2025
f3aa6a7
environment-variables-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
c83e262
installer-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
34d26cd
journal-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
9c5f9d0
launch-options-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
bf1e716
mangohud-dialog: Rename files and add to POTFILES
TheEvilSkeleton Jan 13, 2025
b89bbc5
proton-alert-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
93ae9bb
rename-program-dialog: Rename files and class name
TheEvilSkeleton Jan 13, 2025
4711b81
dialog-run-args: Remove file
TheEvilSkeleton Jan 13, 2025
ba72504
sandbox-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
f6e6db7
upgrade-versioning-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
422bab8
vkbasalt-dialog: Rename files
TheEvilSkeleton Jan 13, 2025
7a16788
vmtouch-dialog: Rename files and add to POTFILES
TheEvilSkeleton Jan 13, 2025
3838cd8
library-entry: Rename files
TheEvilSkeleton Jan 16, 2025
468c6c6
frontend: Move files to root of `frontend/`
TheEvilSkeleton Jan 13, 2025
24019db
chore: Add `pyupgrade` as a pre-commit hook
EmoonX Jan 14, 2025
8e12f6d
chore: Run `pyupgrade` for the entire codebase
TheEvilSkeleton Jan 17, 2025
e733cae
chore: Move autoflake above MyPy
TheEvilSkeleton Jan 17, 2025
4f89c2b
filters: Introduce `__set_filter`
EmoonX Jan 19, 2025
c9bef06
filters: Use `__set_filter` private method to every function
EmoonX Jan 19, 2025
aacc50e
frontend: Add support for MIDI SoundFont
EmoonX Jan 19, 2025
0ecdb4b
backend: Add support for MIDI SoundFont
EmoonX Jan 19, 2025
2196756
backend.midi: Manage FluidSynth instances, avoid duplicates
EmoonX Jan 19, 2025
c3d90a3
backend.midi: Make programs choose the right instrument through registry
EmoonX Jan 19, 2025
9cb7d06
backend.midi: Delete instances not in use by any running programs
EmoonX Jan 19, 2025
76139e2
chore: Bump requirements and update pypi-deps
EmoonX Jan 19, 2025
9605655
Translations update from Hosted Weblate (#3522)
weblate Jan 20, 2025
d192da2
flatpak: Update libadwaita to 1.7.beta
TheEvilSkeleton Jan 31, 2025
b327ce9
flatpak: Remove runtime
TheEvilSkeleton Jan 31, 2025
85ed94c
flatpak: Update vte to 0.78.3
TheEvilSkeleton Jan 31, 2025
930cc3f
flatpak: Update blueprint-compiler to 0.16.0
TheEvilSkeleton Jan 31, 2025
737dd41
flatpak: Update libportal to 0.9.0
TheEvilSkeleton Jan 31, 2025
52338ca
flatpak: Update ImageMagick to 7.1.1-43
TheEvilSkeleton Jan 31, 2025
2093246
flatpak: Update vulkan-tools to vulkan-sdk-1.4.304.0
TheEvilSkeleton Feb 2, 2025
b8fb76d
Remove NVIDIA Flatpak Workaround (#3726)
404NetworkError Feb 3, 2025
723679c
appdata: `translate=no` properties (#3327)
yakushabb Feb 4, 2025
0967184
frontend: Added 'Failed adding to Steam Library dialog' in program_ro…
mhd12e Feb 4, 2025
38a2ff4
program-row: Run formatter
TheEvilSkeleton Feb 9, 2025
420088f
ci: Update image and action
TheEvilSkeleton Feb 9, 2025
3e1dc5b
chore: Update dependency list updater
TheEvilSkeleton Feb 21, 2025
a8fa3b3
bottle-preferences: Split toggle feature callback
TheEvilSkeleton Mar 6, 2025
9875029
Revert "flatpak: Remove runtime"
TheEvilSkeleton Mar 8, 2025
f6e9196
fix: use correct wine path on 10.2 and above (#3800)
lagodimos Mar 10, 2025
ca52527
chore: Update dependency list updater (again)
TheEvilSkeleton Mar 9, 2025
547fcd8
Update PyPI dependencies
github-actions[bot] Feb 21, 2025
d035e3b
Update vulkan-headers, vulkan-tools, libportal and vte modules
github-actions[bot] Feb 21, 2025
ced72cb
bottle-row: Set can-target and can-focus to false
TheEvilSkeleton Mar 14, 2025
b2c6025
desktop: Add more categories
TheEvilSkeleton Mar 17, 2025
aafe54b
appstream: Add categories
TheEvilSkeleton Mar 17, 2025
47f8790
desktop: Use sentence case for comment
TheEvilSkeleton Mar 17, 2025
daa3cb5
desktop: Add more keywords
TheEvilSkeleton Mar 17, 2025
8875b2b
flatpak: Update dependencies
TheEvilSkeleton Mar 27, 2025
822bede
flatpak: Split dependencies
TheEvilSkeleton Apr 12, 2025
6f4eb14
backend: Remove connection checks
TheEvilSkeleton Jan 18, 2025
03c5842
frontend: Remove arg_bottle attribute
TheEvilSkeleton Jan 20, 2025
d23fc4c
frontend: Remove CLI
TheEvilSkeleton Jan 21, 2025
86ccc54
backend: Remove repair_bottle
TheEvilSkeleton Jan 21, 2025
ecf49a7
backend: Remove RepositoryManager
TheEvilSkeleton Jan 21, 2025
7606cd6
backend: Remove support for removing temp files
TheEvilSkeleton Jan 21, 2025
ac79535
globals: Add class method for retrieving list of paths
TheEvilSkeleton Jan 22, 2025
0cfd5ef
manager: Use components_paths getter method
TheEvilSkeleton Jan 22, 2025
c935ae7
frontend: Remove versioning
TheEvilSkeleton Jan 22, 2025
f456710
backend: Remove versioning
TheEvilSkeleton Jan 22, 2025
0c25ed5
frontend: Remove SteamManager
TheEvilSkeleton Jan 22, 2025
b80be0f
backend: Remove SteamManager
TheEvilSkeleton Jan 22, 2025
68e20d2
backend: Remove ComponentManager
TheEvilSkeleton Jan 23, 2025
8abc8b4
frontend: Remove InstallerManager
TheEvilSkeleton Jan 23, 2025
df71f9d
backend: Remove InstallerManager
TheEvilSkeleton Jan 23, 2025
7bf6724
backend: Remove DataManager
TheEvilSkeleton Jan 23, 2025
af8e0e0
backend: Remove DependencyManager
TheEvilSkeleton Jan 23, 2025
c483138
meta: Remove logger
TheEvilSkeleton Feb 3, 2025
5313bd4
meta: Remove JournalManager
TheEvilSkeleton Feb 3, 2025
4a54406
frontend: Remove QueueManager
TheEvilSkeleton Feb 3, 2025
8e00264
backend: Remove QueueManager
TheEvilSkeleton Feb 3, 2025
b6a9635
frontend: Remove RuntimeManager
TheEvilSkeleton Feb 3, 2025
86e2358
backend: Remove RuntimeManager
TheEvilSkeleton Feb 3, 2025
30450a9
chore: Remove tests
TheEvilSkeleton Feb 3, 2025
0a1d25f
frontend: Remove ImporterManager
TheEvilSkeleton Feb 3, 2025
b8bd571
backend: Remove ImporterManager
TheEvilSkeleton Feb 3, 2025
0b505b3
frontend: Remove EpicGamesStoreManager
TheEvilSkeleton Feb 3, 2025
1216c99
backend: Remove EpicGamesStoreManager
TheEvilSkeleton Feb 3, 2025
b0f9d39
frontend: Remove UbisoftConnectManager
TheEvilSkeleton Feb 3, 2025
a43903a
backend: Remove UbisoftConnectManager
TheEvilSkeleton Feb 3, 2025
69b6b1b
backend: Remove OriginManager
TheEvilSkeleton Feb 3, 2025
71d4e05
frontend: Remove BackupManager
TheEvilSkeleton Feb 4, 2025
2901445
backend: Remove BackupManager
TheEvilSkeleton Feb 4, 2025
f748d68
frontend: Remove LibraryManager
TheEvilSkeleton Feb 4, 2025
ce4779c
backend: Remove LibraryManager
TheEvilSkeleton Feb 4, 2025
b2648c7
backend: Remove ThumbnailManager
TheEvilSkeleton Feb 4, 2025
003ca54
backend: Remove TemplateManager
TheEvilSkeleton Feb 4, 2025
9d1d378
backend: Remove ConfigManager
TheEvilSkeleton Feb 4, 2025
e536d7f
backend: Remove SteamGridDBManager
TheEvilSkeleton Feb 4, 2025
746d95f
backend: Remove SandboxManager
TheEvilSkeleton Feb 4, 2025
7e23451
backend: Remove SteamUtils
TheEvilSkeleton Feb 5, 2025
6c5406c
backend: Remove leftover Steam
TheEvilSkeleton Feb 5, 2025
6474b00
frontend: Remove MIDI SoundFont
TheEvilSkeleton Feb 5, 2025
465d180
backend: Remove MIDI SoundFont
TheEvilSkeleton Feb 5, 2025
a1a2813
backend: Remove hh
TheEvilSkeleton Feb 5, 2025
7cb64ec
frontend: Remove LoadingView
TheEvilSkeleton Feb 7, 2025
fc95d0d
main: Remove unnecessary locale variables
TheEvilSkeleton Feb 8, 2025
11d7671
backend: Initial Bottle class
TheEvilSkeleton Feb 9, 2025
eb72eb0
backend: Improve typing for BottleConfig
TheEvilSkeleton Feb 9, 2025
4d8ef2b
frontend: Use Bottle class
TheEvilSkeleton Feb 9, 2025
ab66a29
manager: Remove update methods
TheEvilSkeleton Feb 9, 2025
759fba8
Rework config
TheEvilSkeleton Feb 11, 2025
923ac33
pre-commit
TheEvilSkeleton Feb 11, 2025
e1cecee
meh
TheEvilSkeleton Mar 9, 2025
4089e62
pre-commit
TheEvilSkeleton Apr 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
name: "build-packages"
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-47
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6
- uses: flathub-infra/flatpak-github-actions/flatpak-builder@master
with:
bundle: bottles.flatpak
manifest-path: build-aux/com.usebottles.bottles.Devel.json
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
git config user.name "github-actions[bot]"
pur -r requirements.txt
pur -r requirements.dev.txt
req2flatpak --requirements-file requirements.txt --yaml --target-platforms 312-x86_64 -o com.usebottles.bottles.pypi-deps.yaml
git diff ${{ github.ref_name }} --exit-code requirements.txt requirements.dev.txt com.usebottles.bottles.pypi-deps.yaml
req2flatpak --requirements-file requirements.txt --yaml --target-platforms 312-x86_64 -o build-aux/pypi-deps.yaml
git diff ${{ github.ref_name }} --exit-code requirements.txt requirements.dev.txt build-aux/pypi-deps.yaml
updated=$?
if [ $updated -ne 0 ]; then
git add requirements.txt requirements.dev.txt com.usebottles.bottles.pypi-deps.yaml
git add requirements.txt requirements.dev.txt pypi-deps
git commit -m "Update PyPI dependencies"
fi

Expand Down
18 changes: 12 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,27 @@ repos:
args: ["--autofix", "--no-sort-keys", "--indent", "4"]
- id: check-added-large-files

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: ["--py312-plus"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
hooks:
- id: ruff
args: [ "--fix" ]
- id: ruff-format

- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
args: ["--pretty"]
additional_dependencies: ["pygobject-stubs", "types-PyYAML", "types-Markdown", "types-requests", "types-pycurl", "types-chardet", "pytest-stub", "types-orjson", "pathvalidate", "requirements-parser", "icoextract", "fvs", "patool", "git+https://gitlab.com/TheEvilSkeleton/vkbasalt-cli.git@main"]

- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
additional_dependencies: ["pygobject-stubs", "types-PyYAML", "types-Markdown", "types-requests", "types-pycurl", "types-chardet", "pytest-stub", "types-orjson", "pathvalidate", "requirements-parser", "icoextract", "fvs", "patool", "pyfluidsynth", "git+https://gitlab.com/TheEvilSkeleton/vkbasalt-cli.git@main"]
2 changes: 1 addition & 1 deletion CODING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pytest .
Regenerate PYPI dependency manifest when requirements.txt changed

```bash
python ./build-aux/flatpak-pip-generator.py --runtime org.gnome.Sdk -r requirements.txt -o com.usebottles.bottles.pypi-deps --yaml
python ./build-aux/req2flatpak/req2flatpak.py --requirements-file requirements.txt --yaml --target-platforms 312-x86_64 -o build-aux/pypi-deps.yaml
```

## I18n files
Expand Down
75 changes: 75 additions & 0 deletions bottles/backend/bottle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# bottle.py
#
# Copyright 2025 The Bottles Contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, in version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import os
import yaml
from dataclasses import dataclass

from bottles.backend.typing import WindowsAPI, VersionedComponent, Environment
from bottles.backend.models.config import BottleConfig


# BottleConfig(Name='d', Arch='win64', Windows='win10', Runner='sys-wine-10.0', WorkingDir='', DXVK='', NVAPI='', VKD3D='', LatencyFleX='', Path='d', Custom_Path=False, Environment='Application', Creation_Date='', Update_Date='', Versioning=False, Versioning_Exclusion_Patterns=[], State=0, Parameters=BottleParams(dxvk=False, dxvk_nvapi=False, vkd3d=False, latencyflex=False, mangohud=False, mangohud_display_on_game_start=True, obsvkc=False, vkbasalt=False, gamemode=False, gamescope=False, gamescope_game_width=0, gamescope_game_height=0, gamescope_window_width=0, gamescope_window_height=0, gamescope_fps=0, gamescope_fps_no_focus=0, gamescope_scaling=False, gamescope_borderless=False, gamescope_fullscreen=True, sync='wine', fsr=False, fsr_sharpening_strength=2, fsr_quality_mode='none', custom_dpi=96, renderer='gl', discrete_gpu=False, virtual_desktop=False, virtual_desktop_res='1280x720', pulseaudio_latency=False, fullscreen_capture=False, take_focus=False, mouse_warp=True, decorated=True, fixme_logs=False, use_runtime=False, use_eac_runtime=True, use_be_runtime=True, use_steam_runtime=False, sandbox=False, versioning_compression=False, versioning_automatic=False, versioning_exclusion_patterns=False, vmtouch=False, vmtouch_cache_cwd=False), Sandbox=BottleSandboxParams(share_net=False, share_sound=False), Environment_Variables={}, Installed_Dependencies=[], DLL_Overrides={}, External_Programs={}, Uninstallers={}, session_arguments='', run_in_terminal=False, Language='sys', CompatData='', data={}, RunnerPath='')
@dataclass
class BottleClass:
name: str
runner: str
environment: Environment
mangohud: bool = False
vkbasalt: bool = False
gamemode: bool = False
gamescope: bool = False
fidelityfx_super_resolution: bool = False
dxvk: VersionedComponent = False
nvapi: VersionedComponent = False
vkd3d: VersionedComponent = False
latencyflex: VersionedComponent = False
architecture: WindowsAPI = WindowsAPI.WIN64


class Bottle:
"""Class representing a bottle."""

@staticmethod
def generate_local_bottles_list(bottles_dir: str) -> dict[str, BottleConfig]:
"""Generate a list of local bottles."""

local_bottles = {}
local_bottles_list = os.listdir(bottles_dir)

for local_bottle in local_bottles_list:
local_bottle_dir = os.path.join(bottles_dir, local_bottle)
bottle_config_file_path = os.path.join(local_bottle_dir, "bottle.yml")
placeholder_file_path = os.path.join(local_bottle_dir, "placeholder.yml")

try:
with open(placeholder_file_path) as file:
configuration = yaml.safe_load(file)
bottle_config_file_path = configuration["Path"]
except FileNotFoundError:
pass

if not os.path.isfile(bottle_config_file_path):
continue

config_load = BottleConfig.load(bottle_config_file_path)

if not config_load.status:
raise TypeError(f"Unable to load {bottle_config_file_path}")

local_bottles[local_bottle] = config_load.data

return local_bottles
7 changes: 2 additions & 5 deletions bottles/backend/cabextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@
import shlex
import shutil
import subprocess
from typing import Optional

from bottles.backend.logger import Logger

logging = Logger()
import logging


class CabExtract:
Expand All @@ -47,7 +44,7 @@ def run(
self,
path: str,
name: str = "",
files: Optional[list] = None,
files: list | None = None,
destination: str = "",
):
if files is None:
Expand Down
4 changes: 1 addition & 3 deletions bottles/backend/dlls/dll.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
from abc import abstractmethod
from copy import deepcopy

from bottles.backend.logger import Logger
import logging
from bottles.backend.models.config import BottleConfig
from bottles.backend.models.enum import Arch
from bottles.backend.utils.manager import ManagerUtils
from bottles.backend.wine.reg import Reg

logging = Logger()


class DLLComponent:
base_path: str
Expand Down
4 changes: 1 addition & 3 deletions bottles/backend/dlls/nvapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
from bottles.backend.dlls.dll import DLLComponent
from bottles.backend.models.config import BottleConfig
from bottles.backend.utils.manager import ManagerUtils
from bottles.backend.logger import Logger
import logging

from bottles.backend.utils.nvidia import get_nvidia_dll_path

logging = Logger()


class NVAPIComponent(DLLComponent):
dlls = {
Expand Down
7 changes: 2 additions & 5 deletions bottles/backend/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@
import shutil
import sys
import time
from typing import Optional

import requests

from bottles.backend.logger import Logger
import logging
from bottles.backend.models.result import Result
from bottles.backend.state import TaskStreamUpdateHandler
from bottles.backend.utils.file import FileUtils

logging = Logger()


class Downloader:
"""
Expand All @@ -38,7 +35,7 @@ class Downloader:
"""

def __init__(
self, url: str, file: str, update_func: Optional[TaskStreamUpdateHandler] = None
self, url: str, file: str, update_func: TaskStreamUpdateHandler | None = None
):
self.start_time = None
self.url = url
Expand Down
23 changes: 20 additions & 3 deletions bottles/backend/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import os
import shutil
from pathlib import Path
from typing import Dict
from bottles.backend.utils import yaml, json


Expand Down Expand Up @@ -61,6 +60,24 @@ def is_vkbasalt_available():
return True
return False

@classmethod
def get_components_paths(cls) -> list[str]:
"""Retrieve list of components' paths."""

return [
cls.temp,
cls.runtimes,
cls.winebridge,
cls.runners,
cls.bottles,
cls.steam,
cls.dxvk,
cls.vkd3d,
cls.nvapi,
cls.latencyflex,
cls.templates,
]


class TrdyPaths:
# External managers paths
Expand All @@ -82,12 +99,12 @@ class TrdyPaths:
vmtouch_available = shutil.which("vmtouch") or False
base_version = ""
if os.path.isfile("/app/manifest.json"):
with open("/app/manifest.json", mode="r", encoding="utf-8") as file:
with open("/app/manifest.json", encoding="utf-8") as file:
base_version = (
json.load(file) # type: ignore
.get("base-version", "")
.removeprefix("stable-")
)

# encoding detection correction, following windows defaults
locale_encodings: Dict[str, str] = {"ja_JP": "cp932", "zh_CN": "gbk"}
locale_encodings: dict[str, str] = {"ja_JP": "cp932", "zh_CN": "gbk"}
3 changes: 0 additions & 3 deletions bottles/backend/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@
from bottles.backend.utils import yaml
import contextlib

from bottles.backend.logger import Logger
from bottles.backend.utils.display import DisplayUtils
from bottles.backend.utils.gpu import GPUUtils
from bottles.backend.utils.generic import is_glibc_min_available
from bottles.backend.utils.file import FileUtils
from bottles.backend.params import APP_VERSION

logging = Logger()


class HealthChecker:
x11: bool = False
Expand Down
Loading