-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.py
More file actions
22 lines (16 loc) · 748 Bytes
/
Copy pathconfig.py
File metadata and controls
22 lines (16 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""CLI defaults and path resolution helpers."""
from pathlib import Path
DEFAULT_CHROMIUM_ROOT = "../simprint-browser/src"
DEFAULT_BUILD_DIR = "out/Release"
DEFAULT_RELEASE_FILE = "chrome/installer/mini_installer/chrome.release"
DEFAULT_EXECUTABLE_NAME = "simprint"
DEFAULT_PACKAGE_DIR = "Simprint-bin"
DEFAULT_OUTPUT_PREFIX = "simprint-browser"
DEFAULT_SECTIONS = "GENERAL,HIDPI,FFMPEG"
DEFAULT_FLATTEN_ZIP = True
def resolve_chromium_root(value: str | Path) -> Path:
root = Path(value)
return root.resolve() if root.is_absolute() else (Path.cwd() / root).resolve()
def resolve_path_from_root(root: Path, value: str | Path) -> Path:
path = Path(value)
return path.resolve() if path.is_absolute() else (root / path).resolve()