1- ; https://github.com/DomGries/InnoDependencyInstaller
1+ [Code]
2+ // https://github.com/DomGries/InnoDependencyInstaller
23
3-
4- [Code]
54// types and variables
65type
76 TDependency_Entry = record
1716var
1817 Dependency_Memo: String;
1918 Dependency_List: array of TDependency_Entry;
20- Dependency_NeedRestart , Dependency_ForceX86: Boolean;
19+ Dependency_NeedToRestart , Dependency_ForceX86: Boolean;
2120 Dependency_DownloadPage: TDownloadWizardPage;
2221
2322procedure Dependency_Add (const Filename, Parameters, Title, URL, Checksum: String; const ForceSuccess, RestartAfter: Boolean);
@@ -47,13 +46,13 @@ begin
4746end ;
4847
4948<event(' InitializeWizard' )>
50- procedure Dependency_Internal1 ;
49+ procedure Dependency_InitializeWizard ;
5150begin
5251 Dependency_DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), nil );
5352end ;
5453
5554<event(' PrepareToInstall' )>
56- function Dependency_Internal2 (var NeedsRestart: Boolean): String;
55+ function Dependency_PrepareToInstall (var NeedsRestart: Boolean): String;
5756var
5857 DependencyCount, DependencyIndex, ResultCode: Integer;
5958 Retry: Boolean;
@@ -102,10 +101,14 @@ begin
102101
103102 while True do begin
104103 ResultCode := 0 ;
104+ #ifdef Dependency_CustomExecute
105+ if { #Dependency_CustomExecute} (ExpandConstant(' {tmp}{\}' ) + Dependency_List[DependencyIndex].Filename, Dependency_List[DependencyIndex].Parameters, ResultCode) then begin
106+ #else
105107 if ShellExec(' ' , ExpandConstant(' {tmp}{\}' ) + Dependency_List[DependencyIndex].Filename, Dependency_List[DependencyIndex].Parameters, ' ' , SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then begin
108+ #endif
106109 if Dependency_List[DependencyIndex].RestartAfter then begin
107110 if DependencyIndex = DependencyCount - 1 then begin
108- Dependency_NeedRestart := True;
111+ Dependency_NeedToRestart := True;
109112 end else begin
110113 NeedsRestart := True;
111114 Result := Dependency_List[DependencyIndex].Title;
@@ -118,7 +121,7 @@ begin
118121 Result := Dependency_List[DependencyIndex].Title;
119122 break;
120123 end else if ResultCode = 3010 then begin // ERROR_SUCCESS_REBOOT_REQUIRED (3010)
121- Dependency_NeedRestart := True;
124+ Dependency_NeedToRestart := True;
122125 break;
123126 end ;
124127 end ;
@@ -152,8 +155,10 @@ begin
152155 end ;
153156end ;
154157
158+ #ifndef Dependency_NoUpdateReadyMemo
155159<event(' UpdateReadyMemo' )>
156- function Dependency_Internal3 (const Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
160+ #endif
161+ function Dependency_UpdateReadyMemo (const Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
157162begin
158163 Result := ' ' ;
159164 if MemoUserInfoInfo <> ' ' then begin
@@ -184,9 +189,9 @@ begin
184189end ;
185190
186191<event(' NeedRestart' )>
187- function Dependency_Internal4 : Boolean;
192+ function Dependency_NeedRestart : Boolean;
188193begin
189- Result := Dependency_NeedRestart ;
194+ Result := Dependency_NeedToRestart ;
190195end ;
191196
192197function Dependency_IsX64 : Boolean;
@@ -285,12 +290,24 @@ begin
285290end ;
286291
287292procedure Dependency_AddDotNet48 ;
293+ begin
294+ // https://dotnet.microsoft.com/download/dotnet-framework/net48
295+ if not IsDotNetInstalled(net48, 0 ) then begin
296+ Dependency_Add(' dotnetfx48.exe' ,
297+ ' /lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart' ,
298+ ' .NET Framework 4.8' ,
299+ ' https://go.microsoft.com/fwlink/?LinkId=2085155' ,
300+ ' ' , False, False);
301+ end ;
302+ end ;
303+
304+ procedure Dependency_AddDotNet481 ;
288305var
289306 Version: Cardinal;
290307begin
291308 // https://dotnet.microsoft.com/download/dotnet-framework/net481
292309 if not RegQueryDWordValue(HKLM, ' SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' , ' Release' , Version) or (Version < 533320 ) then begin
293- Dependency_Add(' dotnetfx48 .exe' ,
310+ Dependency_Add(' dotnetfx481 .exe' ,
294311 ' /lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart' ,
295312 ' .NET Framework 4.8.1' ,
296313 ' https://go.microsoft.com/fwlink/?LinkId=2203304' ,
@@ -446,35 +463,71 @@ end;
446463procedure Dependency_AddDotNet80 ;
447464begin
448465 // https://dotnet.microsoft.com/download/dotnet/8.0
449- if not Dependency_IsNetCoreInstalled(' -n Microsoft.NETCore.App -v 8.0.0 ' ) then begin
466+ if not Dependency_IsNetCoreInstalled(' -n Microsoft.NETCore.App -v 8.0.10 ' ) then begin
450467 Dependency_Add(' dotnet80' + Dependency_ArchSuffix + ' .exe' ,
451468 ' /lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart' ,
452- ' .NET Runtime 8.0.0 ' + Dependency_ArchTitle,
453- Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/593685c9-7e98-455a-8e34-4b8ad1be9489/6ccf85c6fc244428d61f74ca3aee0645 /dotnet-runtime-8.0.0 -win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/7f4d5cbc-4449-4ea5-9578-c467821f251f/b9b19f89d0642bf78f4b612c6a741637 /dotnet-runtime-8.0.0 -win-x64.exe' ),
469+ ' .NET Runtime 8.0.10 ' + Dependency_ArchTitle,
470+ Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/3f9cf5a6-d4d6-4fe0-a02b-cd700df1899b/75c95e00aab7258aed5f4ffe80526803 /dotnet-runtime-8.0.10 -win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/f55ed80e-ba58-4ac8-a2b3-f2227cd628de/6fabf1c613cf9386d14ddbaaca1a5eb8 /dotnet-runtime-8.0.10 -win-x64.exe' ),
454471 ' ' , False, False);
455472 end ;
456473end ;
457474
458475procedure Dependency_AddDotNet80Asp ;
459476begin
460477 // https://dotnet.microsoft.com/download/dotnet/8.0
461- if not Dependency_IsNetCoreInstalled(' -n Microsoft.AspNetCore.App -v 8.0.0 ' ) then begin
478+ if not Dependency_IsNetCoreInstalled(' -n Microsoft.AspNetCore.App -v 8.0.10 ' ) then begin
462479 Dependency_Add(' dotnet80asp' + Dependency_ArchSuffix + ' .exe' ,
463480 ' /lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart' ,
464- ' ASP.NET Core Runtime 8.0.0 ' + Dependency_ArchTitle,
465- Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/66ae7d00-596a-4e36-be73-2ebc0c332329/e2f6e37933e204fef5687e338a95b749 /aspnetcore-runtime-8.0.0 -win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/89d3660b-d344-47c5-a1cd-d8343a3f3779/9f55af82923dab7e3dce912f5c5b9d60 /aspnetcore-runtime-8.0.0 -win-x64.exe' ),
481+ ' ASP.NET Core Runtime 8.0.10 ' + Dependency_ArchTitle,
482+ Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/175256c9-8d8d-4f9a-a873-ff7b36161506/1b91f2b288e6077e30714485ebe8acb5 /aspnetcore-runtime-8.0.10 -win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/a17b907f-8457-45a8-90db-53f2665ee49e/49bccd33593ebceb2847674fe5fd768e /aspnetcore-runtime-8.0.10 -win-x64.exe' ),
466483 ' ' , False, False);
467484 end ;
468485end ;
469486
470487procedure Dependency_AddDotNet80Desktop ;
471488begin
472489 // https://dotnet.microsoft.com/download/dotnet/8.0
473- if not Dependency_IsNetCoreInstalled(' -n Microsoft.WindowsDesktop.App -v 8.0.0 ' ) then begin
490+ if not Dependency_IsNetCoreInstalled(' -n Microsoft.WindowsDesktop.App -v 8.0.10 ' ) then begin
474491 Dependency_Add(' dotnet80desktop' + Dependency_ArchSuffix + ' .exe' ,
475492 ' /lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart' ,
476- ' .NET Desktop Runtime 8.0.0' + Dependency_ArchTitle,
477- Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/f9e3b581-059d-429f-9f0d-1d1167ff7e32/bd7661030cd5d66cd3eee0fd20b24540/windowsdesktop-runtime-8.0.0-win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/b280d97f-25a9-4ab7-8a12-8291aa3af117/a37ed0e68f51fcd973e9f6cb4f40b1a7/windowsdesktop-runtime-8.0.0-win-x64.exe' ),
493+ ' .NET Desktop Runtime 8.0.10' + Dependency_ArchTitle,
494+ Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/9836a475-66af-47eb-a726-8046c47ce6d5/ccb7d60db407a6d022a856852ef9e763/windowsdesktop-runtime-8.0.10-win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/f398d462-9d4e-4b9c-abd3-86c54262869a/4a8e3a10ca0a9903a989578140ef0499/windowsdesktop-runtime-8.0.10-win-x64.exe' ),
495+ ' ' , False, False);
496+ end ;
497+ end ;
498+
499+ procedure Dependency_AddDotNet90 ;
500+ begin
501+ // https://dotnet.microsoft.com/download/dotnet/9.0
502+ if not Dependency_IsNetCoreInstalled(' -n Microsoft.NETCore.App -v 9.0.0' ) then begin
503+ Dependency_Add(' dotnet90' + Dependency_ArchSuffix + ' .exe' ,
504+ ' /lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart' ,
505+ ' .NET Runtime 9.0.0' + Dependency_ArchTitle,
506+ Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/0e89cce9-dc02-423c-a657-0c2b421edf21/af2e916785775fe7e023b953af404db5/dotnet-runtime-9.0.0-win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/99bd07c2-c95c-44dc-9d47-36d3b18df240/bdf26c62f69c1b783687c1dce83ccf7a/dotnet-runtime-9.0.0-win-x64.exe' ),
507+ ' ' , False, False);
508+ end ;
509+ end ;
510+
511+ procedure Dependency_AddDotNet90Asp ;
512+ begin
513+ // https://dotnet.microsoft.com/download/dotnet/9.0
514+ if not Dependency_IsNetCoreInstalled(' -n Microsoft.AspNetCore.App -v 9.0.0' ) then begin
515+ Dependency_Add(' dotnet90asp' + Dependency_ArchSuffix + ' .exe' ,
516+ ' /lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart' ,
517+ ' ASP.NET Core Runtime 9.0.0' + Dependency_ArchTitle,
518+ Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/70c1a68c-e5e4-45ef-9f2c-df1d3f195a2e/6b8e20fe1e45f886e464908cf18efd96/aspnetcore-runtime-9.0.0-win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/815e6104-b92c-4cd5-8971-cba2f685002a/37befaa217f3269a152016da80a922c1/aspnetcore-runtime-9.0.0-win-x64.exe' ),
519+ ' ' , False, False);
520+ end ;
521+ end ;
522+
523+ procedure Dependency_AddDotNet90Desktop ;
524+ begin
525+ // https://dotnet.microsoft.com/download/dotnet/9.0
526+ if not Dependency_IsNetCoreInstalled(' -n Microsoft.WindowsDesktop.App -v 9.0.0' ) then begin
527+ Dependency_Add(' dotnet90desktop' + Dependency_ArchSuffix + ' .exe' ,
528+ ' /lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart' ,
529+ ' .NET Desktop Runtime 9.0.0' + Dependency_ArchTitle,
530+ Dependency_String(' https://download.visualstudio.microsoft.com/download/pr/8dfbde7b-c316-418d-934a-d3246253f342/69c6a35b77a4f01b95588e1df2bddf9a/windowsdesktop-runtime-9.0.0-win-x86.exe' , ' https://download.visualstudio.microsoft.com/download/pr/685792b6-4827-4dca-a971-bce5d7905170/1bf61b02151bc56e763dc711e45f0e1e/windowsdesktop-runtime-9.0.0-win-x64.exe' ),
478531 ' ' , False, False);
479532 end ;
480533end ;
542595procedure Dependency_AddVC2015To2022 ;
543596begin
544597 // https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
545- if not IsMsiProductInstalled(Dependency_String(' {65E5BD06-6392-3027-8C26-853107D3CF1A}' , ' {36F68A90-239C-34DF-B58C-64B30153CE35}' ), PackVersionComponents(14 , 30 , 30704 , 0 )) then begin
598+ if not IsMsiProductInstalled(Dependency_String(' {65E5BD06-6392-3027-8C26-853107D3CF1A}' , ' {36F68A90-239C-34DF-B58C-64B30153CE35}' ), PackVersionComponents(14 , 30 , 33810 , 0 )) then begin
546599 Dependency_Add(' vcredist2022' + Dependency_ArchSuffix + ' .exe' ,
547600 ' /passive /norestart' ,
548601 ' Visual C++ 2015-2022 Redistributable' + Dependency_ArchTitle,
@@ -715,4 +768,4 @@ Source: "{#Dependency_Path_NetCoreCheck}netcorecheck_x64.exe"; Flags: dontcopy n
715768
716769#ifdef Dependency_Path_DirectX
717770Source : " {#Dependency_Path_DirectX}dxwebsetup.exe" ; Flags : dontcopy noencryption
718- #endif
771+ #endif
0 commit comments