increase integration into Freedesktop.org compliant systems
The goal of this is to make JFileSync3 easier to package or otherwise distribute and install on Freedesktop.org compliant systems. Relocatability, following the data directory layout, and a valid component description in the AppStream format are common requirements amongst both package-based, and container-based distribution channels.
~~JFileSync3 is not relocatable, not because of requirements of the JAR itself, or its wrapping shell script, but because the desktop file hard-codes a path to the shell script, and to the icon. The Freedesktop.org data directory layout allows for relative paths in the desktop entry file on Freedesktop.org conforming systems, and thus makes it relocatable.~~
~~This change to the desktop entry makes it a requirement to have the used bin directory in the $PATH and the share directory in $XDG_DATA_DIRS. Making it relocatable, and not having this requirement, are mutually exclusive, without a hack in the desktop entry such as using /bin/sh -c with which JFileSync3 command substitution and defaulting to the current hard-coded location. If desired, in order to retain compatibility with current zip archives, it could either contain two desktop entries, or there could be a second distZip flavour.~~
The desktop entry specification recommends “a reversed DNS domain name controlled by the author of the application”, with the AppStream specification making this a requirement. Normally, this would match the internally used ID. However, JFileSync3 inherited JFileSync's jfs not following Java's naming convention. As such, here io.github.mgoellnitz.JFileSync3 is used as it is guaranteed to be a valid ID through existence of this repo.
These changes only apply to the file structure inside the xdg subdirectory, and thus hopefully only apply to those Freedesktop.org conforming systems. However, this change was not tested on other systems.
This leaves open questions, task, and decisions to be made:
- [ ] Verify Windows and non-XDG Unices are not affected by this. (Highly probable, but untested due to lack of access to them.)
- [ ] Decide on an application ID.
- [x] Retain compatibility with missing in
$XDG_DATA_DIRSand$PATHor document new requirement? - [ ] Complete AppStream description.
- [ ] It allows for a specification of an optional email address as an
<update_contact/>for distros to use. - [ ] Is GitHub the canonical location?
- [ ]
<release/>s can have<description/>s. Should they here? If so, how best to integrate it into JFileSync3's release workflow?
- [ ] It allows for a specification of an optional email address as an
Relevant Freedesktop.org specifications:
- directory layout:
- desktop entry:
- AppStream component metadata: