Skip to content

Configure appstream data during build - #1011

Open
TheOneRing wants to merge 1 commit into
mainfrom
work/config
Open

Configure appstream data during build#1011
TheOneRing wants to merge 1 commit into
mainfrom
work/config

Conversation

@TheOneRing

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .desktop file with configure_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_NAME is 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.

Comment thread src/gui/CMakeLists.txt Outdated
@TheOneRing
TheOneRing force-pushed the work/config branch 3 times, most recently from e5b19d9 to 8a2fbf1 Compare August 5, 2026 11:49
@TheOneRing

TheOneRing commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@p-fruck I realized that the meta data is not aware of our coinstallable pre releases.
Can you have a look at those changes?

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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<name>OpenCloud Desktop</name>
<name>@APPLICATION_NAME@</name>

we should also define this dynamically

Comment on lines 25 to 26
</screenshots>
</component>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was asked to add some missing fields required for the flatpak submission, maybe we can add them in this PR as well?:

Suggested change
</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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants