14 | | |
15 | | == Windows hosts == |
16 | | |
17 | | === Prerequisites on Windows === |
18 | | |
19 | | * Visual C++ version 7.1 or 8.0 with ATL installed. It is possible to use the Visual C++ 2005 Express Edition, see below. |
20 | | * The Windows Platform SDK that comes with Visual C++ or a more recent one from: [[BR]]web install: [[BR]]http://www.microsoft.com/downloads/details.aspx?FamilyId=484269E2-3B89-47E3-8EB7-1F2BE6D7123A&displaylang=en |
21 | | * DirectX SDK: [[BR]]http://www.microsoft.com/downloads/details.aspx?FamilyID=d625324c-59b4-4951-849e-640b508dc442&DisplayLang=en |
22 | | * MingW GCC v3.3.x or v3.4.x with matching binutils, runtime, and w32api: [[BR]] http://www.mingw.org/download.shtml |
23 | | * SDL v1.2.7 or later development package (VC6): [[BR]]http://www.libsdl.org/download-1.2.php |
24 | | To create the installation package: |
25 | | * .NET, version 2.0 recommended |
26 | | * Microsoft Windows Installer XML (WiX) toolkit: [[BR]] http://sourceforge.net/projects/wix/ |
27 | | * Microsoft Driver Installation Framework Tools (DIFx): [[BR]] http://www.microsoft.com/whdc/driver/install/DIFxtls.mspx |
28 | | |
29 | | ==== Using Visual C++ 2005 Express Edition ==== |
30 | | |
31 | | It could be possible to build VirtualBox using the express edition, but the lack of ATL (among other things) means serious trouble since VirtualBox is making use of ATL. |
32 | | |
33 | | List of problems and possible workarounds: |
34 | | 1. It does not include the Platform SDK (PSDK), however the express edition installation guide urge you to install it. If you didn't start here: [[BR]] http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/ |
35 | | 1. It does not include the ATL headers and libraries. [[BR]]~~A possible workaround could be to point VirtualBox to the ATL headers and libraries that's shipped with the Windows DDK. Unfortunately this doesn't work ATM since the DDK version is older than the one VirtualBox is developed with. [[BR]]To tell the build system where to find the ATL headers and libraries append the following lines to your {{{Config.kmkconf}}} or {{{Config.kmklocal}}} file:~~ |
36 | | {{{ |
37 | | PATH_TOOL_VCC80X86_ATLMFC_INC = $(PATH_SDK_W2K3DDKX86)/inc/atl30 |
38 | | PATH_TOOL_VCC80X86_ATLMFC_LIB = $(PATH_SDK_W2K3DDKX86)/lib/atl/i386/ |
39 | | PATH_TOOL_VCC80AMD64_ATLMFC_INC = $(PATH_SDK_W2K3DDKAMD64)/inc/atl30 |
40 | | PATH_TOOL_VCC80AMD64_ATLMFC_LIB = $(PATH_SDK_W2K3DDKAMD64)/lib/atl/amd64/ |
41 | | }}} |
42 | | Another option is to disable the components that depends on the ATL headers / libraries. Unfortunately quite a bit will have to be disabled (the only front end left will be VBoxBFE for instance). Add the following to your {{{Config.kmkconf}}} or {{{Config.kmklocal}}} file: |
43 | | {{{ |
44 | | VBOX_CFG_MAIN= |
45 | | VBOX_SDLGUI= |
46 | | VBOX_QTGUI= |
47 | | VBOX_WITH_DEBUGGER= |
48 | | }}} |
49 | | 1. It does not include mt.exe. This tool can be found in the PSDK, but you need to point the build system to it by appending the following lines to your {{{Config.kmkconf}}} or {{{Config.kmklocal}}} file: |
50 | | {{{ |
51 | | TOOL_VCC80X86_MT = $(PATH_SDK_WIN32SDK)/bin/mt.exe |
52 | | TOOL_VCC80AMD64_MT = $(PATH_SDK_WIN64SDK)/bin/mt.exe |
53 | | }}} |
54 | | |
55 | | You can get the Visual C++ 2005 Express Edition here: http://msdn.microsoft.com/vstudio/express/visualc/ |
56 | | |
57 | | === Building on Windows === |
58 | | |
59 | | 1. Change to the root directory and execute our configure script to setup your build environment: `wscript configure.vbs`. If The script finds all the tools necessary, it will output two files: `Config.kmkconf` containing information where to find the tools on your system and `configure.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. |
60 | | |
61 | | 2. Change to the root directory of the sources and enter our build shell environment: `configure.bat`. |
62 | | |
63 | | 3. To build a release package, type `kmk all packing`. This produces the installation package `out\windows\release\bin\VirtualBox.msi`. If you want to build a debug version, enter `kmk BUILD_TYPE=debug all packing`. |
64 | | |
65 | | 4. To install this package on your system, double-click on it to feed it into Windows Installer. If this fails for any reason, explicitly running `msiexec /i VirtualBox.msi /l* install.log` produces a log file which may hint at the cause. |
66 | | |
67 | | Some notes: |
68 | | |
69 | | During development it may be useful to register the necessary components by hand. Use the following commands with the windows host: |
70 | | {{{ |
71 | | regsvr32 VBoxC.DLL |
72 | | VBoxSVC /RegServer |
73 | | SUPUninstall |
74 | | SUPInstall |
75 | | }}} |
76 | | |
77 | | For uninstallation: |
78 | | {{{ |
79 | | regsvr32 /u VBoxC.DLL |
80 | | VBoxSVC /UnregServer |
81 | | SUPUninstall |
82 | | }}} |
83 | | |
84 | | When changing files be sure to have first a look in Windows Taskmanager if the `VBoxSVC` server is still running. This may happen if !VirtualBox didn't terminate correctly. A quicker alternative is to get `pskill` from http://www.sysinternals.com/Utilities/PsKill.html and simply kill `VBoxSVC` when uncertain whether it's running or not: |
85 | | {{{ |
86 | | pskill VBoxSVC |
87 | | }}} |
88 | | |
89 | | |
90 | | |