-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(debian): auto-add an Exec arg (field code) in the .desktop
file
#256
feat(debian): auto-add an Exec arg (field code) in the .desktop
file
#256
Conversation
This change adds an `{exec_arg}` field to the default `main.desktop` template. This field is populated by handlebars with a sane default value, which is based on whether `deep_link_protocols` or `file_associations` in the `Config` struct have been specified. This allows an installed Debian package to be invoked by other applications with URLs or files as arguments, as expected. The `main.desktop` template previously did not automatically include an Exec field code even if `deep_link_protocols` or `file_associations` were set, which would confuse new users who incorrectly expected that the Debian package would automatically handle links and file associations upon installation. This change now ensures their expectations are met.
crates/packager/src/config/mod.rs
Outdated
/// * "%U", if at least one [Config::deep_link_protocols] was specified. | ||
/// * This means that your application can accommodate being invoked with multiple URLs. | ||
/// * "%F", if at least one [Config::file_associations] was specified but no deep link protocols were given, or | ||
/// * This means that your application can accommodate being invoked with multiple file paths. |
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.
I would switch the order of these, i.e explain %F
first and then %U
and should also mention that %U
will make file paths into file urls
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.
done
Co-authored-by: Amr Bashir <[email protected]>
oh, huh, I just noticed that when making changes on my mac, the
Edit: saw your other answer; this should be good to go. |
Thanks for your contributions |
This change adds an
{exec_arg}
field to the defaultmain.desktop
template. This field is populated by handlebars with a sane default value, which is based on whetherdeep_link_protocols
orfile_associations
in theConfig
struct have been specified.This allows an installed Debian package to be invoked by other applications with URLs or files as arguments, as expected.
The
main.desktop
template previously did not automatically include an Exec field code even ifdeep_link_protocols
orfile_associations
were set, which could potentially confuse new users who incorrectly expected that the Debian package would automatically handle links and file associations upon installation. This change now ensures their expectations are met.