-
Notifications
You must be signed in to change notification settings - Fork 218
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
Install jamulus.desktop #331
Conversation
Because this assumes the binary is called jamulus, and qmake doesn't have a mechanism for string expansion, only do so if noupcasename is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this.
@seb314 could you please test this?
APPSDIR = $$absolute_path($$APPSDIR, $$PREFIX) | ||
desktop.path = $$APPSDIR | ||
desktop.files = distributions/jamulus.desktop | ||
# the .desktop file assumes the binary is called jamulus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be possible to rename the desktop file end with .in
, put $$TARGET
in the Exec
file and then use QMAKE_SUBSTITUTES += distributions/jamulus.desktop.in
.
See https://martin.rpdev.net/2017/05/10/creating-config-header-files-using-qmake.html or https://github.com/detrout/debian-signon-ui/blob/c03c68965f92285d3d5341b45414473081ed5c1b/src/signon-ui.pro#L105-L109.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh! That is... extremely well hidden in the qmake documentation.
# the .desktop file assumes the binary is called jamulus | ||
contains(CONFIG, "noupcasename") { | ||
INSTALLS += desktop | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably also need to install the icon, see #247 (comment).
seems to work! |
As suggested in #223.
Because jamulus.desktop assumes the binary is called jamulus, and qmake doesn't have a mechanism for string expansion, only install the file so if noupcasename is set.