imagej-launcher icon indicating copy to clipboard operation
imagej-launcher copied to clipboard

--update is broken on Windows

Open hinerm opened this issue 10 years ago • 5 comments

If I run ImageJ-win64.exe --update update to update Fiji from the command line, it just does nothing with no output right now.

If I run ImageJ-win64.exe --debug --update update, it works! and now finds the things to update, and asks what I'd like to do with them..

hinerm avatar Jun 10 '14 19:06 hinerm

Note that "works!" is subjective, due to #11

hinerm avatar Jun 10 '14 19:06 hinerm

It is worth noting that this seems to be more than just a logging issue. Even if you run:

ImageJ-win64.exe -Dscijava.log.level=info -- --update update

It still does nothing. But with --debug it works. My theory is that somewhere, there is logic like:

if (log.isDebug()) {
    doSomethingThatShouldNotHaveSideEffectsButActuallyDoes();
}

ctrueden avatar Jun 10 '14 19:06 ctrueden

Also the no output may be partially related to #9 ... except that in the case of --update update I think it needs to be in debug mode to work at all, so even with -Dscijava.log.level=info nothing is printed out.. you have to set --debug

hinerm avatar Jun 10 '14 19:06 hinerm

Probably we need to force --system on Windows when the updater is called :-(

dscho avatar Jun 10 '14 22:06 dscho

My findings: the --update update actually worked, it just happened not needing to do anything. The output was swallowed by the aforementioned problem: we cannot easily attach to a console from a running non-console executable. There is code to do that; I suspect 32-bit vs 64-bit to be the reason why it did not work.

So the safest way forward is probably to enforce --system with --console on Windows...

dscho avatar Jun 11 '14 19:06 dscho