Skip to content

Commit

Permalink
add "Start Shotcut After Install" to installer
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 28, 2023
1 parent ad119b6 commit c784cfa
Showing 1 changed file with 39 additions and 36 deletions.
75 changes: 39 additions & 36 deletions packaging/windows/shotcut.iss
Original file line number Diff line number Diff line change
Expand Up @@ -62,46 +62,49 @@ Root: HKCR; Subkey: "Shotcut.mlt"; ValueType: string; ValueName: ""; ValueData:
Root: HKCR; Subkey: "Shotcut.mlt\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\shotcut.exe"" ""%1"""; Check: IsAdminInstallMode; Tasks: associateExtension
Root: HKCU; Subkey: "Software\Meltytech\Shotcut"; Tasks: removeSettings; AfterInstall: RemoveShotcutSettings()

[Run]
Filename: "{app}\shotcut.exe"; Description: "Start Shotcut After Install"; Flags: postinstall nowait skipifsilent

[Code]
procedure RemoveShotcutSettings();
begin
RegDeleteKeyIncludingSubkeys(HKEY_CURRENT_USER, 'Software\Meltytech');
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
Result := IsAdminInstallMode and (PageID = wpUserInfo);
end;
procedure InitializeWizard();
var
CustomStatusLabel: TNewStaticText;
begin
// Hide radio buttons on License page and pre-select "accept" to enable "next" button
WizardForm.LicenseAcceptedRadio.Checked := True;
WizardForm.LicenseAcceptedRadio.Visible := False;
WizardForm.LicenseNotAcceptedRadio.Visible := False;
WizardForm.LicenseLabel1.Visible := False;
WizardForm.LicenseMemo.Top := WizardForm.LicenseLabel1.Top;
WizardForm.LicenseMemo.Height :=
WizardForm.LicenseNotAcceptedRadio.Top +
WizardForm.LicenseNotAcceptedRadio.Height -
WizardForm.LicenseMemo.Top - ScaleY(5);
WizardForm.FilenameLabel.Visible := False;
WizardForm.StatusLabel.Visible := False;
WizardForm.ProgressGauge.Top := WizardForm.InstallingPage.Height - ScaleY(60);
CustomStatusLabel := TNewStaticText.Create(WizardForm);
CustomStatusLabel.Parent := WizardForm.InstallingPage;
CustomStatusLabel.Caption := 'Installing Shotcut...';
CustomStatusLabel.Font.Size := CustomStatusLabel.Font.Size + 4;
CustomStatusLabel.Font.Style := [fsBold];
CustomStatusLabel.AutoSize := True;
CustomStatusLabel.Top :=
WizardForm.ProgressGauge.Top - CustomStatusLabel.Height - ScaleY(8);
CustomStatusLabel.Left :=
WizardForm.ProgressGauge.Left +
((WizardForm.ProgressGauge.Width - CustomStatusLabel.Width) div 2);
end;
begin
Result := IsAdminInstallMode and (PageID = wpUserInfo);
end;
procedure InitializeWizard();
var
CustomStatusLabel: TNewStaticText;
begin
// Hide radio buttons on License page and pre-select "accept" to enable "next" button
WizardForm.LicenseAcceptedRadio.Checked := True;
WizardForm.LicenseAcceptedRadio.Visible := False;
WizardForm.LicenseNotAcceptedRadio.Visible := False;
WizardForm.LicenseLabel1.Visible := False;
WizardForm.LicenseMemo.Top := WizardForm.LicenseLabel1.Top;
WizardForm.LicenseMemo.Height :=
WizardForm.LicenseNotAcceptedRadio.Top +
WizardForm.LicenseNotAcceptedRadio.Height -
WizardForm.LicenseMemo.Top - ScaleY(5);
WizardForm.FilenameLabel.Visible := False;
WizardForm.StatusLabel.Visible := False;
WizardForm.ProgressGauge.Top := WizardForm.InstallingPage.Height - ScaleY(60);
CustomStatusLabel := TNewStaticText.Create(WizardForm);
CustomStatusLabel.Parent := WizardForm.InstallingPage;
CustomStatusLabel.Caption := 'Installing Shotcut...';
CustomStatusLabel.Font.Size := CustomStatusLabel.Font.Size + 4;
CustomStatusLabel.Font.Style := [fsBold];
CustomStatusLabel.AutoSize := True;
CustomStatusLabel.Top :=
WizardForm.ProgressGauge.Top - CustomStatusLabel.Height - ScaleY(8);
CustomStatusLabel.Left :=
WizardForm.ProgressGauge.Left +
((WizardForm.ProgressGauge.Width - CustomStatusLabel.Width) div 2);
end;

0 comments on commit c784cfa

Please sign in to comment.