imagej / imagej-launcher

The ImageJ native launcher
https://imagej.net/learn/launcher
BSD 2-Clause "Simplified" License
21 stars 18 forks source link

Launcher seems to treat files with the same name but in different locations as the same #97

Open hinerm opened 2 months ago

hinerm commented 2 months ago

I have been trying to update a manually-jaunched Fiji.app with the SciJava-Ops update site, which also ships an updated Jaunch. This has brought up some weirdness.

Here's what I did:

  1. Download a jaunch bundle
  2. Manually install it into a fresh local Fiji.app
  3. Open Fiji and turn on the SciJava Ops update site

At this point, while ImageJ is still running, the updater seems to know that my launcher (fiji-windows-x64.exe) is different locally but doesn't offer to update it. The updater does not recognize that the files in the jaunch dir are different.

  1. Try to complete the update. The new fiji-windows-x64.exe doesn't work, regardless if it's the manually installed version or if I told the updater to update it in step 3. If I did do the update in 3, I can get the new jauncher to work by removing/renaming the jaunch directory so that it properly finds config/jaunch.

==Path A==

  1. Let's go forward assuming we did these things and have a working launcher. We also have a fiji-windows-x64.exe.old for the old launcher.
  2. Now I run Fiji again and turn the SciJava Ops update site off.
  3. This uninstalls everything as expected and leaves a pending update.
  4. I have to run ImageJ-win64.exe to complete the update
  5. Some how, when completing the update, my fiji-windows-x64.exe.old is deleted. But the updated version served from SciJava Ops remains!

==Path B==

  1. If we didn't update the .exe and didn't rename/remove the jaunch directory, we have to use ImageJ-win64.exe as our launcher after the update.
  2. Checking the updater after applying the update, we now get extensive "locally modified" warnings, including for the jaunch directory - however, the only option for them is to uninstall (reasonable, since the update site doesn't know about these files) while everything else can be updated: image
  3. After applying this update, the fiji-windows-x64.exe launcher still doesn't work because of the jaunch dir, which has to be renamed.
  4. If we rename/remove the jaunch dir at this point, we are essentially harmonious with Path A above.

There are at least two points of confusion for me that seem like bugs:

  1. The .old exe being deleted upon restart after turning SciJava Ops off
  2. The updater calling the jaunch files "Locally modified" when they should be local-only.

I have to think more about this but wanted to get the steps that I took recorded here.

imagesc-bot commented 2 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/scijava-update-site-breaks-jaunch/101585/6