From 799da5b2f31cc6f6ba6003924f39762194cb17be Mon Sep 17 00:00:00 2001 From: Jeremy Shen Date: Thu, 11 Jun 2026 17:34:36 +0800 Subject: [PATCH] fix: Windows common paths try .bat before .exe (Xilinx tools are .bat) Vitis/Vivado on Windows uses .bat wrappers, not .exe. The hardcoded fallback paths in _find_executable step 4 only looked for .exe files. Also expanded to try both 2023.2 and 2022.2 + Vitis/Vivado combos. --- src/vitis_checker.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/vitis_checker.py b/src/vitis_checker.py index 73718b0..0b0f65f 100644 --- a/src/vitis_checker.py +++ b/src/vitis_checker.py @@ -201,12 +201,11 @@ def _find_executable( # 4. Common install paths (cross-platform fallback) if system == "windows": - common = [ - f"C:/Xilinx/Vitis/2023.2/bin/{exec_name}.exe", - f"C:/Xilinx/Vivado/2023.2/bin/{exec_name}.exe", - f"C:/Xilinx/Vitis/2022.2/bin/{exec_name}.exe", - f"C:/Xilinx/Vivado/2022.2/bin/{exec_name}.exe", - ] + common: list[str] = [] + for sfx in (".bat", ".exe"): + for ver in ("2023.2", "2022.2"): + for prod in ("Vitis", "Vivado"): + common.append(f"C:/Xilinx/{prod}/{ver}/bin/{exec_name}{sfx}") else: common = [ f"/data/xilinx/Vitis/2023.2/bin/{exec_name}",