diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ef2a053543..4279e277754 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where no longer a warning was displayed when inserting references into LibreOffice with an invalid "ReferenceParagraphFormat". [#6907](https://github.com/JabRef/jabref/pull/60907). - We fixed an issue where a selected field was not removed after the first click in the custom entry types dialog [#6934](https://github.com/JabRef/jabref/issues/6934) - We fixed an issue where a remove icon was shown for standard entry types in the custom entry types dialog [6906](https://github.com/JabRef/jabref/issues/6906) +- We fixed an issue with the python script used by browser plugins that failed to locate JabRef if not installed in its default location. ### Removed diff --git a/buildres/linux/jabrefHost.py b/buildres/linux/jabrefHost.py index e1343e23207..ef3fd603b86 100755 --- a/buildres/linux/jabrefHost.py +++ b/buildres/linux/jabrefHost.py @@ -6,6 +6,7 @@ import json import logging +import os import platform import shlex import shutil @@ -16,11 +17,16 @@ # We assume that this python script is located in "jabref/lib" while the executable is "jabref/bin/JabRef" script_dir = Path(__file__).resolve().parent.parent -JABREF_PATH = script_dir / "bin/JabRef" -if not JABREF_PATH.exists(): - JABREF_PATH = shutil.which("jabref") - -if not JABREF_PATH.exists(): +relpath_path = script_dir / "bin/JabRef" +lowercase_path = shutil.which("jabref") +uppercase_path = shutil.which("JabRef") +if relpath_path.exists(): + JABREF_PATH = relpath_path +elif lowercase_path is not None and os.path.exists(lowercase_path): + JABREF_PATH = Path(lowercase_path) +elif uppercase_path is not None and os.path.exists(uppercase_path): + JABREF_PATH = Path(uppercase_path) +else: logging.error("Could not determine JABREF_PATH") sys.exit(-1)