Make it possible to build QuPath with Fiji dependencies#1728
Merged
petebankhead merged 13 commits intoqupath:mainfrom Dec 13, 2024
Merged
Make it possible to build QuPath with Fiji dependencies#1728petebankhead merged 13 commits intoqupath:mainfrom
petebankhead merged 13 commits intoqupath:mainfrom
Conversation
Provisional (limited) support for including Fiji dependencies when calling `gradlew run`
This made it impossible to build with a different Java version. Now it should build using Java 17 or later (Gradle itself requests 16 or later, so we strengthen this to 17 so we can use the newer syntax)
Setting scripting-groovy to version 1.0.0 turned out to be the key step. Switching to 3 wasn't an option, because it needed to be 3.0.4 and it seemed unhappy with Java 21.
Don't require `-Pfiji=true` for Fiji-friendly builds
Hides the window, but avoids disposing the instance; this makes it possible to reopen Fiji without losing all the plugins.
This means you can open ImageJ without having to send an image to it
It was causing trouble with accelerators, and didn't show in the right place anyway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR drawing heavily on @ctrueden's work - especially https://forum.image.sc/t/embedding-fiji-inside-qupath/105065
This adds support for launching QuPath from gradle with
to bring in Fiji & its dependencies in a way that makes it possible to work with a 'full' version of Fiji from within QuPath, rather than ImageJ. Using
defaults to 'regular' QuPath with ImageJ.
It's also possible to build the (large) self-contained packages with
or, faster with
at the expense of omitting the dependency license report.
We don't have plans to distribute a QuPath+Fiji build at the moment - rather, this is intended for power-users who create the builds themselves for their own use. Although with Gradle that should be pretty easy, as long as you have Java 17+ installed (Java 21 preferred).
Big caveat
It's currently only possible to launch Fiji once from within QuPath: if you close it, then the next time you try to open it you'll get a more standard ImageJ without many extra plugins. I haven't figured out how to get Fiji back, or to prevent it being disposed in the first place.Reopening Fiji should now workSmall caveats
Dependency resolution is left up to Gradle; it's not guaranteed that QuPath will behave identically when launching in this way - and there might be commands in either Fiji or QuPath that don't work as expected.
Although that also means that QuPath's script editor will auto-discover and add support for a few more scripting languages.
And Fiji's will be equipped with Groovy 4 instead of Groovy 3.