New Version

This commit is contained in:
adator
2024-08-03 17:01:19 +02:00
parent 19b7f85ec7
commit 6e6d001605
6 changed files with 334 additions and 233 deletions

22
core/sys_configuration.py Normal file
View File

@@ -0,0 +1,22 @@
import os, json
####################################################################################################
# DO NOT TOUCH THIS FILE #
####################################################################################################
class SysConfig:
DEFENDER_VERSION = '4.0.0' # MAJOR.MINOR.BATCH
LATEST_DEFENDER_VERSION = '0.0.0' # Latest Version of Defender in git
DEFENDER_DB_PATH = 'db' + os.sep # Séparateur en fonction de l'OS
DEFENDER_DB_NAME = 'defender' # Le nom de la base de données principale
def __init__(self) -> None:
version_filename = f'.{os.sep}version.json'
with open(version_filename, 'r') as version_data:
self.global_configuration:dict[str, str] = json.load(version_data)
self.DEFENDER_VERSION = self.global_configuration["version"]
return None