imagej / imagej-updater

The automatic updater for ImageJ
Other
12 stars 15 forks source link

Expand support for "executable" accessory files #109

Open hinerm opened 6 months ago

hinerm commented 6 months ago

Currently, executable files are treated specially and directly downloaded: they bypass the update subdirectory when installing, and an .old copy is created to signify deletion.

With Jaunch we now have necessary toml accessory files that are required for the launcher to work. This means they should be treated the same way by the launcher: bypassing the update directory and with a .old copy.

Basically, if we're checking for executable we should probably check if it's a toml file, as well.

This is one key location, but there are almost certainly others that need updating as well.

hinerm commented 6 months ago

Note that a temporary hack can be done on the update site side, by manually adding executable = "true" to the toml entries in the db.xml.gz

hinerm commented 6 months ago

note that the Props.class (and .java?) file(s) are also needed

ctrueden commented 6 months ago

Thanks @hinerm. About Props.java: it is not needed.

hinerm commented 6 months ago

Ah there's just a warning about Props being missing. I didn't realize that I was not able to upload it even with my changes

ctrueden commented 6 months ago

On POSIX-friendly systems: is the executable bit of the file used to discern whether the file should be marked "executable" in the DB? And on Windows: does it use the .exe extension to decide?

And conversely: when installing an "executable" file from an update site, does the Updater set the executable bit on those files on POSIX-friendly systems? If so, that means the TOML files will be marked +x, which is suboptimal. Tolerable as a hack, yeah, but it would be nice not to conflate the two related-but-distinct ideas of "executable" and "part of the launcher machinery".