Skip to content

Commit 6fa7ac5

Browse files
authored
Merge pull request #9 from petebankhead/rc2
Update for QuPath v0.3.0-rc2
2 parents ced222f + 7fb0609 commit 6fa7ac5

File tree

3 files changed

+19
-24
lines changed

3 files changed

+19
-24
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ The extension is intended for the (at the time of writing) not-yet-released
1717
QuPath v0.3.
1818
It is not compatible with earlier QuPath versions.
1919

20+
## Installing
21+
22+
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.
23+
24+
If you haven't installed any extensions before, you'll be prompted to select a QuPath user directory.
25+
The extension will then be copied to a location inside that directory.
26+
27+
You might then need to restart QuPath (but not your computer).
28+
2029

2130
## Building
2231

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
ext.moduleName = 'qupath.extension.omero'
1010
archivesBaseName = 'qupath-extension-omero'
1111
description = "QuPath extension to support image reading using OMERO's web API."
12-
version = "0.3.0-SNAPSHOT"
12+
version = "0.3.0-rc2"
1313

1414
repositories {
1515
mavenCentral()
@@ -27,7 +27,7 @@ repositories {
2727
dependencies {
2828
implementation "org.apache.commons:commons-text:1.9"
2929

30-
shadow "io.github.qupath:qupath-gui-fx:0.3.0-SNAPSHOT"
30+
shadow "io.github.qupath:qupath-gui-fx:0.3.0-rc2"
3131
shadow "org.slf4j:slf4j-api:1.7.30"
3232
}
3333

src/main/java/qupath/lib/images/servers/omero/OmeroExtension.java

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public class OmeroExtension implements QuPathExtension, GitHubProject {
6262

6363
private static boolean alreadyInstalled = false;
6464

65-
private static Version minimumVersion = Version.parse("0.3.0-SNAPSHOT");
66-
6765
@Override
6866
public void installExtension(QuPathGUI qupath) {
69-
if (alreadyInstalled || !checkCompatibility())
67+
if (alreadyInstalled)
7068
return;
7169

70+
logger.debug("Installing OMERO extension");
71+
7272
alreadyInstalled = true;
7373
var actionClients = ActionTools.createAction(new OmeroWebClientsCommand(qupath), "Manage server connections");
7474
var actionSendObjects = ActionTools.createAction(new OmeroWritePathObjectsCommand(qupath), "Send annotations to OMERO");
@@ -89,25 +89,6 @@ public void installExtension(QuPathGUI qupath) {
8989
createServerListMenu(qupath, browseServerMenu);
9090
}
9191

92-
93-
/**
94-
* Check compatibility with the QuPath version.
95-
* @return
96-
*/
97-
private static boolean checkCompatibility() {
98-
try {
99-
var version = QuPathGUI.getVersion();
100-
// If >= the minimum version, we are compatible as far as we know
101-
if (minimumVersion.compareTo(version) <= 0)
102-
return true;
103-
} catch (Exception e) {
104-
logger.debug("Version check exception: " + e.getLocalizedMessage(), e);
105-
}
106-
logger.warn("OMERO extension is not compatible with the current QuPath version ({}.{}.{} required)",
107-
minimumVersion.getMajor(), minimumVersion.getMinor(), minimumVersion.getPatch());
108-
return false;
109-
}
110-
11192

11293
@Override
11394
public String getName() {
@@ -218,4 +199,9 @@ static Map<OmeroWebClient, OmeroWebImageServerBrowserCommand> getOpenedBrowsers(
218199
public GitHubRepo getRepository() {
219200
return GitHubRepo.create(getName(), "qupath", "qupath-extension-omero");
220201
}
202+
203+
@Override
204+
public Version getQuPathVersion() {
205+
return Version.parse("0.3.0-rc2");
206+
}
221207
}

0 commit comments

Comments
 (0)