feat(licensing): add WebUI license import modal, remove lic step from setup, default unlicensed to 0 seats
This commit is contained in:
@@ -51,7 +51,6 @@ Type: filesandordirs; Name: "{commonappdata}\LOGAR-Server"
|
||||
[Code]
|
||||
var
|
||||
DataDirPage: TInputDirWizardPage;
|
||||
LicFilePage: TInputFileWizardPage;
|
||||
|
||||
procedure InitializeWizard;
|
||||
begin
|
||||
@@ -66,15 +65,6 @@ begin
|
||||
);
|
||||
DataDirPage.Add('Data Directory:');
|
||||
DataDirPage.Values[0] := ExpandConstant('{commonappdata}\LOGAR-Server');
|
||||
|
||||
LicFilePage := CreateInputFilePage(
|
||||
DataDirPage.ID,
|
||||
'Enterprise License Activation (Optional)',
|
||||
'Do you have an activated .lic license file to import during installation?',
|
||||
'Select your signed .lic file to activate the server immediately.'#13#10#13#10 +
|
||||
'You can also leave this blank to initialize with a default evaluation license and activate later via the web dashboard.'
|
||||
);
|
||||
LicFilePage.Add('License File (.lic):', 'License Files (*.lic)|*.lic|All Files (*.*)|*.*', '.lic');
|
||||
end;
|
||||
|
||||
function GetDataDir(Param: String): String;
|
||||
@@ -84,32 +74,11 @@ begin
|
||||
Result := ExpandConstant('{commonappdata}\LOGAR-Server');
|
||||
end;
|
||||
|
||||
function GetLicFile(Param: String): String;
|
||||
begin
|
||||
Result := LicFilePage.Values[0];
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
var
|
||||
LicPath: String;
|
||||
ResultCode: Integer;
|
||||
begin
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\LOGAR\LOGAR-Server', 'DataDir', GetDataDir(''));
|
||||
|
||||
LicPath := GetLicFile('');
|
||||
if (LicPath <> '') and FileExists(LicPath) then
|
||||
begin
|
||||
Exec(
|
||||
ExpandConstant('{app}\Server.exe'),
|
||||
'--config "' + GetDataDir('') + '\server_config.json" --import-lic "' + LicPath + '"',
|
||||
ExpandConstant('{app}'),
|
||||
SW_HIDE,
|
||||
ewWaitUntilTerminated,
|
||||
ResultCode
|
||||
);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user