build virtualbox from source on Windows
build virtualbox from source on Windows
I want to build virtualbox from source. But it requires installing Qt 5.6.x for visual studio 2010 sp1. But vs 2010 is too old to install Qt 5.6.x or later. So can I use the newer version visual studio to build virtualbox?
Thank you very much!!!
Thank you very much!!!
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: build virtualbox from source on Windows
Moving to "OSE" from "Windows Hosts".
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 31
- Joined: 16. Oct 2018, 08:47
- Primary OS: Mac OS X other
- VBox Version: OSE self-compiled
- Guest OSses: Windows 7-10, Linux
Re: build virtualbox from source on Windows
For those who struggle with Qt build.
Starting from Qt 5.7 lowest supported Visual Studio version is 2012.
You should download last Qt 5.6 sources available, which is 5.6.3 here:
http://iso.mirrors.ustc.edu.cn/qtprojec ... -5.6.3.zip
You don't need to build the whole Qt, only GUI libraries. In fact, it significantly speeds up the process.
Steps to build Qt 5.6.3:
1. Unpack Qt sources to your project directory, for example C:/Users/YourUsername/Projects/Qt/5.6.3
2. Execute the following Windows CMD script for x86 build
3. Run configure.bat. As I mentioned above, you can turn off compilation of the the most of dynamic libraries
4. Run command nmake
5. Run command nmake install
6. For Qt x64 version run the following CMD script
7. Repeat steps same as for x86, configure, nmake, nmake install, but in configure command beginning should look like
8. Delete all sources and build files
Starting from Qt 5.7 lowest supported Visual Studio version is 2012.
You should download last Qt 5.6 sources available, which is 5.6.3 here:
http://iso.mirrors.ustc.edu.cn/qtprojec ... -5.6.3.zip
You don't need to build the whole Qt, only GUI libraries. In fact, it significantly speeds up the process.
Steps to build Qt 5.6.3:
1. Unpack Qt sources to your project directory, for example C:/Users/YourUsername/Projects/Qt/5.6.3
2. Execute the following Windows CMD script for x86 build
Code: Select all
SET QTDIR=C:\Qt\5.6.3\x86
cd /d C:\Users\YourUsername\Projects\Qt\5.6.3
mkdir build-x86
cd build-x86
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x86 /win7
SET PATH=%QTDIR%/bin;%PATH%
SET QMAKESPEC=win32-msvc2010
Code: Select all
./qt-everywhere-opensource-src-5.6.3/configure.bat -prefix C:\Qt\5.6.3\x86 -mp -opensource -confirm-license -nomake tests -nomake examples -no-compile-examples -release -shared -pch -no-ltcg -accessibility -no-sql-sqlite -opengl desktop -no-openvg -no-nis -no-iconv -no-evdev -no-mtdev -no-inotify -no-eventfd -largefile -no-system-proxies -qt-zlib -qt-pcre -no-icu -qt-libpng -qt-libjpeg -qt-freetype -no-fontconfig -qt-harfbuzz -no-angle -incredibuild-xge -no-plugin-manifests -qmake -qreal double -rtti -strip -no-ssl -no-openssl -no-libproxy -no-dbus -no-audio-backend -no-wmf-backend -no-qml-debug -no-direct2d -directwrite -no-style-fusion -native-gestures -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdeclarative -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns
5. Run command nmake install
6. For Qt x64 version run the following CMD script
Code: Select all
SET QTDIR=C:\Qt\5.6.3\x64
cd /d C:\Users\YourUsername\Projects\Qt\5.6.3
mkdir build-x64
cd build-x64
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 /win7
SET PATH=%QTDIR%/bin;%PATH%
SET QMAKESPEC=win32-msvc2010
Code: Select all
./qt-everywhere-opensource-src-5.6.3/configure.bat -prefix C:\Qt\5.6.3\x64...
Re: build virtualbox from source on Windows
Superfluous quote of the entire text of the immediately preceding post - deleted by mod.
hello
I want to add "/INTEGRITYCHECK" option to qt when I build it. How can I do this?
hello
I want to add "/INTEGRITYCHECK" option to qt when I build it. How can I do this?
Last edited by mpack on 8. Mar 2019, 16:44, edited 1 time in total.
Reason: See edit.
Reason: See edit.
-
- Volunteer
- Posts: 321
- Joined: 7. Oct 2009, 12:40
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: various
Re: build virtualbox from source on Windows
You edit the qmakespec configuration file (e.g. in qtbase\mkspecs\common\msvc-desktop.conf for 5.6.x or the corresponding configuration file for your environment version, on older Qt versions, such as 4.8.x - e.g. mkspecs\win32-msvc2010\qmake.conf), adding /integritycheck to QMAKE_LDFLAGS. Also, the building process will stop from time to time because you'll need to manually sign some Qt tools and the libraries, after they are built, to continue the build process. At the end of the build process, don't forget to sign your dlls. I haven't really looked for a solution to make the build automatically sign the binaries.
Re: build virtualbox from source on Windows
I have modified flag "QMAKE_LFLAGS_DLL" in file msvc-desktop.conf to "/DLL /integritycheck" and get the error:
It stopped when call file uic_wrapper.bat. So I open this file and receive popup error message
What should I do?
Code: Select all
call C:\Qt\5.6.3\qtbase\src\widgets\uic_wrapper.bat dialogs\qfiledialog.ui -o .uic\ui_qfiledialog.h
NMAKE : fatal error U1077: 'call' : return code '0xc0000428'
It stopped when call file uic_wrapper.bat. So I open this file and receive popup error message
Code: Select all
\qtbase\lib\Qt5Core.dll is either not designed to run on windows or it contains an error. Try installing the program again using original installation media or contact your system asministrator or the sofware vendor for support
-
- Volunteer
- Posts: 321
- Joined: 7. Oct 2009, 12:40
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: various
Re: build virtualbox from source on Windows
Are you using a self-signed certificate? If this is the case, add it to Certificates - Trusted Root Certification Authorities.
Re: build virtualbox from source on Windows
I signed and added the "/ INTEGRITYCHECK" option to almost all necessary dlls. But I failed at openssl 1.1.0 after many attempts. Can you tell me how to add "/ INTEGRITYCHECK" option to dll openssl 1.1.0 ? Thank you so muchmhanor wrote:Are you using a self-signed certificate? If this is the case, add it to Certificates - Trusted Root Certification Authorities.
-
- Volunteer
- Posts: 321
- Joined: 7. Oct 2009, 12:40
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: various
Re: build virtualbox from source on Windows
In Configurations\00-base-templates.conf, search for BASE_Windows section and add /integritycheck to lflags
Re: build virtualbox from source on Windows
Although I ran "nmake test" that reported a lot of errors but the dll still builds successfully. Thank youmhanor wrote:In Configurations\00-base-templates.conf, search for BASE_Windows section and add /integritycheck to lflags