Changes between Version 47 and Version 48 of Windows build instructions
- Timestamp:
- Jun 8, 2017 3:41:41 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Windows build instructions
v47 v48 5 5 == Prerequisites == 6 6 7 * '''Windows 10''', '''Windows 8.1''', '''Windows 8''' or '''Windows 7'''. 7 * '''Windows 10''', '''Windows 8.1''', '''Windows 8''' or '''Windows 7'''.[[BR]] 8 Older versions of Windows might work. 8 9 9 10 * '''Visual Studio 2010 with service pack 1'''. … … 44 45 * the '''zlib''' library. Grab the sources from: [[BR]] 45 46 http://www.zlib.net/ [[BR]] 47 Actually the tarball comes with zlib in the `src/libs/` directory already so downloading this library is only necessary if you need a new version. In that case look for `SDK_VBOX_ZLIB_INCS` and `SDK_VBOX_ZLIB_LIBS` in Config.kmk and override these entries in your LocalConfig.kmk (see below for some notes about LocalConfig.kmk). 46 48 47 49 * the '''cURL''' library. Grab the binaries from: [[BR]] 48 50 http://curl.haxx.se/download.html [[BR]] 49 51 (use the devel version ''without'' SSL support) [[BR]] 50 ''Use `--with-libcurl=` to specify the path for configure.vbs. ''52 ''Use `--with-libcurl=` to specify the path for configure.vbs. For building the 64-bit !VirtualBox target use `--with-libcurl32=` to specify the path to the 32-bit cURL development package as both cURL variants (32-bit and 64-bit) are required then.'' 51 53 52 54 * '''OpenSSL 1.1.0'''. Grab the binaries from: [[BR]] 53 55 https://slproweb.com/products/Win32OpenSSL.html [[BR]] 54 ''Use `--with-openssl=` to specify the path for configure.vbs. ''56 ''Use `--with-openssl=` to specify the path for configure.vbs. For building the 64-bit !VirtualBox target use `--with-openssl32=` to specify the path to the 32-bit OpenSSL development package as both OpenSSL variants (32-bit and 64-bit) are required then.'' 55 57 56 58 * '''code signing utilities''' (64-bit Windows only). [[BR]] 57 59 Normally part of the WDK: `certmgr.exe`, `makecert.exe`, `signtool.exe` and so on. 58 60 59 * Optional:'''NSIS 2.51''', only needed if you want to build the Guest Additions including the installer. Required plugins: NsSCM, AccessControl, NsProcess and nsisunz. Grab the sources or setup from: [[BR]]61 * ''Optional:'' '''NSIS 2.51''', only needed if you want to build the Guest Additions including the installer. Required plugins: NsSCM, AccessControl, NsProcess and nsisunz. Grab the sources or setup from: [[BR]] 60 62 https://sourceforge.net/projects/nsis/files/NSIS%202/2.51/ 61 63 62 * Optional: '''gSOAP 2.8.36''', only needed if you want to build the webservice API server. Grab the sources from: [[BR]]64 * ''Optional:'' '''gSOAP 2.8.x''', only needed if you want to build the webservice API server. Grab the sources from: [[BR]] 63 65 http://sourceforge.net/projects/gsoap2/files/gSOAP/gSOAP%202.7.12%20stable/ 64 66 65 * Optional:'''Python 2.7.x''', only needed if you want to build Python API bindings, both webservice and COM. Grab the binaries from: [[BR]]67 * ''Optional:'' '''Python 2.7.x''', only needed if you want to build Python API bindings, both webservice and COM. Grab the binaries from: [[BR]] 66 68 http://www.python.org/download/releases/2.7.10/ [[BR]] 67 69 ''Use `--with-python=` to specify the path for configure.vbs.'' 68 70 69 * Optional:'''Java SE 6 JDK''', only needed if you want to build Java API bindings, both webservice and COM. Grab the binaries from: [[BR]]71 * ''Optional:'' '''Java SE 6 JDK''', only needed if you want to build Java API bindings, both webservice and COM. Grab the binaries from: [[BR]] 70 72 http://www.oracle.com/technetwork/java/javase/downloads/index.html 71 73 74 === Manual compilation of certain prerequisites === 75 If you don't find development packages of certain prerequisites it's also possible to manually compile them. For instance there does not seem to be proper libcurl packages avaible for Windows which contain the .lib files, the .dll files as well as the `include/` directory. 76 77 To manually build the cURL devel package on Windows you have to 78 1. Take care that the compiler binary path is part of the '''`PATH`''' environment variable, usually the `bin/` directory of the installation directory. That directory has to contain `cl.exe`, `link.exe`, `lib.exe`, `nmake.exe` etc. Take care to point to the correct architecture path (amd64 or x86). 79 2. Set the '''`INCLUDE`''' environment variable to include the compilers `atlmfc/include/` and `include/` directory. 80 3. Set the '''`LIB`''' environment variable to include the compilers `atlmfc/lib/` and `lib/` directories. Take care to point to the correct architecture path (amd64 or x86). 81 4. Set the '''`LIBPATH`''' environment variable to include the compilers `atlmfc/lib/` directories. Take care to point to the correct architecture path (amd64 or x86). 82 5. Set the '''`PATH`''' environment variable to include the (7.1) SDK `bin/` directory. Take care to point to the correct architecture path (amd64 or x86). 83 6. Set the '''`INCLUDE`''' environment variable to include the (7.1) SDK `include/` directory. 84 7. Set the '''`LIB`''' environment variable to include the (7.1) SDK `lib/` directory. Take care to point to the correct architecture path (amd64 or x86). 85 After all these environment variables are set up, go to the `curl-VERSION/winbuild/` directory and perform 86 {{{ 87 nmake /f Makefile.vc mode=dll VC=10 MACHINE=x64 or 88 nmake /f Makefile.vc mode=dll VC=10 MACHINE=x86 89 }}} 90 The resulting package can be found in `libcurl-vc10-*-winssl/` directory. The configure.vbs script expects that libcurl.lib and libcurl.dll are located next to the `include/` directory. It's a good idea to copy the `libcurl-vc10-*-winssl/` directory to another place. Then use the `--with-libcurl=` parameter to tell configure.vbs the path. 72 91 73 92 == Building !VirtualBox == … … 79 98 If the script finds all the tools necessary, it will output two files: `AutoConfig.kmk` containing information where to find the tools on your system and `env.bat`, a batch file to setup your environment for building !VirtualBox. You only have to execute this step once, unless something about your tools changes in which case you have to repeat the above step. Keep in mind that the script always overwrites the two generated files so you should not manually edit them. 80 99 100 The default target will be the same target as the host, that is, on a 32-bit host the environment will be set up to compile the 32-bit !VirtualBox target while on a 64-bit host the environment will be set up to compile the 64-bit !VirtualBox target. The default setting can be overridden by using the `--target-arch=` parameter. 101 81 102 2. Change to the root directory of the sources and enter our build shell environment: `env.bat`. 82 103 83 3. To manually override any tool or change Config.kmk settings, create LocalConfig.kmk in the root directory of the sources and place the setting there. For instance, to create a non-hardened build ('''only for testing !'''), add `VBOX_WITHOUT_HARDENING = 1` to LocalConfig.kmk.104 3. To manually override any tool or change Config.kmk settings, create LocalConfig.kmk in the root directory of the sources and place the setting there. For instance, to create a non-hardened build ('''only for testing'''), add `VBOX_WITHOUT_HARDENING = 1` to LocalConfig.kmk. 84 105 85 106 4. To build a release package, type `kmk`. This produces the binaries in `out\win.x86\release\bin`. If you want to build a debug version, enter `kmk KBUILD_TYPE=debug`.