Creating Visual Studio solution for VirtualBox

Discussions related to using the OSE version of VirtualBox.
Post Reply
Yurii Cherkasov
Posts: 10
Joined: 9. Mar 2018, 08:14

Creating Visual Studio solution for VirtualBox

Post by Yurii Cherkasov »

I compiled VirtualBox 5.2.2 OSE under Windows 7 x64, using Visual Studio 2010 SP1.
Very soon I realized that editors like Notepad++ or Sublime Text are very hard to use in such a large-scale project, also, I want to use MS perks like VS debugger, symbol index for quick search and IntelliSense, as much as possible.
It appeared more or less possible, I created solution manually, added sources for Qt-based frontend (VirtualBox.exe) and attached to process. As pdb-files were accessible, I could debug GUI process under Visual Studio 2010.

My question is - is there any Open Source projects, led by Oracle or 3rd party, for generating xml-based Visual Studio solution and project files, for every target described in kmk-files. If such project on an early stage, or even abandoned, we are willing to pick it up and contribute.

Also a questions for all VB OSE developers - which toolchain do you use for Windows (and not only Windows) development to make it more comfortable?
Thanks
crazii_he
Posts: 7
Joined: 21. Jul 2018, 02:06

Re: Creating Visual Studio solution for VirtualBox

Post by crazii_he »

Just registered to vote for it.
I think it will be more convenient over all (only for windows build). Not to mention the all in one IDE, what I really what is to build a release version with only a little portion of code (some several files or modules) with debug info & without optimization, so that I could debug specific part of the code without bearing the crazy slow speed of debug build. That's only gonna work if there's no static CRT linkage & no interaction via C++STL objects, since debug version of MSVC's stdcpp objects differs from release ones, they have different DLL/binaries to handle them, apparently.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Creating Visual Studio solution for VirtualBox

Post by mpack »

@crazii_he: voting for it won't get you very far. Proving a substantial commercial advantage for Oracle would undoubtedly get you further. Otherwise they may fail to see the urgency in adding support for dev tools they don't use, when few of their paying customers ever probably even look at the source code.
crazii_he
Posts: 7
Joined: 21. Jul 2018, 02:06

Re: Creating Visual Studio solution for VirtualBox

Post by crazii_he »

Yes you are right, unfortunately I'm not using vbox in my work, nothing related to it, despite I'm pro programmer in my work. I'm not that enthusiastic to get a commercial advantage for my spare time interest, not yet...
Thanks for the tip anyway.

I believe use different CFLAGS for some individual files can still be done using makefile/kmk, not in a convenient way.

Another tip for @Yurii Cherkasov, you can use Visual Studio Code for search/editing, its much more easy. Visual Studio Code can open an folder and manage all files in it, open the root folder of vbox source and bingo. For debugging, just attach vbox process using an empty VS with no solution/source files, if pdb files not found, manually select the ones in out directory, i.e. out\win.amd64\release\stage\debug\bin, and browse to select source files if VS cannot locate it.

About the toolchain qusetion, I'm using VS2010 epxress, which is recommended in the dev wiki. I found VS2012 is supported (by view the configure.vbs), and I believe you can probably use latest VSCommunity edition (VS2017 for the time being)by editing the configure.vbs. in that way you don't need to build Qt5 msvc2010 yourself, just download official binary releases. I don't know if there is still VS2012 built for Qt5 (you can search, unofficial build will do), if there is, it's better using vs2012 to avoid building Qt5.
Yurii Cherkasov
Posts: 10
Joined: 9. Mar 2018, 08:14

Re: Creating Visual Studio solution for VirtualBox

Post by Yurii Cherkasov »

Yeah, with about 250 targets manual migration to CMake is close to impossible. However, idea of converting kmk-files into CMakeLists.txt using some Python script may worth some. Definetily requires deep knowledge of kBuild (really mess googling for it, Linux kernel build system has the same name), but at least has finnite number of syntax rules to implement. Our team of 2 devs can not handle on our own, but if we had enough open-source community members interested in the project, we may tried it
Post Reply