@@ -72,33 +72,36 @@ AllowNoIcons=yes
7272Compression = lzma2
7373SolidCompression = yes
7474
75- ; "ArchitecturesAllowed=x64" specifies that Setup cannot run on
76- ; anything but x64.
77- ArchitecturesAllowed = x64
75+ ; "ArchitecturesAllowed=x64" specifies that Setup cannot run on anything but x64.
76+ ArchitecturesAllowed = x64os
7877
79- ; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
80- ; done in "64-bit mode" on x64, meaning it should use the native
81- ; 64-bit Program Files directory and the 64-bit view of the registry.
78+ ; "ArchitecturesInstallIn64BitMode=x64" requests that the install be done in
79+ ; "64-bit mode" on x64, meaning it should use the native 64-bit Program Files
80+ ; directory and the 64-bit view of the registry.
8281ArchitecturesInstallIn64BitMode = x64
8382
8483PrivilegesRequired = admin
8584CloseApplications = no
8685
87- ; To allow Inno to sign the installer (and uninstaller) you need to do this one-off setup:
88- ; To sign the installer and uninstaller configure the signing tools in the Inno Setup Compiler
89- ; 1. Configure the signing tools in the Inno Setup Compiler using 'Tools/Configure Sign Tools ...'
90- ; to create a Sign Tool:
91- ; name = EvSigning
92- ; content = signtool.exe sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /sha1 460f1f0bb84891b110aac4fd071b6a3c2931cc2b $f
93- ; 2. Ensure that "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64" is in the path so
94- ; SignTool.exe will be found
86+ ; To allow Inno to sign the installer (and uninstaller) you need to do this one-
87+ ; off setup:
9588;
96- ; We're using a digicert EV Code Signing certificate that's stored on a USB drive. The USB drive's
97- ; driver makes it look like the certificate is installed in windows. So just specifying the
98- ; fingerprint is enough info for Windows to know where to get the certificate.
89+ ; To sign the installer and uninstaller configure the signing tools in the Inno
90+ ; Setup Compiler
91+ ; 1. Configure the signing tools in the Inno Setup Compiler using
92+ ; 'Tools/Configure Sign Tools ...' to create a Sign Tool:
93+ ; name = EvSigning
94+ ; content = signtool.exe sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /sha1 460f1f0bb84891b110aac4fd071b6a3c2931cc2b $f
95+ ; 2. Ensure that "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64"
96+ ; is in the path so SignTool.exe will be found
97+ ;
98+ ; We're using a digicert EV Code Signing certificate that's stored on a USB drive.
99+ ; The USB drive's driver makes it look like the certificate is installed in
100+ ; windows. So just specifying the fingerprint is enough info for Windows to know
101+ ; where to get the certificate.
99102;
100103; if you don't have the signing token, comment out the following line
101- SignTool = EvSigning
104+ ; SignTool=EvSigning
102105
103106[Types]
104107Name : " full" ; Description : " Full installation"
@@ -301,8 +304,8 @@ begin
301304 InitModules();
302305 SelectModulesPage := CreateInputOptionPage(wpSelectTasks, ' Add Modules' ,
303306 ' Check the Modules you want to add to your new or existing installation. Existing modules will only be removed if you checked the box on the previous page.' ,
304- ' When you have selected all the Modules you want to add, click Next' ,
305- False, false)
307+ ' When you have selected all the Modules you want to add, click Next' ,
308+ False, false)
306309
307310 checkboxList := SelectModulesPage.CheckListBox;
308311 num_modules := 0 ;
@@ -315,7 +318,8 @@ begin
315318 end
316319 else
317320 begin
318- checkboxList.AddCheckBox(Modules[i].title, Modules[i].module_id, 1 , Modules[i].isChecked, True, False, True, nil );
321+ checkboxList.AddCheckBox(Modules[i].title, Modules[i].module_id, 1 , Modules[i].isChecked,
322+ True, False, True, nil );
319323 num_modules := num_modules + 1 ;
320324 end ;
321325 end ;
332336
333337begin
334338 FileName := ExpandConstant(' {app}\Server\installmodules.json' );
335- FileDir := ExpandConstant(' {app}\Server\' );
339+ FileDir := ExpandConstant(' {app}\Server\' );
336340 Log(FileName);
337341
338342 output := ' {' + #13 #10 ;
@@ -348,7 +352,9 @@ begin
348352 begin
349353 Log(checkboxList.ItemCaption[i-1 ]);
350354 if (not FirstItem) then
351- output := output + ' ; ' ;
355+ begin
356+ output := output + ' ; ' ;
357+ end ;
352358 FirstItem := False;
353359 output := output + checkboxList.ItemSubItem[i-1 ];
354360 end ;
@@ -359,15 +365,17 @@ begin
359365 output := output + ' }' + #13 #10 ;
360366
361367 Log(output);
368+
362369 ForceDirectories(FileDir);
363370 SaveStringToFile(FileName, output, False);
371+
364372 Result := True;
365373end ;
366374
367-
368375procedure InitializeWizard ;
369376begin
370- DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnDownloadProgress);
377+ DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc),
378+ @OnDownloadProgress);
371379 CreateModuleSelectPage();
372380end ;
373381
@@ -385,48 +393,57 @@ begin
385393
386394 if (InstallHostingBundle or InstallVCRedist) then
387395 begin
388- hostingBundleInstaller := ExpandConstant(' {tmp}\{#HostingBundleInstallerExe}' );
389- vcRedistInstaller := ExpandConstant(' {tmp}\{#VCRedistInstallerExe}' );
396+ hostingBundleInstaller := ExpandConstant(' {tmp}\{#HostingBundleInstallerExe}' );
397+ vcRedistInstaller := ExpandConstant(' {tmp}\{#VCRedistInstallerExe}' );
390398
391- DownloadPage.Clear;
399+ DownloadPage.Clear;
392400
393- // Use AddEx to specify a username and password
394- if InstallHostingBundle then
395- DownloadPage.Add(' {#HostingBundleDownloadURL}' , ' {#HostingBundleInstallerExe}' , ' {#HostingBundleSHA256}' );
401+ // Use AddEx to specify a username and password
402+ if InstallHostingBundle then
403+ DownloadPage.Add(' {#HostingBundleDownloadURL}' , ' {#HostingBundleInstallerExe}' , ' {#HostingBundleSHA256}' );
396404
397- if InstallVCRedist then
398- DownloadPage.Add(' {#VCRedistDownloadURL}' , ' {#VCRedistInstallerExe}' , ' {#VCRedistSHA256}' );
405+ if InstallVCRedist then
406+ DownloadPage.Add(' {#VCRedistDownloadURL}' , ' {#VCRedistInstallerExe}' , ' {#VCRedistSHA256}' );
399407
400- DownloadPage.Show;
401- try
402- try
403- DownloadPage.Download; // This downloads the files to {tmp}
408+ DownloadPage.Show;
404409
405- if InstallHostingBundle then
406- begin
407- Exec(hostingBundleInstaller, ' /install /quiet /norestart' , ' ' , SW_HIDE, ewWaitUntilTerminated, iResultCode)
408- DeleteFile(hostingBundleInstaller);
409- end ;
410-
411- if InstallVCRedist then
412- begin
413- Exec(vcRedistInstaller, ' /install /quiet /norestart' , ' ' , SW_HIDE, ewWaitUntilTerminated, iResultCode)
414- DeleteFile(vcRedistInstaller);
415- end ;
410+ try // Outer 'try' so we have a 'finally' clause to always hide the windows
411+
412+ try // Inner 'try' to handle issues (feels hack-ey)
413+ DownloadPage.Download; // This downloads the files to {tmp}
414+
415+ if InstallHostingBundle then
416+ begin
417+ Exec(hostingBundleInstaller, ' /install /quiet /norestart' , ' ' , SW_HIDE, ewWaitUntilTerminated, iResultCode)
418+ DeleteFile(hostingBundleInstaller);
419+ end ;
420+
421+ if InstallVCRedist then
422+ begin
423+ Exec(vcRedistInstaller, ' /install /quiet /norestart' , ' ' , SW_HIDE, ewWaitUntilTerminated, iResultCode)
424+ DeleteFile(vcRedistInstaller);
425+ end ;
426+
427+ Result := True;
416428
417- Result := True;
418429 except
419- if DownloadPage.AbortedByUser then
420- Log(' Aborted by user.' )
421- else
422- SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError, MB_OK, IDOK);
423- Result := False;
424- end ;
430+ if DownloadPage.AbortedByUser then
431+ Log(' Aborted by user.' )
432+ else
433+ SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError, MB_OK, IDOK);
434+
435+ Result := False;
436+ end ;
437+
425438 finally
426439 DownloadPage.Hide;
427440 end ;
428- end else
441+
442+ end
443+ else
444+ begin
429445 Result := True;
446+ end ;
430447end ;
431448
432449function NextButtonClick (CurPageID: Integer): Boolean;
0 commit comments