@@ -115,6 +115,7 @@ Filename: "{app}\{#AppExeName}"; Description: "Launch {#AppName}"; \
115115[Code]
116116var
117117 Doc2MdDownloadPage: TDownloadWizardPage;
118+ Doc2MdInstallPage: TOutputMarqueeProgressWizardPage;
118119
119120{ Keep the install directory aligned with the Document Conversion plugin contract. }
120121function GetDoc2MdInstallDirectory (): String;
@@ -187,14 +188,20 @@ begin
187188 end ;
188189end ;
189190
190- { Create the prerequisite progress page used by interactive installations. }
191+ { Create the prerequisite progress pages used by interactive installations. }
191192procedure InitializeWizard ;
192193begin
193194 Doc2MdDownloadPage := CreateDownloadPage(
194195 ' Downloading DOC2MD' ,
195196 ' Setup is downloading the Document Conversion dependency.' ,
196197 nil );
197198 Doc2MdDownloadPage.ShowBaseNameInsteadOfUrl := True;
199+
200+ { The silent install has no native progress, so surface an animated page to
201+ keep the wizard responsive-looking instead of appearing frozen. }
202+ Doc2MdInstallPage := CreateOutputMarqueeProgressPage(
203+ ' Installing DOC2MD' ,
204+ ' Setup is installing the Document Conversion dependency.' );
198205end ;
199206
200207{ Install DOC2MD before NoteManager files are copied and fail closed on errors. }
@@ -229,17 +236,26 @@ begin
229236 ' /LOG=' + AddQuotes(SetupLogPath);
230237
231238 Log(' Installing DOC2MD silently at ' + GetDoc2MdInstallDirectory() + ' .' );
232- if not Exec(
233- InstallerPath,
234- InstallerParameters,
235- ExpandConstant(' {tmp}' ),
236- SW_HIDE,
237- ewWaitUntilTerminated,
238- ResultCode) then
239- begin
240- Result := Format(
241- ' Unable to start the DOC2MD installer: %s' , [SysErrorMessage(ResultCode)]);
242- Exit;
239+ Doc2MdInstallPage.SetText(
240+ ' Installing the Document Conversion dependency.' ,
241+ GetDoc2MdInstallDirectory());
242+ Doc2MdInstallPage.Show;
243+ Doc2MdInstallPage.Animate;
244+ try
245+ if not Exec(
246+ InstallerPath,
247+ InstallerParameters,
248+ ExpandConstant(' {tmp}' ),
249+ SW_HIDE,
250+ ewWaitUntilTerminated,
251+ ResultCode) then
252+ begin
253+ Result := Format(
254+ ' Unable to start the DOC2MD installer: %s' , [SysErrorMessage(ResultCode)]);
255+ Exit;
256+ end ;
257+ finally
258+ Doc2MdInstallPage.Hide;
243259 end ;
244260
245261 if ResultCode = 3010 then
0 commit comments