Login  Register

Re: Install Issues - ImageJ and FIJI

Posted by dscho on Feb 02, 2013; 3:38pm
URL: http://imagej.273.s1.nabble.com/Install-Issues-ImageJ-and-FIJI-tp5001497p5001649.html

Hi Robert,

On Fri, 1 Feb 2013, Robert Baer wrote:

> I'll work on bug report for the Win8/Java7 issue

Thank you very much!

> The icon bug is probably replicates bug report 526 by another user, so I
> won't file an additional report, but I will answer your direct question
> here.

A comment on the bug would be more visible (read: open) to others, but
okay.

> Just to quickly follow up on the icon thing (which is a tiny issue), I
> mean the icon associated with ImageJ-win64.exe .  The program has a
> generic desktop look in the folder.

Yes, ImageJ-win64.exe always was without icon. Only the Fiji launcher has
an icon. The reason is that ImageJ-win64.exe is supposed to be more
general purpose: it is intended to be *the* ImageJ launcher. It can launch
ImageJ 1.x, it can launch Fiji and it can launch ImageJ2. It can do so on
Linux (i386/x86_64), Windows (i386/x86_64) and MacOSX (PPC32/i386/x86_64).
In my tests, it was even easy to build and launch it on FreeBSD. It is
written in portable C and offers the exact same user experience on all
those platforms.

> It's been since the dark ages since I've done serious programming, but I
> think that icons could be associated with .exe files from resource files
> at either compile or link time (I forget).

It is both compile and link time; you have to compile an .rc file which
looks pretty much like this:

        101 ICON images/fiji.ico

This files needs to be compiled with the 'windres' program, not with the C
compiler. Then the resulting .o file needs to be linked into the
executable.

There are some programs to change the icon in existing .exe files, some of
them even claiming to run on the command-line (which would be needed for
us since we do not want to build everything by hand; our launchers are
built for all the supported platforms automatically as soon as the source
code has changed in the public source code repository; that way, I cannot
forget to compile it for one platform). The only one which worked for me
is RCEDIT.exe from the WinRun4J project:
https://github.com/poidasmith/winrun4j/

It is this program we use in our Jenkins job called
'Windows-Fiji-launcher-with-icons' whose sole purpose is to take the
ImageJ launchers for 32-bit and 64-bit Windows and equip them with icons.
The resulting Fiji launchers are really just the ImageJ launchers with a
Fiji icon, and they can be downloaded from here:

        http://jenkins.imagej.net/job/Windows-Fiji-launcher-with-icons/label=Windows/lastSuccessfulBuild/artifact/

Of course, you could use RCEDIT.exe or any other resource hacker to insert
your own icon into the launcher, but there is a subtle issue with that:
the ImageJ-win64.exe file is managed by the updater, and if you modify
that, you will not get updates (even critical ones) automatically.

It is better to download the respective Fiji launcher, however, you could
just do the same using the advanced mode of the updater, since the Fiji
launcher *is* still in the updater (but updated less regularly than the
ImageJ updater).

Now, why does the Fiji distribution bundle the ImageJ launcher, rather
than the Fiji one (i.e. the ImageJ launcher with icon attached)?

The problem is confusion. You would not believe how often I hear: "but I
want to use ImageJ, not Fiji!". Seriously, the intention of the bunch of
people starting the Fiji project was never to make a separate software,
even if the name may suggest so. The strong desire was to contribute
something useful back to the community that is so helpful, and personally,
I never even wanted to use a different name than ImageJ. So it does affect
me a lot when users confuse Fiji for something separate from ImageJ.

To help the situation, we figured that making clear that Fiji is just a
distribution of ImageJ by using the ImageJ launcher directly would make
sense.

If you have an idea how to address the problem more properly, please let
me know!

>  When I first used Fiji, it had a FIJI icon that looked like the images
>  in my C:\Fiji.app\images directory.  As Fiji now distributes, I get a
>  generic icon that results from the OS not finding one within the .exe
>  file.  There are two image in that folder, C:\Fiji.app\images that seem
>  similar to the Fiji icon I used to get.  If I load the icon.png into
>  GIMP and save it as Fiji.ico, I get an icon that serves my icon
>  purposes nicely for desktop shorcut purposes.  If its too hard to bind
>  the resource to the .exe, it would be nice to not at least not have to
>  regenerate a .ico file for each computer I install Fiji on.

The .ico file is available pre-generated here:

        https://github.com/fiji/fiji/raw/master/images/fiji.ico

It was made using the original script to make the Fiji launcher which used
Fiji's File>Save As>Ico... to write an .ico file.

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html