Build VirtualBox from source code

1. prepare envrionment

1.a install VS2010

1.b install SDK,WDK 7.1

1.c install mingw64 to C:\ming64

1.d build qt, and add bin path to system environment variables(to avoid copying qt libraries when testing)

1.e build curl(64bit): copy the dll to VBOX release folder later

1.f extract sdl

1.g install python

1.h install openssl(64bit)

 

2 build vbox

2.a open VC win64 command promit, go vbox folder(adjust these folders)

cscript configure.vbs –with-MinGW-w64=D:\VBoxBuild\mingw64 –with-libSDL=D:\VBoxBuild\SDL-devel-1.2.15-VC\SDL-1.2.15 –with-openssl=C:\OpenSSL –with-Qt4=D:\VBoxBuild\qt-everywhere-opensource-src-4.7.4 –with-libcurl=D:\VBoxBuild\curlCompiler –with-VC=”C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC” –with-python=C:\Python27
cscript configure.vbs –with-MinGW-w64=c:\vbox\mingw64 –with-libSDL=c:\vbox\SDL –with-openssl=c:\vbox\OpenSSL –with-Qt4=c:\vbox\qt –with-libcurl=c:\vbox\libcurl –with-VC=”C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC” –with-python=c:\Python27

2.b modify files

2.b.1 open env.bat, change x86 to amd64

2.b.2 open these files with Western European encoding, save them as Unicode(you need this step only when your system default locale is not Western European Encoding)

VirtualBox-4.3.10\src\VBox\Disassembler\DisasmCore.cpp
VirtualBox-4.3.10\src\VBox\VMM\VMMAll\SELMAll.cpp
VirtualBox-4.3.10SourceBack\VirtualBox-4.3.10\include\VBox\vmm\hm_vmx.h
VirtualBox-4.3.10SourceBack\VirtualBox-4.3.10\src\VBox\Devices\PC\DevLPC.cpp
VirtualBox-4.3.10\src\VBox\Main\testcase\tstGuestCtrlParseBuffer.cpp

 

2.b.3 modify this file VirtualBox-4.3.10\src\VBox\VMM\Makefile.kmk , line 25

comment this line

2.b.4 modify VirtualBox-4.3.10\src\VBox\VMM\testcase\Makefile.kmk, from line 373 to line 378

comment these lines

2.b.5 modify VirtualBox-4.3.10\Config.kmk, line 521

comment this line

2.c run env.bat

2.d run kmk

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s