Changes between Version 61 and Version 62 of BuildingOnWindows
- Timestamp:
- 03/10/11 10:32:08 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingOnWindows
v61 v62 3 3 = Introduction = 4 4 5 The traditional way to build OpenVPN for Windows is to cross-compile it on *NIX. This works, but does not allow signing the TUN/TAP driver, which is required for Windows Vista/7 and later. Due to this a new, relatively simple Python-based build system was written. This new build system allows building OpenVPN on Windows more easily, but may require a commercial version of Visual Studio development environment. Fortunately the new build system is "external" from Visual Studio's viewpoint, so meddling with VS's graphical user interface is not necessary.5 The traditional way to build OpenVPN for Windows is to cross-compile it on *NIX. This works, but does not allow signing the TUN/TAP driver, which is required for Windows Vista/7 and later. Due to this a new, relatively simple Python-based build system was written. This new build system allows building OpenVPN on Windows more easily, but some parts of the build may require a commercial version of the Visual Studio development environment. Fortunately the new build system only uses Visual Studio tools (nmake, compiler, linker, etc.), so learning VS's graphical user interface is not necessary. Full integration with Visual Studio ''should'' be possible, too. 6 6 7 7 = Installing prequisites = … … 9 9 == Visual Studio 2008 Professional == 10 10 11 Visual Studio 2008 Professional is used to build OpenVPN on Windows. Note that the free Express edition might not work. Also make sure you select "Typical installation", not "Full installation". Full installation installs ''x86 cross-tools'' which cancause nasty, hard to debug issues. See ''Troubleshooting'' section for details.11 Visual Studio 2008 Professional is used to build OpenVPN on Windows. Note that the free Express edition might not work. Also make sure you select "Typical installation", not "Full installation". Full installation installs ''x86 cross-tools'' which may cause nasty, hard to debug issues. See ''Troubleshooting'' section for details. 12 12 13 13 == Windows Software Development Kit == … … 31 31 [http://www.activestate.com/activeperl ActivePerl] is required to build OpenSSL, which in turn is required to build OpenVPN. Look [http://ehsanakhgari.org/blog/2008-05-04/compiling-openvpn-windows here] for details. Probably a [http://www.perl.org/get.html standard Perl installation] would also do the trick. 32 32 33 = Installing optional Git support=33 = Installing Git support (optional) = 34 34 35 35 Git support is needed if you want to conveniently build the latest development code. You don't need Git support if you fetch the sources from another computer and copy them over, or use source code from release tar.gz or zip files. … … 41 41 == !GitExtensions == 42 42 43 [http://code.google.com/p/gitextensions/ GitExtensions] makes working with Git easier on Windows. It includes Visual Studio 2008 plugin, Windows explorer support and a GUI to configure and use Git repositories. 43 [http://code.google.com/p/gitextensions/ GitExtensions] makes working with Git easier on Windows. It includes Visual Studio 2008 plugin, Windows explorer support and a GUI to configure and use Git repositories. It also includes ''Git Bash'', which allows running Git (and other GNU tools) from Bash command-line. 44 44 45 45 == KDiff3 == … … 47 47 [http://kdiff3.sourceforge.net/ KDiff3] is used in handling merge conflicts. It's required by ''!GitExtensions''. 48 48 49 == Git Source Control Provider ==49 == Git Source Control Provider (optional) == 50 50 51 51 [http://gitscc.codeplex.com/ Git Source Control Provider] is a Visual Studio 2008/2010 plugin. It can also be used to launch ''Git for Windows'' and ''!GitExtensions'' from within Visual Studio. … … 67 67 }}} 68 68 69 and then repeat the above steps. Unless you're using very latest development code, you probably get this error message during build:69 and then repeat the above steps. Unless you're using 1.08 or later, you probably get this error message during build: 70 70 71 71 {{{ … … 123 123 == Setting up dependencies == 124 124 125 The new Python-based build system we're using in this article has gone through significant changes during late 2010 and early 2011. You're strongly encouraged to fetch latest Git development code using ''Git for Windows'' (Git shell) or ''!GitExtensions'' (GUI). Check [wiki:TesterDocumentation these instructions] to see which Git URI to use. 125 The new Python-based build system we're using in this article has gone through significant changes during late 2010 and early 2011. You're strongly encouraged to fetch latest Git development code using ''Git for Windows'' (Git shell) or ''!GitExtensions'' (GUI). Check [wiki:TesterDocumentation these instructions] to see which Git URI to use. Alternatively get OpenVPN 2.2-RC2 or later, where most of the buildsystem changes have been implemented. 126 126 127 127 OpenVPN has several build and runtime dependencies that need to be placed into a strict directory hierarchy along with OpenVPN sources: … … 145 145 After setting up the directories, you should check if OpenVPN's build configuration files need modifications: 146 146 147 * ''<openvpn-sources>\win\config.h.in'': static header file, functionally the same as config.h generated by autotools 147 148 * ''<openvpn-sources>\win\settings.in'': build configuration for Python-based builds. 148 149 * ''<openvpn-sources\version.m4'': contains TAP-driver version information. Normally there's no need to modify this. … … 156 157 }}} 157 158 158 This builds ''openvpn.exe'', ''openvpnserv.exe'' and the TAP driver and copies the results to ''<openvpn-sources>\dist''. The ''--unsigned'' switch disables TAP driver signing, which would not work anyways because the ''Sign'' Python module (see above) is missing. If you intend to use signed TAP drivers from an existing OpenVPN installer, you can skip building the TAP driver altogether:159 This builds ''openvpn.exe'', ''openvpnserv.exe'' and the TAP driver and copies the results to ''<openvpn-sources>\dist''. The ''--unsigned'' switch disables TAP driver signing, which would not work anyways because the ''Sign'' Python module is only available internally at OpenVPN Technologies. If you intend to use signed TAP drivers from an existing OpenVPN installer, you can skip building the TAP driver altogether: 159 160 160 161 {{{ … … 176 177 == Packaging OpenVPN == 177 178 178 Once OpenVPN build is finished, you may want to make an installer executable. OpenVPN installers are packaged using [http://nsis.sourceforge.net/Main_Page NSIS], which you can download from [http://nsis.sourceforge.net/Download here]. The buildsystem, or more correctly ''<openvpn-sources>\win\make_dist.py'' - puts everything the NSI script (''<openvpn-sources>\win\openvpn.nsi'') needs to ''<openvpn-sources>\dist''. However, as of OpenVPN 2.2- rcthere are still a few manual steps involved:179 Once OpenVPN build is finished, you may want to make an installer executable. OpenVPN installers are packaged using [http://nsis.sourceforge.net/Main_Page NSIS], which you can download from [http://nsis.sourceforge.net/Download here]. The buildsystem, or more correctly ''<openvpn-sources>\win\make_dist.py'' - puts everything the NSI script (''<openvpn-sources>\win\openvpn.nsi'') needs to ''<openvpn-sources>\dist''. However, as of OpenVPN 2.2-RC there are still a few manual steps involved: 179 180 180 181 * If you need to run OpenVPN on Windows Vista/7 64-bit you have to use signed TAP drivers. Unless you sign them yourself, you need to do two extra steps: