update generator scripts

This commit is contained in:
2022-03-01 18:03:50 +01:00
parent b8a4384c91
commit 2a730df2a8
5 changed files with 108 additions and 65 deletions

View File

@ -2,9 +2,18 @@ import os
import enum
from pathlib import Path
PATH_VAR_ROOT = Path(os.path.abspath(os.curdir))
ROOT_DIR = PATH_VAR_ROOT.absolute()
OBSW_ROOT_DIR = PATH_VAR_ROOT.parent.absolute()
def determine_obsw_root_path() -> str:
for _ in range(5):
if os.path.exists("CMakeLists.txt"):
return os.curdir
else:
os.chdir("..")
PATH_VAR_ROOT = os.path.dirname(os.path.realpath(__file__))
ROOT_DIR = PATH_VAR_ROOT
OBSW_ROOT_DIR = Path(determine_obsw_root_path())
DATABASE_NAME = "eive_mod.db"