unison icon indicating copy to clipboard operation
unison copied to clipboard

Add a .desktop file

Open FSMaxB opened this issue 6 years ago • 7 comments

It would be great to add a .desktop file by default when installing the GUI version. Look here for an example.

This would also require installing an icon to /usr/share/pixmaps. Preferably U.svg.

FSMaxB avatar Feb 21 '18 15:02 FSMaxB

Happy to consider a PR.

bcpierce00 avatar Feb 21 '18 16:02 bcpierce00

I don't understand how make install works for unison to be honest. Usually there is DESTDIR that can be set for installation directory. But unison doesn't seem to do that. It uses "$(HOME)" instead.

Maybe that should be fixed first. (DESTDIR could be set to $(HOME) by default to preserve the existing behavior.

FSMaxB avatar Feb 21 '18 18:02 FSMaxB

I don't think that many people use "make install," other than me. :-|

Your proposed refinement sounds good.

bcpierce00 avatar Feb 21 '18 19:02 bcpierce00

Actually I gave up for now. This is more complicated than I expected.

FSMaxB avatar Feb 21 '18 20:02 FSMaxB

It would be easier if:

  • unison would build executables with different names for different UISTYLE. e.g. unison-text unison-gtk2
  • there was a way to know what has been built when running make install, which could just be the filenames from the build step
  • unison wouldn't try to build the code again when running make install

FSMaxB avatar Feb 21 '18 20:02 FSMaxB

These also seem like reasonable refinements. One could retain backward compatibility by copying the latest-built binary (unison-text or whatever) to 'unison'.

The reason we never did something like this is that there are actually just three UI configurations (text, GTK, and the OSX native one); of these, the build and install procedure for the third is separate from the other two, while the GTK configuration supersedes the text one (i.e., it can be used in both ways).

bcpierce00 avatar Feb 22 '18 14:02 bcpierce00

The one from Debian is better IMHO, it properly utilizes GenericName, although needs version string removed or scripted:

[Desktop Entry]
Name=Unison
Comment=GTK interface for the unison file synchronization tool 2.48.4
GenericName=File synchronization tool
Exec=unison-2.48.4-gtk
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=unison-gtk.svg
Categories=Utility;FileTools;GTK;
StartupWMClass=Unison-gtk
StartupNotify=true

Vladimir-csp avatar Jan 25 '19 14:01 Vladimir-csp