mirror of https://github.com/BOINC/boinc.git
- vbox: Move the destination of the VBOX_USER_HOME environment variable to
<boinc_data_dir>/projects/virtualbox so that the virtualbox configuration can remain consistent across one or more projects. samples/vboxwrapper/ vbox.cpp svn path=/trunk/boinc/; revision=24380
This commit is contained in:
parent
9b45adb7cc
commit
b7f4b13342
|
@ -7100,3 +7100,11 @@ David 11 Oct 2011
|
||||||
host.inc
|
host.inc
|
||||||
lib/
|
lib/
|
||||||
coproc.cpp
|
coproc.cpp
|
||||||
|
|
||||||
|
Rom 11 Oct 2011
|
||||||
|
- vbox: Move the destination of the VBOX_USER_HOME environment variable to
|
||||||
|
<boinc_data_dir>/projects/virtualbox so that the virtualbox configuration
|
||||||
|
can remain consistent across one or more projects.
|
||||||
|
|
||||||
|
samples/vboxwrapper/
|
||||||
|
vbox.cpp
|
||||||
|
|
|
@ -384,14 +384,14 @@ int VBOX_VM::get_install_directory(string& virtualbox_install_directory ) {
|
||||||
|
|
||||||
int VBOX_VM::initialize() {
|
int VBOX_VM::initialize() {
|
||||||
string virtualbox_install_directory;
|
string virtualbox_install_directory;
|
||||||
string virtual_machine_slot_directory;
|
|
||||||
string old_path;
|
string old_path;
|
||||||
string new_path;
|
string new_path;
|
||||||
string virtualbox_user_home;
|
string virtualbox_user_home;
|
||||||
|
APP_INIT_DATA aid;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
|
boinc_get_init_data_p(&aid);
|
||||||
get_install_directory(virtualbox_install_directory);
|
get_install_directory(virtualbox_install_directory);
|
||||||
get_slot_directory(virtual_machine_slot_directory);
|
|
||||||
|
|
||||||
// Prep the environment so we can execute the vboxmanage application
|
// Prep the environment so we can execute the vboxmanage application
|
||||||
//
|
//
|
||||||
|
@ -416,8 +416,10 @@ int VBOX_VM::initialize() {
|
||||||
// Set the location in which the VirtualBox Configuration files can be
|
// Set the location in which the VirtualBox Configuration files can be
|
||||||
// stored for this instance.
|
// stored for this instance.
|
||||||
//
|
//
|
||||||
virtualbox_user_home = virtual_machine_slot_directory;
|
virtualbox_user_home = aid.project_dir;
|
||||||
virtualbox_user_home += "/vbox";
|
virtualbox_user_home += "/../virtualbox";
|
||||||
|
|
||||||
|
if (!boinc_file_exists(virtualbox_user_home.c_str())) boinc_mkdir(virtualbox_user_home.c_str());
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (!SetEnvironmentVariable("VBOX_USER_HOME", const_cast<char*>(virtualbox_user_home.c_str()))) {
|
if (!SetEnvironmentVariable("VBOX_USER_HOME", const_cast<char*>(virtualbox_user_home.c_str()))) {
|
||||||
|
|
Loading…
Reference in New Issue