1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Adds default path for VBoxManage on Mac OS X.

This commit is contained in:
grossmj 2014-11-29 16:42:57 -07:00
parent 632134a02a
commit fed02ee167

View File

@ -62,8 +62,13 @@ class VirtualBox(IModule):
# get the vboxmanage location # get the vboxmanage location
self._vboxmanage_path = None self._vboxmanage_path = None
if sys.platform.startswith("win") and "VBOX_INSTALL_PATH" in os.environ: if sys.platform.startswith("win"):
self._vboxmanage_path = os.path.join(os.environ["VBOX_INSTALL_PATH"], "VBoxManage.exe") if "VBOX_INSTALL_PATH" in os.environ:
self._vboxmanage_path = os.path.join(os.environ["VBOX_INSTALL_PATH"], "VBoxManage.exe")
elif "VBOX_MSI_INSTALL_PATH" in os.environ:
self._vboxmanage_path = os.path.join(os.environ["VBOX_MSI_INSTALL_PATH"], "VBoxManage.exe")
elif sys.platform.startswith("darwin"):
self._vboxmanage_path = "/Applications/VirtualBox.app/Contents/MacOS/VBoxManage"
else: else:
config = Config.instance() config = Config.instance()
vbox_config = config.get_section_config(name.upper()) vbox_config = config.get_section_config(name.upper())