Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,20 @@ You can then navigate to `Releases` and fill out information about the release -
Once published, users will be able to automatically install the extension as described here:
https://qupath.readthedocs.io/en/0.5/docs/intro/extensions.html#installing-extensions

### Automatic updates
### Catalogs

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

https://github.com/qupath/qupath-extension-template/blob/778f02759d8a7fe5c73f1751edd58b6494beff9f/src/main/java/qupath/ext/template/DemoExtension.java#L65-L66
To create a catalog, follow the [extension catalog model documentation](https://qupath.github.io/extension-catalog-model/).
You will need to create a JSON file containing specific information about your extension and host it on a dedicated GitHub repository.
Once the catalog is created, any user will be able to easily install your catalog by:

* Opening QuPath's extension manager by clicking on `Extensions` -> `Manage extensions` in QuPath.
* Adding the URL to your catalog by clicking on `Manage extension catalogs` -> `Add` in the extension manager.
* Clicking on the `+` symbol next to your extension in the extension manager.

QuPath will then make it easy to manage your extension and automatically inform users when an update is available.

### Replace this readme

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pluginManagement {

// TODO: Specify which version of QuPath the extension is targeting here
qupath {
version = "0.5.1"
version = "0.6.0"
}

// Apply QuPath Gradle settings plugin to handle configuration
Expand Down
18 changes: 1 addition & 17 deletions src/main/java/qupath/ext/template/DemoExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import qupath.fx.prefs.controlsfx.PropertyItemBuilder;
import qupath.lib.common.Version;
import qupath.lib.gui.QuPathGUI;
import qupath.lib.gui.extensions.GitHubProject;
import qupath.lib.gui.extensions.QuPathExtension;
import qupath.lib.gui.prefs.PathPrefs;

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

/**
* GitHub repo that your extension can be found at.
* This makes it easier for users to find updates to your extension.
* If you don't want to support this feature, you can remove
* references to GitHubRepo and GitHubProject from your extension.
* TODO: define this
*/
private static final GitHubRepo EXTENSION_REPOSITORY = GitHubRepo.create(
EXTENSION_NAME, "myGitHubUserName", "myGitHubRepo");

/**
* Flag whether the extension is already installed (might not be needed... but we'll do it anyway)
*/
Expand Down Expand Up @@ -182,9 +171,4 @@ public String getDescription() {
public Version getQuPathVersion() {
return EXTENSION_QUPATH_VERSION;
}

@Override
public GitHubRepo getRepository() {
return EXTENSION_REPOSITORY;
}
}