mirror of https://github.com/BOINC/boinc.git
vboxwrapper: actually create the 'virtualbox home directory'
As far as I can tell this dir is used only on Win; we run VBoxSVC.exe there, and look for a log file later. Should we remove it for other platforms? Also: there's some code to create a 'scratch' dir, projects/scratch. This seems like a bad idea; we shouldn't put random stuff in projects/, and also if there are multiple VM jobs they share the same dir. Should we get rid of this?
This commit is contained in:
parent
df43b3ffa7
commit
cfafee2020
|
@ -101,14 +101,20 @@ int VBOX_VM::initialize() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Determine the 'VirtualBox home directory'.
|
// 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
|
// 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
|
// 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")) {
|
if (getenv("VBOX_USER_HOME")) {
|
||||||
virtualbox_home_directory = getenv("VBOX_USER_HOME");
|
virtualbox_home_directory = getenv("VBOX_USER_HOME");
|
||||||
} else {
|
} else {
|
||||||
// If the override environment variable isn't specified then
|
// If not specified by environment variable then create it
|
||||||
// it is based of the current users HOME directory.
|
// Win, Linux: under user home dir
|
||||||
|
// Mac: in BOINC data dir
|
||||||
|
//
|
||||||
const char *home;
|
const char *home;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
home = getenv("USERPROFILE");
|
home = getenv("USERPROFILE");
|
||||||
|
@ -126,6 +132,7 @@ int VBOX_VM::initialize() {
|
||||||
#endif
|
#endif
|
||||||
virtualbox_home_directory = home;
|
virtualbox_home_directory = home;
|
||||||
virtualbox_home_directory += "/.VirtualBox";
|
virtualbox_home_directory += "/.VirtualBox";
|
||||||
|
boinc_mkdir(virtualbox_home_directory.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
Loading…
Reference in New Issue