import sys
from pathlib import Path

def _get_runtime_base_dir():
    if getattr(sys, "frozen", False):
        return Path(sys.executable).resolve().parent

    return Path(__file__).resolve().parents[2]


ROOT_DIR = _get_runtime_base_dir()
SRC_DIR = ROOT_DIR / "src"
RUNTIME_DIR = ROOT_DIR / "runtime"
RUNTIME_LOG_FILE = RUNTIME_DIR / "runtime.log"
RUNTIME_JOIN_LEAVE_LOG_FILE = RUNTIME_DIR / "join_leave.log"
