Changes between Version 84 and Version 85 of BuildingOnWindows
- Timestamp:
- 03/31/11 13:08:49 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingOnWindows
v84 v85 130 130 * '''<openvpn-sources>''': a directory containing openvpn sources (from tarball/zip/git) 131 131 * '''tapinstall''' 132 * '''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''. 132 * '''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''. This is not necessary if you use prebuilt TAP-drivers. 133 133 * '''pkcs11-helper''': copy of pkcs11-helper ''build directory'' 134 134 * '''lib''': must also contain ''libpkcs11-helper-1.dll'' and ''libpkcs11-helper-1.dll.manifest'' files produced by pkcs11-helper build … … 139 139 * '''lib''': must also contain the ''lzo2.lib'' file generated by lzo build 140 140 * '''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 * '''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''141 * '''tap-prebuilt''': this directory contain prebuilt, signed TAP-drivers and tapinstall.exe [#Extracting_signed_TAP-drivers_from_an_OpenVPN_installer|extracted from an OpenVPN installer] This is only needed if you don't build the TAP-drivers yourself. 142 * '''i386''': should contain 32-bit versions of TAP-driver and ''tapinstall.exe'' 143 143 * '''amd64''': should contain 64-bit versions of the above 144 144 * '''signtool''': this directory should contain ''signtool.exe'', which can be found from the Microsoft SDK directory (e.g. ''C:\Program … … 161 161 }}} 162 162 163 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. I f you intend to use signed TAP drivers from an existing OpenVPN installer, you canskip building the TAP driver altogether:163 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. In case you want to test new TAP-driver versions on Windows Vista/7 64-bit you need to self-sign them and jump through several hoops. If you intend to use signed TAP drivers from an existing OpenVPN installer, you can [#Extracting_signed_TAP-drivers_from_an_OpenVPN_installer|extract signed TAP drivers from an existing installer] and skip building the TAP driver altogether: 164 164 165 165 {{{ … … 167 167 }}} 168 168 169 Note that in this case you ''need'' to copy signed TAP-drivers to the ''TAP_PREBUILT'' directory defined in ''win/settings.in''.170 171 169 To clean up before or after the build, issue 172 170 … … 181 179 }}} 182 180 181 == Extracting signed TAP-drivers from an OpenVPN installer == 182 183 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: 184 185 * Extract the TAP-drivers (*.cat, *.sys, *.inf) and ''tapinstall.exe'' from an official OpenVPN installer using [http://www.7-zip.org/ 7-zip]. There are separate versions for 32-bit and 64-bit versions of Windows: 64-bit versions are larger. 186 * Place 32-bit signed TAP drivers and corresponding ''tapinstall.exe'' to ''<openvpn-build-root>\tap-prebuilt\i386'' 187 * Place 64-bit versions to ''<openvpn-build-root>\tap-prebuilt\amd64'' 188 183 189 == Packaging OpenVPN == 184 190 185 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: 186 187 * 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: 188 * Extract TAP-drivers and ''tapinstall.exe'' from an official OpenVPN installer using [http://www.7-zip.org/ 7-zip]. 189 * Place the signed TAP drivers and corresponding ''tapinstall.exe'' to ''<openvpn-sources>\dist\i386'' and ''<openvpn-sources>\dist\amd64'', respectively. Put 32-bit files to the ''i386'' directory and 64-bit files to the ''amd64'' directory. 190 * [http://msdn.microsoft.com/en-us/library/ms235591%28v=vs.80%29.aspx Embed manifest files manually] to ''openvpn.exe'', ''openvpnserv.exe'', ''lzo2.dll'' and ''libpkcs11-helper-1.dll''. The purpose of the manifest file (whether embedded or not) is to declare the run-time dependencies of the EXE/DLL. This step is required because the NSI script is not configured to install external manifest files and a manifest file is needed for proper operation. 191 192 All of this has been automated in OpenVPN 2.2-RC2 and later. In case you want to test new TAP-driver versions on Windows Vista/7 64-bit you need to self-sign them and jump through several hoops. For details, look below. 191 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 most of what the NSI script (''<openvpn-sources>\win\openvpn.nsi'') needs to ''<openvpn-sources>\dist''. The NSI script still (as of 2.2-RC2) pulls some files from directories other that ''dist'', but that will be fixed later. 193 192 194 193 OpenVPN installer is driven by the ''<openvpn-sources>\win\openvpn.nsi'' NSI script, which has to be loaded with the [http://nsis.sourceforge.net/Main_Page MakeNSIS] application to generate an installer. If the ''<openvpn-sources>\dist'' directory has been properly set up, you should not encounter any errors. However, if ''MakeNSIS'' complains about missing files, make sure the ''<openvpn-sources>\dist'' directory contains all of the packaging dependencies: