freeciv21
freeciv21 copied to clipboard
Debian: default-configured Freeciv21 installs an invalid freeciv21-client.desktop
Describe the bug
When creating a deb
package with cmake --build build --target package
on Ubuntu, the paths hard-coded into the desktop
file are incorrect:
Exec=/usr/local/bin/freeciv21-client %u
Icon=/usr/local/share/freeciv21/misc/civicon.png
The files are installed in /usr
, not /usr/local
.
To Reproduce Steps to reproduce the behavior:
- Use Ubuntu
- Configure a Freeciv21 build without changing the default install location
- Build
- Create the package
- Install the package
- Click on the "Freeciv21" menu entry
- Get a "command not found" message
Expected behavior
The paths coded into the .desktop
match the actual location of the files.
Screenshots
Plasma not finding the Freeciv21 icon
Platform and version (please complete the following information):
- OS: Ubuntu 20.04 derivative
- Freeciv21 version:
master
as of today (with #1335)
This is an old "problem". You have to define the proper prefix. We do it here https://github.com/longturn/freeciv21/blob/07f953ddfd2bf6e9b1769050e2500050173f1314/.github/workflows/build.yaml#L58 and documented it here: https://longturn.readthedocs.io/en/latest/General/install.html#debian
Looks like the standard practice is to use relative paths for the command and icon
Well, it works as documented and absolute paths allow installing several instances of Freeciv21. Closing.
I do think this needs to be kept open. We should look at newer cpack features, bugfixes or set a value we want in our own code if nothing is passed at configure time.
Not everyone will RTFM.