crabnebula-dev / cargo-packager

Rust executable packager, bundler and updater.
https://docs.crabnebula.dev/packager/
Apache License 2.0
241 stars 16 forks source link

feat(debian): auto-add an Exec arg (field code) in the `.desktop` file #256

Closed kevinaboos closed 3 months ago

kevinaboos commented 3 months ago

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 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.

kevinaboos commented 3 months ago

oh, huh, I just noticed that when making changes on my mac, the schema.json files were auto-updated, which didn't happen on my linux box (where I originally made this PR).

Should those schema files be committed, or are they auto-generated by some CI procedure?

Edit: saw your other answer; this should be good to go.

amr-crabnebula commented 3 months ago

Thanks for your contributions