Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logic for migrating to Jaunch launcher #94

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

ctrueden
Copy link
Member

  • Update license blurbs for 2024
  • ImageJUpdater: let any/all services be null
  • ImageJUpdater: Do not update the updater separately
  • WIP: Add logic for migrating to Jaunch launcher

ctrueden and others added 3 commits October 18, 2024 15:34
The code was already written to support the services not being set,
with various fallbacks in place. So let's mark the params accordingly.
The removed code does the following:
  * check if the updater can be updated
  * if yes, download updater and it's dependencies and install it,
    do not ask for approval
  * try to restart the updater in place
  * if that does not work, ask for restart of Fiji

This is why it should be removed:
  * if other components depend on the updater, this can break the installation
    because the other component will not get updated at the same time as the updater
  * the updater will be updated without the users approval

CTR: I asked Johannes why this logic was introduced. Here is what he said:

> The reason was dependency hell. If you don't update the updater first,
> then create a new class loader, then re-load the updater and run it,
> it really can break everything, especially when imagej-ui-swing is
> updated (and not necessarily the updater).

CTR: So really, there are things that can go wrong either way. In the
interest of simplicity, we remove the logic. If all hell breaks loose,
we can put it back, and deal with the fallout as best we can. But I
expect that removing this logic will fix more problems than it causes.

Closes #83.

Signed-off-by: Curtis Rueden <[email protected]>
@ctrueden ctrueden self-assigned this Nov 19, 2024
@ctrueden ctrueden force-pushed the new-launcher branch 5 times, most recently from 7e3a1fe to 6cfcad4 Compare November 21, 2024 17:55
@hinerm
Copy link
Member

hinerm commented Nov 22, 2024

Note that some of the art on the update buttons does not render on windows:

image

@hinerm
Copy link
Member

hinerm commented Nov 22, 2024

Other problems: I mentioned here that when I build Jaunch locally, copy it over to a Fiji.app and then run, I get this windows notification about scanning.

However, this also happens if I copy jaunch executables to a Fiji.app and then try to upgrade to Fiji future. I assume that even though I launched with ImageJ-win64.exe that it's trying to restart with the fiji-windows-x64.exe and thus triggering this scan.

image

Incidentally I also opened fiji/fiji#375 but that is probably related to how the restart is being handled, also.

Maybe we shouldn't do the auto-restart for the user? It may be too magical and on non-Mac I can see people being confused about having to use a different executable. We probably want to tell them to remove their ImageJ.exe and update shortcuts, eh..?

@ctrueden
Copy link
Member Author

ctrueden commented Nov 22, 2024

Here are some alternative art sequences that replace the broken characters in the screenshot above with ASCII ones:

⊹╰(~ʟ~)╯⊹
୧/0益0\\୨

@ctrueden
Copy link
Member Author

Maybe we shouldn't do the auto-restart for the user? It may be too magical and on non-Mac I can see people being confused about having to use a different executable.

This is precisely why I did code up the auto-restart: so they don't need to choose correctly between ImageJ-win64.exe and fiji-windows-x64.exe after Fiji quits. Many people are going to naively click their existing Fiji shortcut to relaunch, which will use the old/wrong executable; until the program is launched with the new executable instead, we won't be able to rename ImageJ-win64.exe to ImageJ-win64.exe.backup, due to Windows file locking.

@hinerm
Copy link
Member

hinerm commented Nov 25, 2024

we won't be able to rename ImageJ-win64.exe to ImageJ-win64.exe.backup, due to Windows file locking.

I see. I guess an upgrade has never fully succeeded on my system so I was not aware that the ImageJ-win64.exe will be renamed. I added a note about the executable name. Feel free to edit/remove as desired.

Here are some alternative art sequences that replace the broken characters in the screenshot above with ASCII ones:

Works for me

@ctrueden
Copy link
Member Author

I guess an upgrade has never fully succeeded on my system so I was not aware that the ImageJ-win64.exe will be renamed.

Nah, the rename of the old executable just isn't implemented yet by the migrator.

I added a note about the executable name.

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants