freeciv21 icon indicating copy to clipboard operation
freeciv21 copied to clipboard

Debian: default-configured Freeciv21 installs an invalid freeciv21-client.desktop

Open lmoureaux opened this issue 2 years ago • 4 comments

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:

  1. Use Ubuntu
  2. Configure a Freeciv21 build without changing the default install location
  3. Build
  4. Create the package
  5. Install the package
  6. Click on the "Freeciv21" menu entry
  7. 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 image

Platform and version (please complete the following information):

  • OS: Ubuntu 20.04 derivative
  • Freeciv21 version: master as of today (with #1335)

lmoureaux avatar Aug 28 '22 20:08 lmoureaux

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

jwrober avatar Aug 28 '22 20:08 jwrober

Looks like the standard practice is to use relative paths for the command and icon

lmoureaux avatar Aug 28 '22 20:08 lmoureaux

Well, it works as documented and absolute paths allow installing several instances of Freeciv21. Closing.

lmoureaux avatar Sep 04 '22 01:09 lmoureaux

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.

jwrober avatar Sep 04 '22 02:09 jwrober