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

The install target ignores PREFIX #123

Closed
yurivict opened this issue May 1, 2022 · 9 comments · Fixed by #124
Closed

The install target ignores PREFIX #123

yurivict opened this issue May 1, 2022 · 9 comments · Fixed by #124

Comments

@yurivict
Copy link

yurivict commented May 1, 2022

My PREFIX is /usr/local, but it still installs the files into /usr:

/usr/bin/NotepadNext
/usr/share/applications/NotepadNext.desktop
/usr/share/icons/hicolor/scalable/mimetypes/NotepadNext.svg
@dail8859
Copy link
Owner

dail8859 commented May 1, 2022

I'm not familiar myself with utilizing PREFIX.

According to https://stackoverflow.com/a/7106823 and the comments, it looks like INSTALL_ROOT might be the built-in way of defining where it gets installed rather than PREFIX. I know the automated workflow uses make install INSTALL_ROOT=AppDir so I'm not sure the difference between PREFIX and INSTALL_ROOT.

@yurivict
Copy link
Author

yurivict commented May 1, 2022

No, INSTALL_ROOT in qmake is stage directory, not prefix.

In src/NotepadNext/NotepadNext.pro you have /usr/ hardcoded.
It should be like the above link suggests:

isEmpty(PREFIX) {
 PREFIX = /usr/local
}
TARGET = myapp
TARGET.path = $$PREFIX/

@dail8859
Copy link
Owner

dail8859 commented May 1, 2022

@yurivict

I'm not overly familiar with compiling on Linux.

How does one normally specify PREFIX when building other applications? Is this passed into make?

@dail8859
Copy link
Owner

dail8859 commented May 1, 2022

@zocker-160

Would using PREFIX fix the need for modifying the .pro files for the flathub build here?

https://github.com/flathub/com.github.dail8859.NotepadNext/blob/107b5d547a433a75bc24846001d3fa0b7f8883c9/com.github.dail8859.NotepadNext.yml#L22-L23

@yurivict
Copy link
Author

yurivict commented May 1, 2022

How does one normally specify PREFIX when building other applications? Is this passed into make?

PREFIX=/usr/local is added to qmake's arguments.

@dail8859
Copy link
Owner

dail8859 commented May 2, 2022

@yurivict

I don't have a Linux development machine available right now so taking what you've described I attempted to fix this in #124. See if that PR helps.

@yurivict
Copy link
Author

yurivict commented May 2, 2022

With this patch files are installed into correct locations.

@zocker-160
Copy link
Contributor

zocker-160 commented May 2, 2022

Would using PREFIX fix the need for modifying the .pro files for the flathub build here?

@dail8859 yes, if using PREFIX works, I can remove that.

Flatpak just uses / as PREFIX (or /app if we use / as root instead of /app, since the installation path is /app/bin and /app/share

@dail8859
Copy link
Owner

dail8859 commented May 2, 2022

@zocker-160 Thanks for confirming. #124 has been merged into master now.

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

Successfully merging a pull request may close this issue.

3 participants