[[TOC(inline, depth=1)]] = Introduction = MSVC buildsystem is a part of [https://github.com/OpenVPN/openvpn-build openvpn-build subproject] in [https://github.com/ GitHub]. It allows building OpenVPN and all it's dependencies on a Windows box with minimal dependencies. '''NOTE:''' This buildsystem is not officially supported, and you're strongly encouraged to use the [wiki:BuildingUsingGenericBuildsystem cross-compile buildsystem] instead. If you really need to build OpenVPN using MSVC and encounter any issues, please send email to the [http://sourceforge.net/mail/?group_id=48978 openvpn-devel mailinglist]. = Setting up the build computer = MSVC build was written with least dependencies in mind. You'll need only [http://www.activestate.com/activeperl Perl] and Visual Studio 2010 (Express). Once dependencies have been installed, launch Git Bash and follow [wiki:BuildingUsingGenericBuildsystem#Checkingoutopenvpn-buildrepository these instructions] to checkout [https://github.com/OpenVPN/openvpn-build openvpn-build] repository, which contains the MSVC buildsystem. To customize the build options, refer to ''build-env.bat'', it contains the defaults for building, most settings can be customized by setting environment variable before executing the build script. You can also configure the build to use a Git repository or tarball of your liking, for example: {{{ set OPENVPN_GIT=git://openvpn.git.sourceforge.net/gitroot/openvpn/openvpn.git set OPENVPN_SOURCE=git set OPENVPN_BRANCH=master }}} = Building using MSVC buildsystem = == Building everything == Descend to the ''openvpn-build/msvc'' directory and build: {{{ > cd openvpn-build/msvc > build }}} This fetches all the dependencies, builds them and builds OpenVPN. == Building dependencies only == To build only dependencies (helpful for developers): {{{ > set DO_ONLY_DEPS=true > set TARGET=c:\Temp\build-deps > build }}} == Build OpenVPN manually == Provided you built the dependencies you can use the MSVC build system within OpenVPN tree, edit ''build-env-local.bat'' which is loaded by ''build.bat''. The variables defined in ''build-env-local.bat'' override the defaults given in ''build-env.bat''. For example, you can manually define the location of dependencies: {{{ set OPENVPN_DEPROOT=c:\Temp\build-deps }}} Then open IDE using: {{{ > msvc-dev }}} Or build using: {{{ > msvc-build }}}