imagej / imagej-launcher

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

--update is broken on Windows #10

Open hinerm opened 10 years ago

hinerm commented 10 years ago

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 commented 10 years ago

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

ctrueden commented 10 years ago

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();
}
hinerm commented 10 years ago

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

dscho commented 10 years ago

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

dscho commented 10 years ago

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...