Merge pull request #1116 from DJ2LS/develop-kgb-2507

Develop kgb 2507 - windows config
develop
DJ2LS 2026-08-10 08:02:47 +02:00 committed by GitHub
commit 0c74e3f986
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@ Name "FreeDATA Installer"
OutFile "FreeDATA-Installer.exe"
; Default installation directory for the server
InstallDir "$LOCALAPPDATA\FreeDATA"
InstallDir "$APPDATA\FreeDATA"
; Registry key to store the installation directory
InstallDirRegKey HKCU "Software\FreeDATA" "Install_Dir"

View File

@ -45,9 +45,11 @@ def resolve_config_path() -> str:
if not os.path.exists(candidate):
# We cannot log to file yet since we don't know the directory; write to stderr.
template = os.path.join(os.path.dirname(__file__), "config.ini.example")
try:
os.makedirs(os.path.dirname(candidate), exist_ok=True)
template = os.path.join(os.path.dirname(__file__), "config.ini")
print(f"template {template}")
if os.path.isfile(template):
shutil.copyfile(template, candidate)
sys.stderr.write(f"[INFO] No config found - created a default one at: {candidate}\n")