From 6d36df6eca6405ed034663d1d01fe929cb4767d2 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Wed, 19 Nov 2025 06:22:44 -0500 Subject: [PATCH] GP-0: Fixing PyGhidra version check when things like "-BETA" are present --- .../Features/PyGhidra/src/main/py/src/pyghidra/launcher.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py index 385b63bfbd..31214c4b11 100644 --- a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py +++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py @@ -396,7 +396,8 @@ class PyGhidraLauncher: Checks if the currently installed Ghidra version is supported. The launcher will report the problem and terminate if it is not supported. """ - if Version(self.app_info.version) < Version(MINIMUM_GHIDRA_VERSION): + base_version = self.app_info.version.split('-')[0] # remove things like "-BETA" + if Version(base_version) < Version(MINIMUM_GHIDRA_VERSION): msg = f"Ghidra version {self.app_info.version} is not supported" + os.linesep + \ f"The minimum required version is {MINIMUM_GHIDRA_VERSION}" self._report_fatal_error("Unsupported Version", msg, ValueError(msg)) @@ -744,7 +745,7 @@ def _run_mac_app(): return res CFRunLoopTimerCallback = CFUNCTYPE(None, c_void_p, c_void_p) - kCFRunLoopDefaultMode = c_void_p.in_dll(CoreFoundation, "kCFRunLoopDefaultMode") + kCFRunLoopDefaultMode = c_void_p.in_dll(CoreFoundation, "kCFRunLoopDefaultMode") # @UndefinedVariable kCFRunLoopRunFinished = c_int32(1) NULL = c_void_p(0) INF_TIME = c_double(1.0e20)