windows installer fixes
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m9s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 10m27s

This commit is contained in:
2026-09-26 21:21:36 +02:00
parent 8287af3129
commit 157229a84e
9 changed files with 244 additions and 14 deletions
+25
View File
@@ -50,6 +50,7 @@ Type: filesandordirs; Name: "{commonappdata}\LOGAR"
[Code]
var
DataDirPage: TInputDirWizardPage;
ConfigFilePage: TInputFileWizardPage;
procedure InitializeWizard;
begin
@@ -64,6 +65,16 @@ begin
);
DataDirPage.Add('Data Directory:');
DataDirPage.Values[0] := ExpandConstant('{commonappdata}\LOGAR');
ConfigFilePage := CreateInputFilePage(
DataDirPage.ID,
'Import Client Configuration (Optional)',
'Do you have a pre-exported client_config.json profile to import?',
'Select your client_config.json profile exported from the LOGAR Server Hub.'#13#10#13#10 +
'If selected, this configuration will be copied into the data directory and used for automated server connection and enrollment.'#13#10#13#10 +
'You can also leave this blank to place client_config.json in the data directory manually later.'
);
ConfigFilePage.Add('Client Configuration (client_config.json):', 'JSON Files (*.json)|*.json|All Files (*.*)|*.*', '.json');
end;
function GetDataDir(Param: String): String;
@@ -73,11 +84,25 @@ begin
Result := ExpandConstant('{commonappdata}\LOGAR');
end;
function GetConfigFile(Param: String): String;
begin
Result := ConfigFilePage.Values[0];
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
CfgPath, DestCfg: String;
begin
if CurStep = ssPostInstall then
begin
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\LOGAR\LOGAR-Client', 'DataDir', GetDataDir(''));
CfgPath := GetConfigFile('');
if (CfgPath <> '') and FileExists(CfgPath) then
begin
DestCfg := GetDataDir('') + '\client_config.json';
FileCopy(CfgPath, DestCfg, False);
end;
end;
end;