mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Add custom executable paths on Windows
This commit is contained in:
1 parent
6c5f75bf43
commit
24bb0ca419
3 files changed
+9
No files matched your search
@@ -252,6 +252,9 @@ class Dynamips(BaseManager):
|
||||
# look for Dynamips
|
||||
dynamips_path = self.config.get_section_config("Dynamips").get("dynamips_path", "dynamips")
|
||||
if not os.path.isabs(dynamips_path):
|
||||
if sys.platform.startswith("win") and hasattr(sys, "frozen"):
|
||||
dynamips_dir = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(sys.executable)), "dynamips"))
|
||||
os.environ["PATH"] = os.pathsep.join(dynamips_dir) + os.pathsep + os.environ.get("PATH", "")
|
||||
dynamips_path = shutil.which(dynamips_path)
|
||||
|
||||
if not dynamips_path:
|
||||
|
||||
Reference in new issue
Block a user