diff --git a/README.md b/README.md index 29c3ccb5..0f84ba94 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,15 @@ The extension is intended for the (at the time of writing) not-yet-released QuPath v0.3. It is not compatible with earlier QuPath versions. +## Installing + +To install the OMERO extension, download the latest `qupath-extension-omero-[version].jar` file from [releases](https://github.com/qupath/qupath-extension-omero/releases) and drag it onto the main QuPath window. + +If you haven't installed any extensions before, you'll be prompted to select a QuPath user directory. +The extension will then be copied to a location inside that directory. + +You might then need to restart QuPath (but not your computer). + ## Building diff --git a/build.gradle b/build.gradle index 470cf759..e61a9377 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { ext.moduleName = 'qupath.extension.omero' archivesBaseName = 'qupath-extension-omero' description = "QuPath extension to support image reading using OMERO's web API." -version = "0.3.0-SNAPSHOT" +version = "0.3.0-rc2" repositories { mavenCentral() @@ -27,7 +27,7 @@ repositories { dependencies { implementation "org.apache.commons:commons-text:1.9" - shadow "io.github.qupath:qupath-gui-fx:0.3.0-SNAPSHOT" + shadow "io.github.qupath:qupath-gui-fx:0.3.0-rc2" shadow "org.slf4j:slf4j-api:1.7.30" } diff --git a/src/main/java/qupath/lib/images/servers/omero/OmeroExtension.java b/src/main/java/qupath/lib/images/servers/omero/OmeroExtension.java index ac0b7934..6191cbec 100644 --- a/src/main/java/qupath/lib/images/servers/omero/OmeroExtension.java +++ b/src/main/java/qupath/lib/images/servers/omero/OmeroExtension.java @@ -62,13 +62,13 @@ public class OmeroExtension implements QuPathExtension, GitHubProject { private static boolean alreadyInstalled = false; - private static Version minimumVersion = Version.parse("0.3.0-SNAPSHOT"); - @Override public void installExtension(QuPathGUI qupath) { - if (alreadyInstalled || !checkCompatibility()) + if (alreadyInstalled) return; + logger.debug("Installing OMERO extension"); + alreadyInstalled = true; var actionClients = ActionTools.createAction(new OmeroWebClientsCommand(qupath), "Manage server connections"); var actionSendObjects = ActionTools.createAction(new OmeroWritePathObjectsCommand(qupath), "Send annotations to OMERO"); @@ -89,25 +89,6 @@ public void installExtension(QuPathGUI qupath) { createServerListMenu(qupath, browseServerMenu); } - - /** - * Check compatibility with the QuPath version. - * @return - */ - private static boolean checkCompatibility() { - try { - var version = QuPathGUI.getVersion(); - // If >= the minimum version, we are compatible as far as we know - if (minimumVersion.compareTo(version) <= 0) - return true; - } catch (Exception e) { - logger.debug("Version check exception: " + e.getLocalizedMessage(), e); - } - logger.warn("OMERO extension is not compatible with the current QuPath version ({}.{}.{} required)", - minimumVersion.getMajor(), minimumVersion.getMinor(), minimumVersion.getPatch()); - return false; - } - @Override public String getName() { @@ -218,4 +199,9 @@ static Map getOpenedBrowsers( public GitHubRepo getRepository() { return GitHubRepo.create(getName(), "qupath", "qupath-extension-omero"); } + + @Override + public Version getQuPathVersion() { + return Version.parse("0.3.0-rc2"); + } }