MediaElch icon indicating copy to clipboard operation
MediaElch copied to clipboard

use `$PREFIX` as installation path

Open Stunkymonkey opened this issue 5 years ago • 6 comments

Is your feature request related to a problem? Please describe. When using NixOS i would have to patch the installation targets

Describe the solution you'd like it would be better to use a prefix and if it is not set, then have a fallback. Proposed solution: https://stackoverflow.com/a/7106823

Describe alternatives you've considered I could stick to patching it manually, but i think this is not only a NixOS problem, maybe some people want to install it to /opt/.

Stunkymonkey avatar Dec 20 '20 16:12 Stunkymonkey

i could provide an PR myself, but first i want to check if this would be accepted.

Stunkymonkey avatar Dec 20 '20 16:12 Stunkymonkey

also the default should be /usr/local/bin which is the location for locally compiled packages (executing qmake, ...) /usr/bin should only be used by distro-package maintainers.

Stunkymonkey avatar Dec 20 '20 17:12 Stunkymonkey

Hi,

a PR would be very welcome. I don't update our qmake config too often as I want to switch to CMake sometime in the future.

Just FYI: We already support installing MediaElch into another dir with QMake. See e.g.

https://github.com/Komet/MediaElch/blob/2ca63413bf934daa7c36b21f1bd520a6e15166e9/.ci/package.sh#L98

I use that for packaging MediaElch in an AppImage.

Also, CMake has this built in:

https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html

bugwelle avatar Dec 20 '20 17:12 bugwelle

See also the second answer in your StackOverflow post: https://stackoverflow.com/a/55781661/1603627 :-)

bugwelle avatar Dec 20 '20 17:12 bugwelle

INSTALL_ROOT is nice, but it is different to PREFIX. INSTALL_ROOT will create a folder usr/ in its root, which PREFIX will not.

i am a bit scared breaking things, when changing the .pro-file. I never worked with qmake before.

I recently added the install instruction to nixpkgs. my solution is not the best, but i will replace /usr/ with the corresponding new path.

I would like to keep this issue open until there is a better fix, then replacing hard coded paths.

Stunkymonkey avatar Jan 11 '21 15:01 Stunkymonkey

Ah, ok. PRs are welcome. We can keep this issue open. :-)

bugwelle avatar Jan 11 '21 15:01 bugwelle

I recently switch to cmake because of qt6. And with cmake this this is not relevant any more... So if you want, close it.

Stunkymonkey avatar Jan 08 '23 11:01 Stunkymonkey

:+1:

Thanks.

bugwelle avatar Jan 08 '23 13:01 bugwelle