1c296474c5
Shared: Require an argument to initialize the each singleton, if it is called uninitialized, raise a RuntimeError InstallDialog: Use QCheckBox label for the information text and remove the layout LaunchDialog: Minor code clarity improvements Console: add a Dialog with the process's environment variables GameUtils: Inherit the system's environment and not a clean one ImportGroup: Add the ability to automatically import all games in a folder RareStyle: Use rgb values, remove hex codes and rgba values IndicatorLineEdit/PathEdit: Infer object names from class name, don't override layout method Models: Type fields as Optional (`Union[<something>, None]`) Paths: Use pathlib for everything Signed-off-by: Stelios Tsampas <loathingkernel@gmail.com>
13 lines
511 B
Python
13 lines
511 B
Python
from pathlib import Path
|
|
|
|
from PyQt5.QtCore import QStandardPaths
|
|
|
|
resources_path = Path(__file__).absolute().parent.parent.joinpath("resources")
|
|
data_dir = Path(QStandardPaths.writableLocation(QStandardPaths.DataLocation), "rare")
|
|
cache_dir = Path(QStandardPaths.writableLocation(QStandardPaths.CacheLocation), "rare")
|
|
image_dir = data_dir.joinpath("images")
|
|
tmp_dir = cache_dir.joinpath("tmp")
|
|
|
|
for path in (data_dir, cache_dir, image_dir, tmp_dir):
|
|
if not path.exists():
|
|
path.mkdir(parents=True)
|