feature: check for deps on start

This commit is contained in:
Dobin Rutishauser
2024-06-17 11:00:45 +02:00
parent 0d320b38d0
commit 5109561418
3 changed files with 21 additions and 1 deletions
+15
View File
@@ -3,6 +3,7 @@ import os
import pathlib
import glob
import logging
import shutil
from config import config
from model.defs import *
@@ -10,6 +11,20 @@ from model.defs import *
logger = logging.getLogger("Utils")
def check_deps():
cl = config.get("path_cl")
if shutil.which(cl) == None:
logger.error("Missing dependency: " + cl)
logger.error("Start in x64 Native Tools Command Prompt for VS 2022")
exit(1)
ml = config.get("path_ml64")
if shutil.which(ml) == None:
logger.error("Missing dependency: " + ml)
logger.error("Start in x64 Native Tools Command Prompt for VS 2022")
exit(1)
def delete_all_files_in_directory(directory_path):
files = glob.glob(os.path.join(directory_path, '*'))
for file_path in files: