Download and install any dependency such as .NET, Visual C++ or SQL Server during your application's installation!
Inno Setup Dependency Installer can download and install any dependency such as .NET, Visual C++ or SQL Server during your application's installation. In addition, it is easy to add your own dependencies as well.
Dependency_AddVC2013; // installed in example setup
//Dependency_AddVC2013; // commented out and not installed in example setup
You can also just include CodeDependencies.iss file into your setup and call the desired Dependency_Add functions (some may need defining their exe file path before the include):
#define public Dependency_Path_NetCoreCheck "dependencies\"
#include "CodeDependencies.iss"
[Setup]
; ...
[Code]
function InitializeSetup: Boolean;
begin
// add the dependencies you need
Dependency_AddDotNet70;
// ...
Result := True;
end;
You have two ways to distribute the dependency installers. By default, most dependencies will be downloaded from the official website. Another way is to pack the dependency into a single executable setup like so:
Include the dependency setup file by defining the source:
Source: "dxwebsetup.exe"; Flags: dontcopy noencryption
Call ExtractTemporaryFile() before the corresponding Dependency_Add function
ExtractTemporaryFile('dxwebsetup.exe');
The dependencies are installed based on the system architecture. If you want to install 32-bit dependencies on a 64-bit system you can force 32-bit mode like so:
Dependency_ForceX86 := True; // force 32-bit install of next dependencies
Dependency_AddVC2013;
Dependency_ForceX86 := False; // disable forced 32-bit install again
If you only deploy 32-bit binaries and dependencies you can also instead just not define ArchitecturesInstallIn64BitMode in [Setup].
Thanks to the community for sharing many fixes and improvements. To contribute please create a pull request.