mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Drop Windows support
This commit is contained in:
1 parent
4fb0cd9321
commit
74c675d5b0
47 files changed
+223
-1004
No files matched your search
@@ -62,16 +62,7 @@ class VirtualBox(BaseManager):
|
||||
vboxmanage_path = shutil.which(vboxmanage_path)
|
||||
else:
|
||||
log.info("A path to VBoxManage has not been configured, trying to find it...")
|
||||
if sys.platform.startswith("win"):
|
||||
if "VBOX_INSTALL_PATH" in os.environ:
|
||||
vboxmanage_path_windows = os.path.join(os.environ["VBOX_INSTALL_PATH"], "VBoxManage.exe")
|
||||
if os.path.exists(vboxmanage_path_windows):
|
||||
vboxmanage_path = vboxmanage_path_windows
|
||||
elif "VBOX_MSI_INSTALL_PATH" in os.environ:
|
||||
vboxmanage_path_windows = os.path.join(os.environ["VBOX_MSI_INSTALL_PATH"], "VBoxManage.exe")
|
||||
if os.path.exists(vboxmanage_path_windows):
|
||||
vboxmanage_path = vboxmanage_path_windows
|
||||
elif sys.platform.startswith("darwin"):
|
||||
if sys.platform.startswith("darwin"):
|
||||
vboxmanage_path_osx = "/Applications/VirtualBox.app/Contents/MacOS/VBoxManage"
|
||||
if os.path.exists(vboxmanage_path_osx):
|
||||
vboxmanage_path = vboxmanage_path_osx
|
||||
|
||||
@@ -38,10 +38,6 @@ from gns3server.compute.nios.nio_udp import NIOUDP
|
||||
from gns3server.compute.adapters.ethernet_adapter import EthernetAdapter
|
||||
from gns3server.compute.base_node import BaseNode
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
import msvcrt
|
||||
import win32file
|
||||
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -839,14 +835,11 @@ class VirtualBoxVM(BaseNode):
|
||||
:returns: pipe path (string)
|
||||
"""
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
pipe_name = fr"\\.\pipe\gns3_vbox\{self.id}"
|
||||
else:
|
||||
pipe_name = os.path.join(tempfile.gettempdir(), "gns3_vbox", f"{self.id}")
|
||||
try:
|
||||
os.makedirs(os.path.dirname(pipe_name), exist_ok=True)
|
||||
except OSError as e:
|
||||
raise VirtualBoxError(f"Could not create the VirtualBox pipe directory: {e}")
|
||||
pipe_name = os.path.join(tempfile.gettempdir(), "gns3_vbox", f"{self.id}")
|
||||
try:
|
||||
os.makedirs(os.path.dirname(pipe_name), exist_ok=True)
|
||||
except OSError as e:
|
||||
raise VirtualBoxError(f"Could not create the VirtualBox pipe directory: {e}")
|
||||
return pipe_name
|
||||
|
||||
async def _set_serial_console(self):
|
||||
|
||||
Reference in new issue
Block a user