Changes between Version 83 and Version 84 of BuildingOnWindows


Ignore:
Timestamp:
03/31/11 12:46:43 (13 years ago)
Author:
Samuli Seppänen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingOnWindows

    v83 v84  
    33= Introduction =
    44
    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.
     5The traditional way to build OpenVPN for Windows is using autotools, either in a [http://www.mingw.org/ MinGW] environment or by cross-compiling the Windows binary 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.
    66
    77= Installing prequisites =
     
    128128 
    129129 * '''<openvpn-build-root>''': root build directory, e.g. ''C:\openvpn-build''
    130   * '''<openvpn-sources>''': a directory containing openvpn sources
     130  * '''<openvpn-sources>''': a directory containing openvpn sources (from tarball/zip/git)
    131131  * '''tapinstall'''
    132132   * '''7600''': copy of devcon.exe ''build directory''. Can be found from ''C:\WINDDK\7600.16385.1\src\setup\devcon'' or similar, depending on the version of WINDDK. Note that in OpenVPN world ''devcon.exe'' is (confusingly) also known as ''tapinstall.exe''.
     
    139139   * '''lib''': must also contain the ''lzo2.lib'' file generated by lzo build
    140140  * '''Microsoft.VC90.CRT''': a copy of ''C:\Program Files\MicrosofT Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT'' directory; the exact path may vary. Note that using the wrong version will cause issues on 32-bit or 64-bit Windows versions.
    141   * '''signtool''': this directory should contain ''signtool.exe'', which can be found from the Microsoft SDK directory (e.g. ''C:\Program Files\Microsoft SDKs\Windows\V6.0A\bin''). However, it's Python wrapper (''Sign'' class) is only available internally at OpenVPN Technologies, so you can skip this dependency.
     141  * '''tap-prebuilt''': this directory contain prebuilt, signed TAP-drivers for and tapinstall.exe. This is only needed if you don't build the TAP-drivers yourself.
     142   * '''i386''': should contain 32-bit versions of ''tap0901.cat'', ''tap0901.sys'', ''OemWin2k.inf'' and ''tapinstall.exe''
     143   * '''amd64''': should contain 64-bit versions of the above
     144  * '''signtool''': this directory should contain ''signtool.exe'', which can be found from the Microsoft SDK directory (e.g. ''C:\Program
     145Files\Microsoft SDKs\Windows\V6.0A\bin''). However, it's Python wrapper (''Sign'' class) is only available internally at OpenVPN Technologies, so you can skip this dependency.
    142146
    143147== Setting build parameters ==
     
    145149After setting up the directories, you should check if OpenVPN's build configuration files need modifications:
    146150
    147  * ''<openvpn-sources>\win\config.h.in'': static header file, functionally the same as config.h generated by autotools
    148  * ''<openvpn-sources>\win\settings.in'': build configuration for Python-based builds.
     151 * ''<openvpn-sources>\win\settings.in'': build configuration for Python-based builds. Most build configuration - if any - is done in this file.
     152 * ''<openvpn-sources>\win\config.h.in'': static header file, functionally the same as config.h generated by autotools; not usually modified.
    149153 * ''<openvpn-sources\version.m4'': contains TAP-driver version information. Normally there's no need to modify this.
    150154
     
    162166C:\openvpn-build\openvpn-testing\win> python build_all.py --unsigned --notap
    163167}}}
     168
     169Note that in this case you ''need'' to copy signed TAP-drivers to the ''TAP_PREBUILT'' directory defined in ''win/settings.in''.
    164170
    165171To clean up before or after the build, issue