| Version 5 (modified by , 18 years ago) ( diff ) |
|---|
Build instructions
This page describes how to build VirtualBox OSE, once you have gotten its source code (either from our SVN server or a tarball, as described on the Downloads page).
The sources are the same, no matter whether you build on Linux or Windows. But the build instructions differ.
To build, use the kmk command after you have entered our development environment. This is the make command of kBuild, our homegrown build system. (To avoid confusion with an already installed make program, our make has been renamed to kmk). With kBuild, the BUILD_TYPE environment variable determines what type is built and can be debug (that's the default) and release (enable compiler optimizations, strip debug and profiling code).
The default build target is all, which produces all executables in the out/{platform}/{release|debug}/ directories. If you add the packing target, an installation package is built according to the requirements of your platform (see below).
Linux hosts
We at InnoTek mostly use Gentoo, so the following build instructions apply to that environment. Things should not be much different for other distributions though. If you want to supply build instructions (especially package names) for other distributions, please contact InnoTek.
Prerequisites on Linux
You need:
- GCC 3.2.3 or later (presently, only 3.x is supported; our recompiler doesn't like 4.x)
- Qt 3.3.x (with x >= 5 if possible)
- Sablotron XSLT Processor 1.0.2
- libIDL
- Relatively recent WINE (VirtualBox uses some Win32 executables during the build process)
- Java (http://java.sun.com/j2se/1.5.0/download.jsp)
- libSDL (with sdl-ttf)
- Optional: DirectFB
- Optional: Doxygen 1.4+
On Gentoo, run this:
emerge -uav =qt-3* sablotron libIDL wine blackdown-jdk libsdl sdl-ttf DirectFB doxygen
Building on Linux
- Change to the root directory of the sources and enter our build shell environment:
tools/env.sh.
- To build a release package, type
kmk BUILD_TYPE=release all packing. This produces the installation packageout/linux/release/bin/VirtualBox.run.
- To install this package on your system, run it (as the superuser). So, for example,
cd out/linux/release/binandsudo sh VirtualBox.run.
Running your installed build on Linux
The command sequence outlined above installs VirtualBox in /opt/VirtualBox-<version> and the Linux kernel module in lib/modules. A shell script wrapper is put in /usr/bin/VirtualBox, so you should be able to run VirtualBox from everywhere. You will need to load the Linux kernel module before running VirtualBox, so a modprobe vboxdrv will also be necessary.
Windows hosts
Prerequisites
- Java (http://java.sun.com/j2se/1.5.0/download.jsp), runtime is sufficient
- .NET, version 2.0 recommended

