Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vboxwrapper: create the 'virtualbox home directory' in the project dir #6018

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions samples/vboxwrapper/vbox_vboxmanage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,20 @@ int VBOX_VM::initialize() {
#endif

// Determine the 'VirtualBox home directory'.
// On Windows, we run VboxSVC.exe in this directory,
// and we look for its log file there.
// On other platforms I don't think this is used.
//
// NOTE: I'm not sure this is relevant; see
// https://docs.oracle.com/en/virtualization/virtualbox/6.1/admin/TechnicalBackground.html#3.1.3.-Summary-of-Configuration-Data-Locations
//
if (getenv("VBOX_USER_HOME")) {
virtualbox_home_directory = getenv("VBOX_USER_HOME");
} else {
// If the override environment variable isn't specified then
// it is based of the current users HOME directory.
// If not specified by environment variable then create it
// Win, Linux: under user home dir
// Mac: in BOINC data dir
//
const char *home;
#ifdef _WIN32
home = getenv("USERPROFILE");
Expand All @@ -126,6 +132,7 @@ int VBOX_VM::initialize() {
#endif
virtualbox_home_directory = home;
virtualbox_home_directory += "/.VirtualBox";
boinc_mkdir(virtualbox_home_directory.c_str());
}

#ifdef _WIN32
Expand Down
Loading