Dependency of own plugin on other update sites

Hello, @imagejan

Probably this has been asked before but I could not find it. Let’s say a plugin that I develop depends on code in BigStitcher. How do I handle this? Do I upload BigStitcher to my update site?

There’s currently no way to define dependencies between update sites. Maybe this is something that will be considered in a new updater that @frauzufall is working on…

I know that @ehrenfeu had written some code in the past to check if a Fiji installation has the IBMP-CNRS update site enabled (and therefore ActionBar available) because their plugins from the IMCF Uni Basel update site require it. Maybe Niko can comment on this himself.

I would recommend against uploading BigStitcher to your own update site, as it can (and certainly will) lead to version skews in the future (although in case of BigStitcher you probably can’t make it much worse, as the BigStitcher update site itself currently introduces some version skew, shipping a different version of SPIM_Registration.jar than the Java-8 update site… :slightly_smiling_face: @StephanPreibisch @hoerldavid)

2 Likes

I agree! I guess we (@ASHISRAVINDRAN) will then do something like this: https://stackoverflow.com/questions/5794227/how-to-check-if-class-exists-somewhere-in-package
…and then pop up a window to tell the user that they should install BigStitcher.
Does that make sense?

Hi all,
I just noticed a new file on the Fiji update site that seems to allow to have a function that checks the activation of particular update sites.

Apparently it exposes a function
Require(NameOfUpdateSite)
but I am not sure how to actually call it…

Can @frauzufall or @ctrueden shed some light on this ? That would be super useful !!

@LThomas It’s a hack. The function works by looking for a file in the lib folder with the same name as the update site. The Java-8 update site ships lib/Java-8 and the Fiji-Legacy update site ships lib/Fiji-Legacy. This was done so that users could be warned to enable Fiji-Legacy if running Java 1.6 or 1.7, or enable Java-8 if running Java 1.8+. It is not generalizable to any update site.

The reason for the hack is that that script needs to run very early, and cannot lean on the SciJava infrastructure. If you are writing a command, service, etc., that wants to know if an update site is enabled, it is straightforward:

#@ UpdateService updateService
println(updateService.getUpdateSite("Java-8").isActive())
println(updateService.getUpdateSite("Fiji-Legacy").isActive())
2 Likes