Coder Social home page Coder Social logo

devchive / nsisdotnetchecker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alex-sitnikov/nsisdotnetchecker

0.0 2.0 0.0 191 KB

NSIS plugin that allows one to detect if particular .Net framework is installed on the computer and download/install one if it is not found.

C++ 92.08% C 7.92%

nsisdotnetchecker's Introduction

.NET Framework Checker NSIS plugin is used to detect if the required .NET Framework is installed and if it is not - plugin will download and install the required package. Plugin C++ source code is based on the Aaron Stebner work described at http://blogs.msdn.com/b/astebner/archive/2009/06/16/9763379.aspx.

Structure:

bin - compiled NSIS plugin (ready-to-use)
plugin - contains source code for building DotNetChecker plugin in Visual Studio 2010
nsis - contains CheckNetFramework macros (DotNetChecker.nsh) and example NSIS installation file

Usage:

1. Copy DotNetChecker.dll to NSIS plugins directory (usually C:\Program Files\Nsis\Plugins\)
2. Add to your installer project DotNetChecker.nsh file
3. Reference DotNetChecker.nsh in your main NSI file like this:
	!include "DotNetChecker.nsh"
4. Insert macros with the version of required .NET framework like this:
	!insertmacro CheckNetFramework 451 ; if your application targets .NET 4.5.1 Framework
	OR
	!insertmacro CheckNetFramework 45 ; if your application targets .NET 4.5 Framework
	OR
	!insertmacro CheckNetFramework 40Client ; if your application targets .NET 4.0 Client Framework
	OR
	!insertmacro CheckNetFramework 40Full ; if your application targets .NET 4.0 Full Framework
	OR
	!insertmacro CheckNetFramework 35 ; if your application targets .NET 3.5 Framework
	OR
	!insertmacro CheckNetFramework 30 ; if your application targets .NET 3.0 Framework
	OR
	!insertmacro CheckNetFramework 20 ; if your application targets .NET 2.0 Framework
	OR
	!insertmacro CheckNetFramework 11 ; if your application targets .NET 1.1 Framework
	OR
	!insertmacro CheckNetFramework 10 ; if your application targets .NET 1.0 Framework

NB: Script will download .NET 3.5 for both .NET 3.0 and .NET 3.5 requirements. The same rule applies to .NET 1.1 and .NET 1.0. If you want to change this behavior - feel free to edit DotNetChecker.nsh.
NB2: Plugin is also capable of detecting Framework Service Pack Level. To use this functionality, just call one of the corresponding functions (i.e. DotNetChecker::GetDotNet11ServicePack). The return value (Pop $0) will be:
	-2 if framework is not installed
	-1 if no service pack installed for this framework
	some positive int value otherwise

nsisdotnetchecker's People

Contributors

alex-sitnikov avatar bveenvliet avatar devchive avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.