Open jgvictores opened 6 years ago
TODO list (:panic:):
Note: some of these are not used at all and may be safely removed.
Note 2: repos marked with an x
are low priority.
CMakeLists.txt (no install step yet)
Let's talk about this. Where should these .desktop
files land upon install? Is $HOME/Desktop
a good location, and plain $HOME
as a fallback in case of trouble (e.g. missing Desktop
directory)? The xdg-user-dir
utility could come in handy here, see:
Is $HOME/Desktop a good location, and plain $HOME as a fallback in case of trouble (e.g. missing Desktop directory)?
Yes, that would be perfect.
Proof of concept: https://github.com/roboticslab-uc3m/asibot-configuration-files/commit/d8f9f07e6c9d3a9eceb61a014722354a42aa5112.
Behavior:
configure_and_install_desktop_shortcut
accepts one single parameter: a path to the desktop shortcut template to be configured and installed.<whatever>.desktop.in
naming scheme.<whatever>.desktop
will show up in build/CMakeFiles/
.build/
with execute permissions. This is meant to spare users the need to run make install
and let them use the shortcut straight away. This has some implications *()**.xdg-user-dir
script.$HOME/Desktop
Otherwise, the $HOME
variable is resolved.*()** Actually, the generated shortcut should be properly handled to work locally, i.e. from build/
. I'd leave this as a TODO.
(*) Actually, the generated shortcut should be properly handled to work locally, i.e. from build/. I'd leave this as a TODO.
As found out at https://github.com/asrob-uc3m/robotDevastation/issues/126, we are having trouble in correctly displaying the shortcut icon whenever the full path points at system-located PNG files. Apart from that, @jgvictores posted the following link, which may render useful: https://developer.gnome.org/integration-guide/stable/desktop-files.html.en. I learned from it that the standard way of registering applications in a GNOME-compatible desktop (so that they show up as menu items (Debian) or as search results in the Unity launcher (Ubuntu)) is to place their .desktop
shortcuts either in /usr/share/applications
(all users) or ~/.local/share/applications
(single user). Therefore, we'll may have up to three different copies of the same app shortcut:
~/Desktop
All or some of these might be enabled/disabled via CMake options.
Solely regarding icon files and their standard location(s): https://askubuntu.com/a/435612. Perhaps /usr/local/share/icons
? (per $XDG_DATA_DIRS/icons
, test on different distros)
Moar on standard directory layout: http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY.
Org-wide fix hard-coded paths of scripts/gnome/___.desktop
Learn from https://github.com/roboticslab-uc3m/asibot-configuration-files
Refs:
Special treatment as always for https://github.com/roboticslab-uc3m/project-generator