Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rmwindowvisible branch merge #491

Merged
merged 19 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1f9aa41
Begin dismantling TMainForm and WindowVisible=yes.
jordanrussell Dec 14, 2024
9d52a24
Setup: De-form TMainForm and set MainFormOnTaskBar=True.
jordanrussell Dec 14, 2024
c29c12e
Finish updating Setup.WizardForm.
jordanrussell Dec 15, 2024
5682846
Finish updating compiler, Struct.
jordanrussell Dec 15, 2024
aef9408
Clean out remaining showing/hiding of app window, and fix taskbar pro…
jordanrussell Dec 15, 2024
ee956cc
Unminimize before displaying message boxes and task dialogs.
jordanrussell Dec 16, 2024
0a0d827
Show message box with no owner when would-be owner form is hidden.
jordanrussell Dec 18, 2024
f9d5475
Use correct owner on task dialogs.
jordanrussell Dec 18, 2024
f6f2f17
Swap order in BringToFrontAndRestore support function to work around …
jordanrussell Dec 18, 2024
5e6334e
Check if WizardForm is minimized before calling Application.BringToFr…
jordanrussell Dec 18, 2024
f1d03c2
BrowseFunc: Don't use Application.Handle.
jordanrussell Dec 18, 2024
3dc9943
Don't allow Application.Restore to show WizardForm if it's hidden.
jordanrussell Dec 19, 2024
e216aae
TSetupForm: Don't center inside a hidden or minimized form.
jordanrussell Dec 20, 2024
7da3a11
Doc: Update for WindowVisible and MainForm removal.
jordanrussell Dec 20, 2024
d5e8603
Replace "WizardForm.Show" with "WizardForm.Visible := True".
jordanrussell Dec 22, 2024
4502469
Use proper owner on BrowseFunc support function dialogs.
jordanrussell Dec 22, 2024
5931308
Remove shBackColorHorizontal.
jordanrussell Dec 22, 2024
672d0dd
Setup: Don't respect the show command passed by the parent process.
jordanrussell Dec 24, 2024
a670bee
Update whatsnew.
jordanrussell Dec 24, 2024
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
10 changes: 2 additions & 8 deletions Components/BrowseFunc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,13 @@ function BrowseForFolder(const Prompt: String; var Directory: String;
Pointer(lParam) := PChar(InitialDir);
end;
ActiveWindow := GetActiveWindow;
WindowList := DisableTaskWindows(0);
WindowList := DisableTaskWindows(ParentWnd);
CoInitialize(nil);
try
IDList := SHBrowseForFolder(BrowseInfo);
finally
CoUninitialize();
EnableTaskWindows(WindowList);
{ SetActiveWindow(Application.Handle) is needed or else the focus doesn't
properly return to ActiveWindow }
SetActiveWindow(Application.Handle);
SetActiveWindow(ActiveWindow);
end;
try
Expand Down Expand Up @@ -169,7 +166,7 @@ function NewGetOpenOrSaveFileName(const Prompt: String; var FileName: String;
ofn.lpstrDefExt := Pointer(DefaultExtension);

ActiveWindow := GetActiveWindow;
WindowList := DisableTaskWindows(0);
WindowList := DisableTaskWindows(ParentWnd);
try
asm
// Avoid FPU control word change in NETRAP.dll, NETAPI32.dll, etc
Expand Down Expand Up @@ -198,9 +195,6 @@ function NewGetOpenOrSaveFileName(const Prompt: String; var FileName: String;
end;
finally
EnableTaskWindows(WindowList);
{ SetActiveWindow(Application.Handle) is needed or else the focus doesn't
properly return to ActiveWindow }
SetActiveWindow(Application.Handle);
SetActiveWindow(ActiveWindow);
end;
end;
Expand Down
10 changes: 6 additions & 4 deletions Components/TaskbarProgressFunc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ procedure SetAppTaskbarProgressState(const State: TTaskbarProgressState);
StateFlags: array[TTaskbarProgressState] of Integer = (
TBPF_NOPROGRESS, TBPF_INDETERMINATE, TBPF_NORMAL, TBPF_ERROR, TBPF_PAUSED);
begin
if InitializeTaskbarList then
TaskbarListInterface.SetProgressState(Application.Handle, StateFlags[State]);
if InitializeTaskbarList and Assigned(Application.MainForm) and
Application.MainForm.HandleAllocated then
TaskbarListInterface.SetProgressState(Application.MainForm.Handle, StateFlags[State]);
end;

procedure SetAppTaskbarProgressValue(const Completed, Total: Cardinal);
begin
if InitializeTaskbarList then
TaskbarListInterface.SetProgressValue(Application.Handle, Completed, Total);
if InitializeTaskbarList and Assigned(Application.MainForm) and
Application.MainForm.HandleAllocated then
TaskbarListInterface.SetProgressValue(Application.MainForm.Handle, Completed, Total);
end;

end.
1 change: 0 additions & 1 deletion ISHelp/ISHelpGen/UIsxclassesParser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ procedure TIsxclassesParser.SaveXML(const HeaderFileName, HeaderFileName2, Foote
end;
end;
end;
WriteLn(F, '<keyword value="MainForm" />');
WriteLn(F, '<keyword value="WizardForm" />');
WriteLn(F, '<keyword value="UninstallProgressForm" />');
finally
Expand Down
95 changes: 18 additions & 77 deletions ISHelp/isetup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,18 +1124,10 @@ DefaultGroupName=My Program

<ul appearance="compact">
<li><link topic="setup_appcopyright">AppCopyright</link></li>
<li><link topic="setup_backcolor">BackColor</link></li>
<li><link topic="setup_backcolor">BackColor2</link></li>
<li><link topic="setup_backcolordirection">BackColorDirection</link></li>
<li><link topic="setup_backsolid">BackSolid</link></li>
<li><link topic="setup_flatcomponentslist">FlatComponentsList</link></li>
<li><link topic="setup_setupiconfile">SetupIconFile</link></li>
<li><link topic="setup_showcomponentsizes">ShowComponentSizes</link></li>
<li><link topic="setup_showtaskstreelines">ShowTasksTreeLines</link></li>
<li><link topic="setup_windowshowcaption">WindowShowCaption</link></li>
<li><link topic="setup_windowstartmaximized">WindowStartMaximized</link></li>
<li><link topic="setup_windowresizable">WindowResizable</link></li>
<li><link topic="setup_windowvisible">WindowVisible</link></li>
<li><link topic="setup_wizardimagealphaformat">WizardImageAlphaFormat</link></li>
<li><link topic="setup_wizardimagefile">WizardImageFile</link></li>
<li><link topic="setup_wizardimagestretch">WizardImageStretch</link></li>
Expand All @@ -1151,12 +1143,20 @@ DefaultGroupName=My Program

<ul appearance="compact">
<li><link topic="setup_alwayscreateuninstallicon">AlwaysCreateUninstallIcon</link></li>
<li><link topic="setup_windowvisible">BackColor</link></li>
<li><link topic="setup_windowvisible">BackColor2</link></li>
<li><link topic="setup_windowvisible">BackColorDirection</link></li>
<li><link topic="setup_windowvisible">BackSolid</link></li>
<li><link topic="setup_disableappenddir">DisableAppendDir</link></li>
<li><link topic="setup_dontmergeduplicatefiles">DontMergeDuplicateFiles</link></li>
<li><link topic="setup_messagesfile">MessagesFile</link></li>
<li><link topic="setup_uninstalliconfile">UninstallIconFile</link></li>
<li><link topic="setup_uninstalliconname">UninstallIconName</link></li>
<li><link topic="setup_uninstallstyle">UninstallStyle</link></li>
<li><link topic="setup_windowvisible">WindowResizable</link></li>
<li><link topic="setup_windowvisible">WindowShowCaption</link></li>
<li><link topic="setup_windowvisible">WindowStartMaximized</link></li>
<li><link topic="setup_windowvisible">WindowVisible</link></li>
<li><link topic="setup_wizardimagebackcolor">WizardImageBackColor</link></li>
<li><link topic="setup_wizardsmallimagebackcolor">WizardSmallImageBackColor</link></li>
</ul>
Expand Down Expand Up @@ -4032,41 +4032,6 @@ Keep the default set of selected tasks, but deselect the "desktopicon" task:<br/
</body>
</setuptopic>

<setuptopic directive="BackColor" title="BackColor, BackColor2">
<keyword value="BackColor2" />
<setupvalid>A value in the form of <tt>$<i>bbggrr</i></tt>, where <tt>rr</tt>, <tt>gg</tt>, and <tt>bb</tt> specify the two-digit intensities (in hexadecimal) for red, green, and blue respectively. Or it may be one of the following predefined color names: clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite.</setupvalid>
<setupdefault><tt>clBlue</tt> for <tt>BackColor</tt>,<br/><tt>clBlack</tt> for <tt>BackColor2</tt></setupdefault>
<body>
<p>The <tt>BackColor</tt> directive specifies the color to use at the top (or left, if <tt>BackColorDirection=lefttoright</tt>) of the setup window's gradient background. <tt>BackColor2</tt> specifies the color to use at the bottom (or right).</p>
<p>The setting of <tt>BackColor2</tt> is ignored if <tt>BackSolid=yes</tt>.</p>
<examples>
<pre>
BackColor=clBlue
BackColor2=clBlack

BackColor=$FF0000
BackColor2=$000000
</pre>
</examples>
</body>
</setuptopic>

<setuptopic directive="BackColorDirection">
<setupvalid><tt>toptobottom</tt> or <tt>lefttoright</tt></setupvalid>
<setupdefault><tt>toptobottom</tt></setupdefault>
<body>
<p>This determines the direction of the gradient background on the setup window. If <tt>BackColorDirection</tt> is <tt>toptobottom</tt>, it is drawn from top to bottom; if it is <tt>lefttoright</tt>, it is drawn from left to right.</p>
</body>
</setuptopic>

<setuptopic directive="BackSolid">
<setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
<setupdefault><tt>no</tt></setupdefault>
<body>
<p>This specifies whether to use a solid or gradient background on the setup window. If this is <tt>yes</tt>, the background is a solid color (the color specified by <tt>BackColor</tt>; <tt>BackColor2</tt> is ignored).</p>
</body>
</setuptopic>

<setuptopic directive="AppName">
<body>
<p>This required directive specifies the name of the application being installed. Do not include the version number, as that is defined by the <link topic="setup_appversion">AppVersion</link> and/or <link topic="setup_appvername">AppVerName</link> directives. <tt>AppName</tt> is displayed throughout the Setup program and uninstaller in window titles, wizard pages, and dialog boxes. The value may include constants.</p>
Expand Down Expand Up @@ -4165,8 +4130,7 @@ CreateMutex 0&amp;, 0&amp;, "MyProgramsMutexName"

<setuptopic directive="AppCopyright">
<body>
<p>Specifies a copyright message that Setup will display in the bottom-right corner of Setup's background window when <link topic="setup_windowvisible">WindowVisible</link> is <tt>yes</tt>.</p>
<p>The value of this directive is also used as the default value for the <link topic="setup_versioninfocopyright">VersionInfoCopyright</link> directive if it is not specified.</p>
<p>The value of this directive is used as the default value for the <link topic="setup_versioninfocopyright">VersionInfoCopyright</link> directive if it is not specified.</p>
<example><pre>AppCopyright=Copyright (C) 1997-2005 My Company, Inc.</pre></example>
</body>
</setuptopic>
Expand Down Expand Up @@ -5084,39 +5048,16 @@ DiskSliceSize=1457664
</body>
</setuptopic>

<setuptopic directive="WindowShowCaption">
<setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
<setupdefault><tt>yes</tt></setupdefault>
<body>
<p>If set to <tt>no</tt>, Setup will be truly "full screen" -- it won't have a caption bar or border, and it will be on top of the taskbar.</p>
<p>This directive has no effect if <tt>WindowVisible</tt> is not set to <tt>yes</tt>.</p>
</body>
</setuptopic>

<setuptopic directive="WindowStartMaximized">
<setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
<setupdefault><tt>yes</tt></setupdefault>
<body>
<p>If set to <tt>yes</tt>, the Setup program's background window will initially be displayed in a maximized state, where it won't cover over the taskbar.</p>
<p>This directive has no effect if <tt>WindowVisible</tt> is not set to <tt>yes</tt>.</p>
</body>
</setuptopic>

<setuptopic directive="WindowResizable">
<setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
<setupdefault><tt>yes</tt></setupdefault>
<body>
<p>If set to <tt>no</tt>, the user won't be able to resize the Setup program's background window when it's not maximized.</p>
<p>This directive has no effect if <tt>WindowVisible</tt> is not set to <tt>yes</tt>.</p>
</body>
</setuptopic>

<setuptopic directive="WindowVisible">
<setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
<setupdefault><tt>no</tt></setupdefault>
<setuptopic directive="WindowVisible" title="BackColor, BackColor2, BackColorDirection, BackSolid, WindowResizable, WindowShowCaption, WindowStartMaximized, WindowVisible">
<keyword value="BackColor" />
<keyword value="BackColor2" />
<keyword value="BackColorDirection" />
<keyword value="BackSolid" />
<keyword value="WindowResizable" />
<keyword value="WindowShowCaption" />
<keyword value="WindowStartMaximized" />
<body>
<p>If set to <tt>yes</tt>, there will be a gradient background window displayed behind the wizard.</p>
<p>Note that this is considered a legacy feature; it likely will be removed at some point in the future.</p>
<p><i>Obsolete in 6.4.</i> These directives are no longer supported. In past versions, they were used to configure a 1990s-style gradient background behind the wizard window. This long-deprecated feature has been removed.</p>
</body>
</setuptopic>

Expand Down
3 changes: 1 addition & 2 deletions ISHelp/isxclasses.header2
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<body>

<p>Below is the list of support classes that can be used from within the Pascal script. There are also three support objects available globally:</p>
<p>Below is the list of support classes that can be used from within the Pascal script. There are also two support objects available globally:</p>

<ul>
<li><tt><a name="WizardForm">WizardForm</a></tt> of type <anchorlink name="TWizardForm">TWizardForm</anchorlink>.</li>
<li><tt><a name="UninstallProgressForm">UninstallProgressForm</a></tt> of type <anchorlink name="TUninstallProgressForm">TUninstallProgressForm</anchorlink>.</li>
<li><tt><a name="MainForm">MainForm</a></tt> of type <anchorlink name="TMainForm">TMainForm</anchorlink> (only visible if <link topic="setup_windowvisible">WindowVisible</link> is set to <tt>yes</tt>.)</li>
</ul>

<p>Parameter type <tt>AnyString</tt> means both <tt>String</tt> and <tt>AnsiString</tt> can be used.</p>
Expand Down
4 changes: 0 additions & 4 deletions ISHelp/isxclasses.pas
Original file line number Diff line number Diff line change
Expand Up @@ -804,10 +804,6 @@ TSetupForm = class(TUIStateForm)
property SizeAndCenterOnShow: Boolean; read write;
end;

TMainForm = class(TSetupForm)
procedure ShowAboutBox;
end;

TWizardForm = class(TSetupForm)
property CancelButton: TNewButton; read;
property NextButton: TNewButton; read;
Expand Down
24 changes: 11 additions & 13 deletions ISHelp/isxclasses_wordlists_generated.pas
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@ interface
'TFolderTreeView', 'TFont', 'TFontStyle', 'TFontStyles', 'TForm', 'TFormBorderStyle',
'TFormStyle', 'TGraphic', 'TGraphicControl', 'TGraphicsObject', 'THandleStream', 'TInputDirWizardPage',
'TInputFileWizardPage', 'TInputOptionWizardPage', 'TInputQueryWizardPage', 'TKeyEvent',
'TKeyPressEvent', 'TLabel', 'TLinkLabel', 'TListBox', 'TListBoxStyle', 'TMainForm',
'TMemo', 'TNewButton', 'TNewCheckBox', 'TNewCheckListBox', 'TNewComboBox', 'TNewEdit',
'TNewLinkLabel', 'TNewListBox', 'TNewMemo', 'TNewNotebook', 'TNewNotebookPage', 'TNewProgressBar',
'TNewProgressBarState', 'TNewProgressBarStyle', 'TNewRadioButton', 'TNewStaticText',
'TNotifyEvent', 'TObject', 'TOutputMarqueeProgressWizardPage', 'TOutputMsgMemoWizardPage',
'TOutputMsgWizardPage', 'TOutputProgressWizardPage', 'TPanel', 'TPanelBevel', 'TPasswordEdit',
'TPen', 'TPenMode', 'TPenStyle', 'TPersistent', 'TPosition', 'TRadioButton', 'TRichEditViewer',
'TScrollingWinControl', 'TScrollStyle', 'TSetupForm', 'TShiftState', 'TSizeConstraints',
'TStartMenuFolderTreeView', 'TStream', 'TStringList', 'TStrings', 'TStringStream',
'TSysLinkEvent', 'TSysLinkType', 'TUIStateForm', 'TUninstallProgressForm', 'TWinControl',
'TWizardForm', 'TWizardPage', 'TWizardPageButtonEvent', 'TWizardPageCancelEvent', 'TWizardPageNotifyEvent',
'TWizardPageShouldSkipEvent'
'TKeyPressEvent', 'TLabel', 'TLinkLabel', 'TListBox', 'TListBoxStyle', 'TMemo', 'TNewButton',
'TNewCheckBox', 'TNewCheckListBox', 'TNewComboBox', 'TNewEdit', 'TNewLinkLabel', 'TNewListBox',
'TNewMemo', 'TNewNotebook', 'TNewNotebookPage', 'TNewProgressBar', 'TNewProgressBarState',
'TNewProgressBarStyle', 'TNewRadioButton', 'TNewStaticText', 'TNotifyEvent', 'TObject',
'TOutputMarqueeProgressWizardPage', 'TOutputMsgMemoWizardPage', 'TOutputMsgWizardPage',
'TOutputProgressWizardPage', 'TPanel', 'TPanelBevel', 'TPasswordEdit', 'TPen', 'TPenMode',
'TPenStyle', 'TPersistent', 'TPosition', 'TRadioButton', 'TRichEditViewer', 'TScrollingWinControl',
'TScrollStyle', 'TSetupForm', 'TShiftState', 'TSizeConstraints', 'TStartMenuFolderTreeView',
'TStream', 'TStringList', 'TStrings', 'TStringStream', 'TSysLinkEvent', 'TSysLinkType',
'TUIStateForm', 'TUninstallProgressForm', 'TWinControl', 'TWizardForm', 'TWizardPage',
'TWizardPageButtonEvent', 'TWizardPageCancelEvent', 'TWizardPageNotifyEvent', 'TWizardPageShouldSkipEvent'
];

PascalEnumValues_Isxclasses: array of AnsiString = [
Expand Down Expand Up @@ -155,7 +154,6 @@ interface
'procedure SetProgress(Position, Max: Longint);',
'procedure SetText(Msg1, Msg2: String);',
'procedure Show;',
'procedure ShowAboutBox;',
'procedure Sort;',
'procedure TextOut(X, Y: Integer; Text: String);',
'procedure Update;',
Expand Down
6 changes: 0 additions & 6 deletions ISHelp/isxfunc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,6 @@ end;</pre></example>
<description><p>Returns the <tt>UninstallProgressForm</tt> support object, or raises an internal error if the object has not yet been created.</p></description>
<seealso><p><link topic="scriptclasses" anchor="UninstallProgressForm">UninstallProgressForm</link></p></seealso>
</function>
<function>
<name>GetMainForm</name>
<prototype>function GetMainForm: TMainForm;</prototype>
<description><p>Returns the <tt>MainForm</tt> support object, or raises an internal error if the object has not yet been created.</p></description>
<seealso><p><link topic="scriptclasses" anchor="MainForm">MainForm</link></p></seealso>
</function>
</subcategory>
</category>
<category>
Expand Down
Loading