Skip to content

Commit f41dc35

Browse files
authored
Merge pull request #26 from Rylern/adapt-to-new-extension-manager
Adapt to new extension manager
2 parents 0c0bd82 + 0aa9f8b commit f41dc35

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,20 @@ You can then navigate to `Releases` and fill out information about the release -
169169
Once published, users will be able to automatically install the extension as described here:
170170
https://qupath.readthedocs.io/en/0.5/docs/intro/extensions.html#installing-extensions
171171

172-
### Automatic updates
172+
### Catalogs
173173

174-
To enable easy installation and automatic updates in QuPath, fill in the (**public**) GitHub owner and repository
175-
for the extension.
174+
QuPath's extension manager can easily install an extension if it is referenced in a **catalog**.
175+
A catalog is a JSON file hosted on a GitHub repository containing information about extensions, making it possible to easily manage them from QuPath.
176176

177-
https://github.com/qupath/qupath-extension-template/blob/778f02759d8a7fe5c73f1751edd58b6494beff9f/src/main/java/qupath/ext/template/DemoExtension.java#L65-L66
177+
To create a catalog, follow the [extension catalog model documentation](https://qupath.github.io/extension-catalog-model/).
178+
You will need to create a JSON file containing specific information about your extension and host it on a dedicated GitHub repository.
179+
Once the catalog is created, any user will be able to easily install your catalog by:
180+
181+
* Opening QuPath's extension manager by clicking on `Extensions` -> `Manage extensions` in QuPath.
182+
* Adding the URL to your catalog by clicking on `Manage extension catalogs` -> `Add` in the extension manager.
183+
* Clicking on the `+` symbol next to your extension in the extension manager.
184+
185+
QuPath will then make it easy to manage your extension and automatically inform users when an update is available.
178186

179187
### Replace this readme
180188

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pluginManagement {
99

1010
// TODO: Specify which version of QuPath the extension is targeting here
1111
qupath {
12-
version = "0.5.1"
12+
version = "0.6.0"
1313
}
1414

1515
// Apply QuPath Gradle settings plugin to handle configuration

src/main/java/qupath/ext/template/DemoExtension.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import qupath.fx.prefs.controlsfx.PropertyItemBuilder;
1414
import qupath.lib.common.Version;
1515
import qupath.lib.gui.QuPathGUI;
16-
import qupath.lib.gui.extensions.GitHubProject;
1716
import qupath.lib.gui.extensions.QuPathExtension;
1817
import qupath.lib.gui.prefs.PathPrefs;
1918

@@ -33,7 +32,7 @@
3332
* /resources/META-INF/services/qupath.lib.gui.extensions.QuPathExtension
3433
* </pre>
3534
*/
36-
public class DemoExtension implements QuPathExtension, GitHubProject {
35+
public class DemoExtension implements QuPathExtension {
3736
// TODO: add and modify strings to this resource bundle as needed
3837
/**
3938
* A resource bundle containing all the text used by the extension. This may be useful for translation to other languages.
@@ -61,16 +60,6 @@ public class DemoExtension implements QuPathExtension, GitHubProject {
6160
*/
6261
private static final Version EXTENSION_QUPATH_VERSION = Version.parse("v0.5.0");
6362

64-
/**
65-
* GitHub repo that your extension can be found at.
66-
* This makes it easier for users to find updates to your extension.
67-
* If you don't want to support this feature, you can remove
68-
* references to GitHubRepo and GitHubProject from your extension.
69-
* TODO: define this
70-
*/
71-
private static final GitHubRepo EXTENSION_REPOSITORY = GitHubRepo.create(
72-
EXTENSION_NAME, "myGitHubUserName", "myGitHubRepo");
73-
7463
/**
7564
* Flag whether the extension is already installed (might not be needed... but we'll do it anyway)
7665
*/
@@ -182,9 +171,4 @@ public String getDescription() {
182171
public Version getQuPathVersion() {
183172
return EXTENSION_QUPATH_VERSION;
184173
}
185-
186-
@Override
187-
public GitHubRepo getRepository() {
188-
return EXTENSION_REPOSITORY;
189-
}
190174
}

0 commit comments

Comments
 (0)