Add custom executable paths on Windows

This commit is contained in:
grossmj committed 2023-12-05 21:24:40 +10:00
1 parent 6c5f75bf43
commit 24bb0ca419
3 files changed
+9

No files matched your search

+3
View File
@@ -140,6 +140,9 @@ class VPCSVM(BaseNode):
vpcs_path = self._manager.config.get_section_config("VPCS").get("vpcs_path", "vpcs")
if not os.path.isabs(vpcs_path):
if sys.platform.startswith("win") and hasattr(sys, "frozen"):
vpcs_dir = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(sys.executable)), "vpcs"))
os.environ["PATH"] = os.pathsep.join(vpcs_dir) + os.pathsep + os.environ.get("PATH", "")
vpcs_path = shutil.which(vpcs_path)
return vpcs_path