Configure appstream data during build - #1011
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Linux build/install process to generate AppStream metadata at build time (similar to the existing .desktop generation), so appstream identifiers can be configured via CMake variables.
Changes:
- Generate the
.desktopfile withconfigure_file(... @ONLY)during UNIX (non-Apple) builds. - Convert the AppStream metainfo XML into a template (
.xml.in) and configure it during the build. - Install the configured metainfo file from the build directory instead of the source tree.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/gui/CMakeLists.txt | Configures and installs .desktop + metainfo files from the build dir on UNIX (non-Apple). |
| eu.opencloud.OpenCloudDesktop.metainfo.xml.in | Makes AppStream <id> and <launchable> configurable via CMake-substituted variables. |
Suppressed comments (1)
eu.opencloud.OpenCloudDesktop.metainfo.xml.in:3
APPLICATION_NAMEis defined as "OpenCloud Desktop" (includes a space) in OPENCLOUD.cmake, so expanding it into the AppStream<id>will produce an invalid component ID (AppStream IDs must not contain spaces). Use a stable, identifier-safe value (e.g.APPLICATION_EXECUTABLE) for the ID instead.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e5b19d9 to
8a2fbf1
Compare
|
@p-fruck I realized that the meta data is not aware of our coinstallable pre releases. For the values used here, have a look at https://github.com/opencloud-eu/desktop/blob/06fb795d6ff82f1d4cdb291e9b6ce8676824a390/OPENCLOUD.cmake |
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <component type="desktop-application"> | ||
| <id>eu.opencloud.desktop.OpenCloud</id> | ||
| <id>@APPLICATION_REV_DOMAIN@.@APPLICATION_EXECUTABLE@</id> |
There was a problem hiding this comment.
I am not sure how this will be handled bc normally the metainfo.xml must be named the same as <id> (which I messed up as well). Maybe the file sould be renamed to opencloud.metainfo.xml.in then?
| <id>eu.opencloud.desktop.OpenCloud</id> | ||
| <id>@APPLICATION_REV_DOMAIN@.@APPLICATION_EXECUTABLE@</id> | ||
|
|
||
| <name>OpenCloud Desktop</name> |
There was a problem hiding this comment.
| <name>OpenCloud Desktop</name> | |
| <name>@APPLICATION_NAME@</name> |
we should also define this dynamically
| </screenshots> | ||
| </component> |
There was a problem hiding this comment.
I was asked to add some missing fields required for the flatpak submission, maybe we can add them in this PR as well?:
| </screenshots> | |
| <developer id="eu.opencloud"> | |
| <name>OpenCloud GmbH</name> | |
| </developer> | |
| <project_group>Heinlein Group</project_group> | |
| <icon>@APPLICATION_ICON_NAME@</icon> | |
| <branding> | |
| <color type="primary" scheme_preference="light">#20434F</color> | |
| <color type="primary" scheme_preference="dark">#20434F</color> | |
| </branding> | |
| <content_rating type="oars-1.1" /> | |
| <url type="bugtracker">https://github.com/opencloud-eu/desktop/issues</url> | |
| <url type="homepage">https://opencloud.eu</url> | |
| <url type="faq">https://docs.opencloud.eu/docs/user/desktop-client/common-functionality/multiple-accounts</url> | |
| <url type="translate">https://explore.transifex.com/opencloud-eu/opencloud-eu</url> | |
| <url type="contribute">https://github.com/opencloud-eu/opencloud/blob/main/CONTRIBUTING.md</url> | |
| <url type="vcs-browser">https://github.com/opencloud-eu/desktop</url> | |
| <releases> | |
| <release version="3.0.3" date="2025-12-08"> | |
| <url type="details">https://github.com/opencloud-eu/desktop/releases/tag/v3.0.3</url> | |
| </release> | |
| </releases> | |
| </component> |
No description provided.