Comments (14)
Hi @Edwinterb this seems to be a duplicate of #1250 with a potential fix.
I'm not sure if/how the proposed fix could be incorporated into the build process using jpackage
though. Is that something you've explored at all?
There's a description of the build process at https://qupath.readthedocs.io/en/0.4/docs/reference/building.html - it automatically generates the installers, and jpackage doesn't like versions that start with 0.
from qupath.
Hi @petebankhead, apologies for creating this new enhancement without properly searching exisintg ones!
I have read up the links and the previous request and I understand the predicament you have now. Unfortunately I do not have any experience with jpackage to be able to offer any insights, other than of course changing the verion to 1.4.4, but I appreciate this may not be desired.
Perhaps the package could be created using Xcode in future? Again not something I have much experience with as I am not a developer, but it may also aid you in future if there is a desire to sign and notorize future releases. Gatekeeper on macOS Ventura is a bit more agreesive with unsigned apps and may notify users on first launch that the app is damaged. This can be bypassed by right clicking and selecting Open. This is when we deploy the Qupath pkg to managed devices using MDM tools:
from qupath.
Thanks @Edwinterb yes, we used to provide a dmg but recent macOS releases thwarted that - they were particularly unhappy if this was downloaded, and seemed to work extra hard to make it non-runnable. The pkg has proven the 'least painful' distribution method, and the right-click trick is documented here.
I do most of my development on a Mac, so suffer the pain directly.
jpackage
integrates well with our build tools, and seems to be the 'official' way to make installers for Java applications. I'm not good enough with XCode, build tools or GitHub Actions to figure out a way to piece together an alternative that gives an opportunity to squeeze in a proper version number.
@alanocallaghan would have a better chance of figuring it out than I do, but I don't see how I can possibly mention it to him when he's already embroiled in other macOS-related woes - without actually being a Mac user.
from qupath.
For the macos-latest builds on github actions, it might suffice to add a step (assuming we set the version in an env variable somehow):
- name: Set version number
if: matrix.platform == 'macos-latest'
shell: bash
run: defaults write /Applications/QuPath.app/Contents/Info.plist CFBundleShortVersionString {{env.version}}
and (remembering to) manually run the same command locally for the mac m1 builds, until GitHub finally releases m1 runners into the wild.
from qupath.
Is this able to add it to the .pkg
, or only the ..app
?
If it's only the .app
, we could build that separately with jpackage
but then need to somehow get it properly into a .pkg
(which might not be that hard, but I don't know...).
Actually, now that I think of it, it might be doable in Gradle as well - which has the benefit of knowing the version.
Will try to look into it, but not sure if I'll have time before the next release.
from qupath.
Don't really know the distinction between .pkg
and .app
, it'd be the output of ./gradlew jpackage -P git-commit=true -P package=installer mergedJavadoc
. But if possible within gradle that'd be much easier
from qupath.
The .pkg
wraps up the .app
in an installer. I think jpackage
will create the .app
first, then the .pkg
if required - but I don't think it gives space in between to do anything useful.
I've never used defaults
(didn't know it existed...) so don't know if it requires the .app
.
We use package=installer
to get the .pkg
because otherwise I think the .app
has all sorts of scary quarantine flags set that mean it can't be launched without recursively removing them all (at least that's my vague memory of what happened, I may well be misremembering). The flags only occurred when downloading - so on my local build I thought all was fine...
from qupath.
I've attempted a fix at #1344 - it seems to be working on my computer, so if no new problems arise the correct version should be available in the next release.
from qupath.
Should definitely mention this in the release notes, because v0.5+ will be newer than v1 (until the "real" v1 happens)
from qupath.
Fair enough - I've also gone rogue in including the version number in the name, e.g. QuPath-0.5.5.app
.
It's not the Mac way to do things, but I figure there is a strong possibility people will want to have multiple versions installed (or at least I do... and suspect everyone should).
from qupath.
Sensible
That would be a downside of the deb/rpm approach on Linux, unless we do some similar shenanigans with application names
from qupath.
In the end I had to revert the changes that 'fixed' this because they ended up causing much bigger problems, which only emerged when preparing the next release candidate.
More details at #1379
from qupath.
hey @petebankhead were you using the defaults command to update the version number? Not sure if you noticed my edit to the original post here:
Edit: you will need to change the permissions of the file after running above command as it will be 600 and should be 664
sudo chmod 664 /Applications/QuPath.app/Contents/Info.plist
Perhaps the plist was seen as damaged after modifying it and the file then had the incorrect permissions?
from qupath.
I tried defaults
first, but quickly ran into the permissions problem - so switched to PlistBuddy
as suggested at #1250
That seemed to work, but it turned out to still fail in confusing and subtle ways after downloading & installing. After very many hours spent trying to sort it out, I had to admit defeat because it was blocking the release - details are at #1379
from qupath.
Related Issues (20)
- TMA and annotation grid views throw exception if the width is too small
- Undo/Redo unexpected behavior after importing from file HOT 3
- Update log viewer version
- QuPath Viewer Hangs on Ubuntu 22.04 Due to OpenSlide Library Loading Issue When Opening .tiff Images" HOT 2
- WrappedBufferedImageServer converts images to 8-bit unnecessarily
- Internal javadoc search doesn't work with JavaFX 22
- Channel drop-down box right click HOT 1
- Brightness/Contrast 'Apply to similar images' fails to update settings immediately across viewers
- Channel name changed when changing color HOT 1
- Rename Object Classification submenu to Detection Classification HOT 3
- TileExporter exports ImageJ TIFFs with channels converted to z-stacks
- TileExporter with ImageJ TIFF can lose pixel size and channel color information
- ImageJ macro runner can't transfer include cell nuclei & boundaries
- How to package your open source QuPath code into an exe file? HOT 1
- Black row or column appears on some downsampled images HOT 1
- Unexpected behavior with DelaunayTools HOT 1
- Full image annotations can be shifted accidentally outside the image bounds
- Is there anyway to install Qupath by scoop? HOT 1
- Improvements to project sorting HOT 8
- Issue Changing Custom Color for Channel HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qupath.