Changes between Version 34 and Version 35 of BuildingOnWindows


Ignore:
Timestamp:
11/11/10 18:06:15 (13 years ago)
Author:
Samuli Seppänen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingOnWindows

    v34 v35  
    99== Visual Studio 2008 Professional ==
    1010
    11 Visual Studio 2008 Professional is required to build OpenVPN on Windows. Note that the free Express edition
     11Visual Studio 2008 Professional is required 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 can cause nasty, hard to debug issues. See ''Troubleshooting'' section for details.
    1212
    1313== Windows Software Development Kit ==
     
    9898
    9999The Python-based OpenVPN build system is pretty picky about it's directory layout, which should be like this:
     100 
     101 * ''C:\openvpn-build'': root build directory
     102 * ''C:\openvpn-build\openvpn-testing'': openvpn sources fetched from git should directly
     103 * ''C:\openvpn-build\tapinstall\7600'': directory containing ''Devcon.exe'' sources, which can be found from ''C:\WINDDK\7600.16385.1\src\setup\devcon''. As you can see, the last part of the tapinstall directory path depends on the major version of WINDDK. Note that in OpenVPN world ''Devcon.exe'' is also confusingly also known as ''tapinstall.exe''.
     104 * ''C:\openvpn-build\openssl'': copy of the openssl install directory which contains the openssl libraries you built earlier. It's location depends on the parameter --prefix paramter you when configuring the openssl build.
     105 * ''C:\openvpn-build\lzo'': copy of the lzo source directory ''after'' the lzo has been built.
     106 * ''C:\openvpn-build\signtool''. a directory containing ''signtool.exe''. This tool can be found from the Microsoft SDK directory (e.g. ''C:\Program Files\Microsoft SDKs\Windows\V6.0A\bin'').
    100107
    101  * ''C:\openvpn-build\tapinstall\7600'': devcon.exe sources. The last part of the path depends on WinDDK's major version you got installed.
    102  * ''C:\openvpn-build\openvpn-testing'': openvpn sources fetched from git
    103 
    104 Once you have fetched OpenVPN sources you need to copy [http://stackoverflow.com/questions/1167544/devcon-exe-driver-tool-and-openvpn DevCon.exe source code] to a directory which is preferably outside the openvpn source tree so that it does not get committed to the OpenVPN Git repository by mistake, as Microsoft would probably sue us for that. The source files can be found from ''<WINDDK_INSTALL_DIRECTORY>\<DDK_VERSION>\src\setup\devcon'', for example ''C:\WINDDK\7600.16385.1\src\setup\devcon''. If you don't modify ''win\settings.in'' you need to have a directory layout   similar to this:
    105 
    106  
    107 Next you probably want to customize a few variables in the ''win\settings.in'' file. Make sure to use a UNIX linefeed-capable editor such as ''wordpad''.
    108 
    109 {{{
    110 ### win\settings.in
    111 
    112 # Point this to the openvpn-gui directory
    113 !define OPENVPN_GUI_DIR "../openvpn-gui"
    114 !define OPENVPN_GUI     "openvpn-gui-1.0.3.exe"
    115 
    116 # Point these to OpenSSL and LZO install directories with DLLs and headers
    117 !define OPENSSL_DIR       "../openssl"
    118 !define LZO_DIR           "../lzo"
    119 
    120 # Point this to a copy of DevCon.exe source directory. These sources can be found from the WDK directory, e.g. from
    121 # C:\WINDDK\7600.16385.1\src\setup\devcon
    122 #
    123 # Not needed if DRVBINSRC is defined
    124 # (or if using pre-built mode).
    125 !define TISRC   "../tapinstall"
    126 }}}
     108After setting up the directories, you should check ''win\settings.in'' file to see if any variables need modifications. Make sure to use a UNIX linefeed-capable editor such as ''wordpad'' to do this.
    127109
    128110Next fire up a console/MS DOS prompt and go to the ''win'' directory and start the build:
     
    132114}}}
    133115
    134 To clean up before or after thäe build, issue
     116To clean up before or after the build, issue
    135117
    136118{{{
    137119C:\openvpn-testing\win> python build.py clean
     120}}}
     121
     122In theory this should do the trick. If you want to disable driver signing, you need comments out a two lines in ''win\build_all.py'':
     123
     124{{{
     125#from sign import main as sign
     126
     127def main(config):
     128    config_all(config)
     129    build_openvpn()
     130    build_ddk(config, 'tap', 'all')
     131    build_ddk(config, 'tapinstall', 'all')
     132    #sign(config, 'all')
     133    make_dist(config)
    138134}}}
    139135