Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion engine/templates/windows/installer-beta.iss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ var
ResultCode: Integer;
begin
ExpandedAppDir := ExpandConstant('{app}');

// Set the maximum value for the progress bar to 100 (representing 100%)
WizardForm.ProgressGauge.Max := 100;

// Set the progress bar to 80%
WizardForm.ProgressGauge.Position := 80;
WizardForm.ProgressGauge.Update;

// Add {app} to PATH
CmdLine := Format('setx PATH "%s;%%PATH%%"', [ExpandedAppDir]);
Expand All @@ -48,15 +55,28 @@ begin
WizardForm.StatusLabel.Caption := 'Downloading llama.cpp engine and dependencies ...';
WizardForm.StatusLabel.Update;

// Set the progress bar to 85% after adding to PATH
WizardForm.ProgressGauge.Position := 85;
WizardForm.ProgressGauge.Update;

// Download llamacpp engine by default
CortexInstallCmd := Format('"%s\cortex-beta.exe" engines install cortex.llamacpp', [ExpandedAppDir]);
Exec('cmd.exe', '/C ' + CortexInstallCmd, '', SW_HIDE, ewWaitUntilTerminated, ResultCode);

// Clear the status message after completion
// Set the progress bar to 90% after downloading the engine
WizardForm.ProgressGauge.Position := 90;
WizardForm.ProgressGauge.Update;

// Clear status message after completion
WizardForm.StatusLabel.Caption := '';
WizardForm.StatusLabel.Update;

// Set the progress bar to 100% after completion
WizardForm.ProgressGauge.Position := 100;
WizardForm.ProgressGauge.Update;
end;


procedure DeleteCurrentUserCortexFolderAndConfig;
var
UserCortexFolder: String;
Expand Down
22 changes: 21 additions & 1 deletion engine/templates/windows/installer-nightly.iss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ var
ResultCode: Integer;
begin
ExpandedAppDir := ExpandConstant('{app}');

// Set the maximum value for the progress bar to 100 (representing 100%)
WizardForm.ProgressGauge.Max := 100;

// Set the progress bar to 80%
WizardForm.ProgressGauge.Position := 80;
WizardForm.ProgressGauge.Update;

// Add {app} to PATH
CmdLine := Format('setx PATH "%s;%%PATH%%"', [ExpandedAppDir]);
Expand All @@ -48,15 +55,28 @@ begin
WizardForm.StatusLabel.Caption := 'Downloading llama.cpp engine and dependencies ...';
WizardForm.StatusLabel.Update;

// Set the progress bar to 85% after adding to PATH
WizardForm.ProgressGauge.Position := 85;
WizardForm.ProgressGauge.Update;

// Download llamacpp engine by default
CortexInstallCmd := Format('"%s\cortex-nightly.exe" engines install cortex.llamacpp', [ExpandedAppDir]);
Exec('cmd.exe', '/C ' + CortexInstallCmd, '', SW_HIDE, ewWaitUntilTerminated, ResultCode);

// Clear the status message after completion
// Set the progress bar to 90% after downloading the engine
WizardForm.ProgressGauge.Position := 90;
WizardForm.ProgressGauge.Update;

// Clear status message after completion
WizardForm.StatusLabel.Caption := '';
WizardForm.StatusLabel.Update;

// Set the progress bar to 100% after completion
WizardForm.ProgressGauge.Position := 100;
WizardForm.ProgressGauge.Update;
end;


procedure DeleteCurrentUserCortexFolderAndConfig;
var
UserCortexFolder: String;
Expand Down
22 changes: 21 additions & 1 deletion engine/templates/windows/installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ var
ResultCode: Integer;
begin
ExpandedAppDir := ExpandConstant('{app}');

// Set the maximum value for the progress bar to 100 (representing 100%)
WizardForm.ProgressGauge.Max := 100;

// Set the progress bar to 80%
WizardForm.ProgressGauge.Position := 80;
WizardForm.ProgressGauge.Update;

// Add {app} to PATH
CmdLine := Format('setx PATH "%s;%%PATH%%"', [ExpandedAppDir]);
Expand All @@ -48,15 +55,28 @@ begin
WizardForm.StatusLabel.Caption := 'Downloading llama.cpp engine and dependencies ...';
WizardForm.StatusLabel.Update;

// Set the progress bar to 85% after adding to PATH
WizardForm.ProgressGauge.Position := 85;
WizardForm.ProgressGauge.Update;

// Download llamacpp engine by default
CortexInstallCmd := Format('"%s\cortex.exe" engines install cortex.llamacpp', [ExpandedAppDir]);
Exec('cmd.exe', '/C ' + CortexInstallCmd, '', SW_HIDE, ewWaitUntilTerminated, ResultCode);

// Clear the status message after completion
// Set the progress bar to 90% after downloading the engine
WizardForm.ProgressGauge.Position := 90;
WizardForm.ProgressGauge.Update;

// Clear status message after completion
WizardForm.StatusLabel.Caption := '';
WizardForm.StatusLabel.Update;

// Set the progress bar to 100% after completion
WizardForm.ProgressGauge.Position := 100;
WizardForm.ProgressGauge.Update;
end;


procedure DeleteCurrentUserCortexFolderAndConfig;
var
UserCortexFolder: String;
Expand Down
Loading