Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop file and icon installed to wrong location on Linux #683

Closed
Scimmia22 opened this issue Nov 20, 2022 · 7 comments
Closed

Desktop file and icon installed to wrong location on Linux #683

Scimmia22 opened this issue Nov 20, 2022 · 7 comments

Comments

@Scimmia22
Copy link
Contributor

The desktop file is being installed to ${installSubDir_data}/applications and the icon is being installed to ${installSubDir_data}/icons/hicolor/scalable/apps/. Since installSubDir_data is defined as share/${CMAKE_PROJECT_NAME}, they cannot be found by any desktop menu systems because of the 'brewtarget' subdir.

The menu specification requires desktop files be installed to $XDG_DATA_DIRS/applications/ with $XDG_DATA_DIRS defaulting to /usr/local/share/:/usr/share/. Similarly, icons should be in $XDG_DATA_DIRS/icons.

@matty0ung
Copy link
Contributor

Hi, Thanks for the feedback. Could you give a bit of additional info? Are you installing from the deb, rpm or a source build? Which flavour of Linux are you on?

@Scimmia22
Copy link
Contributor Author

This is when packaging for Arch. Arch's build system simply does exactly what you tell it to, which is why I pointed out exactly why it's doing that. The distro is irrelevant here, that's where cmake is putting it.

@matty0ung
Copy link
Contributor

Thanks. Sorry to ask you questions that you feel are obvious, but it does often help to have some context. If you know exactly what is wrong with the CMakeLists.txt file then we would welcome your PR.

Otherwise, I will take a look after I have done another few rounds with CMake to persuade it to package the Mac build properly. 😄

@matty0ung
Copy link
Contributor

I think I have a fix for the desktop file. Will look at the icon...

@Scimmia22
Copy link
Contributor Author

I do know what is wrong with CMakeLists.txt, but I don't know nearly enough cmake to know what the best way to fix it is. Do you just use things like ${installSubDir_data}/../applications? Does that even work in cmake? Do you define a new variable? Do you check $XDG_DATA_DIRS? I really don't know, which is why I thought it best to leave the fix to someone that has spent a lot more time with cmake than me.

@matty0ung
Copy link
Contributor

OK, no worries. CMake can sometimes be rather frustrating to work with, and some aspects of it operate differently at different stages of the build (which is partly why I asked about packaging).

I think this fix is going to be easier than the Mac build one!

@matty0ung
Copy link
Contributor

Closing now that release 3.0.4 is out. Please re-open if you continue to see the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants