refactor: unify project handling (cmdline = projects/default)

This commit is contained in:
Dobin
2024-03-29 20:29:33 +00:00
parent 70eb0bf798
commit 4410685d0d
7 changed files with 53 additions and 44 deletions
+3 -9
View File
@@ -1,5 +1,8 @@
import logging
from model.defs import *
logger = logging.getLogger("Views")
class Settings():
def __init__(self, web=""):
@@ -28,15 +31,6 @@ class Settings():
self.generate_shc_from_asm: bool = True
def prep(self):
self.main_dir = "{}{}/".format(PATH_CARRIER, self.source_style.value)
self.template_path = self.main_dir + "template.c"
self.main_c_path = self.main_dir + "main.c"
self.main_asm_path = self.main_dir + "main.asm"
self.main_exe_path = self.main_dir + "main.exe"
self.main_shc_path = self.main_dir + "main.bin"
def prep_web(self, project_name):
self.main_dir = "{}{}/".format(PATH_WEB_PROJECT, project_name)
self.template_path = self.main_dir + "template.c"