mirror of https://github.com/DJ2LS/FreeDATA.git
commit
0c74e3f986
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue