Repository navigation
Build Environment Setup
This guide explains how to install and configure the tools required to build VirtualBox VNC for Windows from source.
Before proceeding, make sure you have administrator privileges and a working internet connection.
- Download the Visual Studio 2022 installer from the official Visual Studio website.
- Run the installer.
- Select the Desktop development with C++ workload.
- Make sure the following components are selected:
- MSVC v143 C++ x64/x86 Build Tools.
- Windows SDK.
- C++ CMake tools for Windows, if required by the build scripts.
- Complete the installation.
The MSVC compiler and linker must be available to the build environment.
The Windows SDK and Windows Driver Kit are required to compile the Windows-specific components and kernel drivers.
- Download the Windows SDK and WDK.
- Install the Windows SDK.
- Install the corresponding WDK version.
- If prompted, install the WDK Visual Studio extension through the Visual Studio Installer.
Important: Use compatible SDK and WDK versions. Their build numbers must match when compiling drivers.
- Download Git for Windows.
- Run the installer.
- Follow the installation wizard.
- Make sure Git is available from the command line.
Verify the installation:
git --version- Download Python from python.org.
- Run the installer.
- Enable Add Python to PATH.
- Complete the installation.
Verify:
python --versionThe Java Development Kit (JDK) is required to build VirtualBox components and tools that depend on Java.
- Download a compatible JDK from one of the following sources:
- Install the JDK for Windows x64.
- Configure the
JAVA_HOMEenvironment variable to point to the JDK installation directory. - Add the JDK
bindirectory to the WindowsPATHenvironment variable.
For example:
JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-<version>Add the following to PATH:
%JAVA_HOME%\binVerify the installation:
java -version
javac -version- Download the Qt Online Installer.
- Run the installer and sign in if required.
- Select at least Qt version 6.12.0 with the following components:
- MSVC 2022 64-bit
- Qt State Machines (Inside Additional Libraries)
Warning
Do not select the MinGW package if the project is configured to use MSVC.
The Qt version and modules must match the requirements specified by the project.
Both assemblers are used by parts of the VirtualBox build system.
- Download the Windows binaries for Yasm and NASM.
- Extract or install them into suitable directories.
- Add their executable directories to the Windows
PATHenvironment variable, or configure their locations in the build configuration.
Verify:
yasm --version
nasm --version- Visit the Open Watcom download page.
- Download a suitable Windows distribution.
- Run the installer, if using an installer package.
- Configure the required environment variables and executable paths according to the Open Watcom documentation.
Make sure the version is compatible with the VirtualBox source tree being built.
WiX is used to generate Windows MSI installation packages.
- Download the WiX version required by the project.
- Install the package using its official installation instructions.
- Make sure the required WiX executables are accessible to the build scripts.
Important: WiX versions are not necessarily interchangeable. Use the version specified by the project's build configuration.
On Windows, WinFlexBison can provide compatible Windows executables for both tools.
- Open the WinFlexBison releases page.
- Download a suitable release.
- Extract the archive.
- Rename
win_flex.exetoflex.exeandwin_bison.exetobison.exe.
Verify that both executables can be launched.
Before starting the VirtualBox build process, verify that the required tools are installed and accessible.
Open a Visual Studio 2022 Developer Command Prompt and check the availability of the relevant executables.
Example:
cl
git --version
python --version
nasm --version
yasm --versionAlso verify that the Qt installation, Windows SDK, WDK, WiX Toolset, Open Watcom, Flex/Bison, vcpkg and libvncserver are correctly configured.
Once all dependencies have been installed, proceed to the Building from Source guide.
Note: Some dependencies may require additional configuration in LocalConfig.kmk. Refer to the project's build configuration examples before compiling. c