Skip to content

Download and install any dependency such as .NET, Visual C++, SQL Server and other during your application's installation!

License

Notifications You must be signed in to change notification settings

energywave/InnoDependencyInstaller

 
 

Repository files navigation

Inno Setup Dependency Installer

Inno Setup Dependency Installer

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.

Installation and Usage

  1. Download and install Inno Setup 6.2+.
  2. Download CodeDependencies.iss and dependencies folder in the folder of your Inno Setup script.
  3. On top of your Inno Setup script add this snippet:
;#define UseDotNet35
;#define UseDotNet40
;#define UseDotNet45
;#define UseDotNet46
;#define UseDotNet47
;#define UseDotNet48
;#define UseDotNet481
;#define UseNetCore31
;#define UseNetCore31Asp
;#define UseNetCore31Desktop
;#define UseDotNet50
;#define UseDotNet50Asp
;#define UseDotNet50Desktop
;#define UseDotNet60
;#define UseDotNet60Asp
;#define UseDotNet60Desktop
;#define UseDotNet70
;#define UseDotNet70Asp
;#define UseDotNet70Desktop

;#define UseVC2005
;#define UseVC2008
;#define UseVC2010
;#define UseVC2012
;#define UseVC2013
;#define UseVC2015To2022

;#define UseDirectX

;#define UseSql2008Express
;#define UseSql2012Express
;#define UseSql2014Express
;#define UseSql2016Express
;#define UseSql2017Express
;#define UseSql2019Express
;#define UseSql2022Express

;#define UseWebView2

;#define UseAccessDatabaseEngine2010
;#define UseAccessDatabaseEngine2016

;#define UseCrystalReports13ForVS

#include "CodeDependencies.iss"
  1. From that snippet remove the comment (the initial semicolon ";") to the dependencies you want to add to your installer (you can even remove the lines of unused defines if you prefer)
  2. Build setup using Inno Setup compiler. Done.

Details

You have two ways to distribute the dependency installers. By default, the dependency will be downloaded from the official website once it is defined as required in the CodeDependencies.iss file. 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].

Example setup

You can find two example installers:

  • ExampleInstaller 32bit.iss
  • ExampleInstaller 64bit.iss

The second one simply includes the first one defining the following line to automatically run in 64bit mode on a 64bit PC:

ArchitecturesInstallIn64BitMode=x64

So you can mainly check the ExampleInstaller 32bit.iss file to check how to include dependencies.

Please note that both examples compiles the bin\MyProgram-1.0 Setup.exe file so it will contain the 32bit or 32/64 bit depending on what you compile last.

Dependencies

  • Microsoft .NET
    • .NET Framework 3.5 Service Pack 1
    • .NET Framework 4.0
    • .NET Framework 4.5.2
    • .NET Framework 4.6.2
    • .NET Framework 4.7.2
    • .NET Framework 4.8
    • .NET Framework 4.8.1
    • .NET Core 3.1 (Runtime, ASP.NET or Desktop)
    • .NET 5.0 (Runtime, ASP.NET or Desktop)
    • .NET 6.0 (Runtime, ASP.NET or Desktop)
    • .NET 7.0 (Runtime, ASP.NET or Desktop)
  • Visual C++
    • Visual C++ 2005 Service Pack 1 Redistributable
    • Visual C++ 2008 Service Pack 1 Redistributable
    • Visual C++ 2010 Service Pack 1 Redistributable
    • Visual C++ 2012 Update 4 Redistributable
    • Visual C++ 2013 Update 5 Redistributable
    • Visual C++ 2015-2022 Redistributable
  • Microsoft SQL Server
    • SQL Server 2008 R2 Service Pack 2 Express
    • SQL Server 2012 Service Pack 4 Express
    • SQL Server 2014 Service Pack 3 Express
    • SQL Server 2016 Service Pack 2 Express
    • SQL Server 2017 Express
    • SQL Server 2019 Express
    • SQL Server 2022 Express
  • DirectX End-User Runtime
  • WebView2 runtime
  • Microsoft Access Database Engine
    • Access Database Engine 2010
    • Access Database Engine 2016
  • Crystal Reports 13 for Visual Studio

Credits

Thanks to the community for sharing many fixes and improvements. To contribute please create a pull request.

License

The Code Project Open License (CPOL) 1.02

About

Download and install any dependency such as .NET, Visual C++, SQL Server and other during your application's installation!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Inno Setup 100.0%