Skip to content

Commit

Permalink
feat: Add more consts
Browse files Browse the repository at this point in the history
Signed-off-by: Dom Rodriguez <[email protected]>
  • Loading branch information
shymega committed Jul 13, 2024
1 parent 0e97a29 commit 27e5f0b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
17 changes: 13 additions & 4 deletions wemod_launcher/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import os
from pathlib import Path
from .utils.configuration import Configuration
from .utils.consts import Consts
from .pfx.wine_utils import WineUtils

cfg: Configuration = Configuration()

Expand Down Expand Up @@ -101,11 +103,18 @@ def get_scan_folder() -> str:
return scan_folder


SCRIPT_IMP_FILE = os.path.realpath(__file__)
SCRIPT_PATH = os.path.dirname(SCRIPT_IMP_FILE)
BAT_COMMAND = ["start", winpath(os.path.join(SCRIPT_PATH, "wemod.bat"))]
CONSTS = Consts()
WINE_UTILS = WineUtils()


SCRIPT_IMP_FILE = str(CONSTS.SCRIPT_PATH)
SCRIPT_PATH = str(CONSTS.SCRIPT_RUNTIME_DIR)
BAT_COMMAND = [
"start",
WINE_UTILS.native_path(os.path.join(SCRIPT_IMP_FILE, "wemod.bat")),
]
BASE_STEAM_COMPAT = get_scan_folder()
STEAM_COMPAT_FOLDER = os.path.dirname(BASE_STEAM_COMPAT)
STEAM_COMPAT_FOLDER = str(CONSTS.STEAM_COMPAT_DATA_DIR)
SCAN_FOLDER = get_scan_folder()
WINETRICKS = os.path.join(SCRIPT_PATH, "winetricks")
WINEPREFIX = os.path.join(BASE_STEAM_COMPAT, "pfx")
Expand Down
1 change: 1 addition & 0 deletions wemod_launcher/utils/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Consts:
SCRIPT_RUNTIME_DIR: Path = Path(
os.path.dirname(os.path.realpath(__file__))
)
SCRIPT_PATH: Path = Path(os.path.realpath(__file__))
STEAM_COMPAT_DATA_DIR: Path = Path(
os.getenv(
"STEAM_COMPAT_DATA_PATH",
Expand Down

0 comments on commit 27e5f0b

Please sign in to comment.