UI: Improve and update app CMake 3 metainfo file

CMake 2 path have a newer version of this file.

See the following commits for metainfo change details:
- 853ae5ea6e
- 904fe87f83
- 0cc6068ed4
This commit is contained in:
tytan652 2024-05-09 17:27:52 +02:00 committed by Ryan Foster
parent 2ea39b11e7
commit 92822311a8
2 changed files with 45 additions and 11 deletions

View file

@ -3,10 +3,12 @@
<id>com.obsproject.Studio</id>
<launchable type="desktop-id">com.obsproject.Studio.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0</project_license>
<project_license>GPL-2.0-or-later</project_license>
<name>OBS Studio</name>
<developer_name>OBS Project</developer_name>
<summary>Live streaming and video recording software</summary>
<developer id="com.obsproject">
<name>OBS Project</name>
</developer>
<summary>Live stream and record videos</summary>
<description>
<p>Free and open source software for video capturing, recording, and live streaming.</p>
<p>Features:</p>
@ -30,17 +32,37 @@
<url type="bugtracker">https://github.com/obsproject/obs-studio/issues</url>
<url type="donation">https://obsproject.com/contribute</url>
<url type="translate">https://crowdin.com/project/obs-studio</url>
<recommends>
<internet>always</internet>
<control>pointing</control>
<control>keyboard</control>
</recommends>
<supports>
<internet>offline-only</internet>
<control>touch</control>
</supports>
<screenshots>
<screenshot type="default">
<image>https://obsproject.com/assets/images/OBSDemoApp2610.png</image>
<image>https://obsproject.com/assets/images/OBSDemoApp301Flathub.png</image>
<caption>The OBS Studio window showing a card game, the project website, a video, and a purple rectangle</caption>
</screenshot>
</screenshots>
<branding>
<color type="primary">#284cb8</color>
</branding>
<content_rating type="oars-1.1"/>
<kudos>
<kudo>ModernToolkit</kudo>
<kudo>HiDpiIcon</kudo>
</kudos>
<releases>
<release version="@OBS_VERSION@" date="@APPDATA_RELEASE_DATE@"/>
<release version="@OBS_VERSION@" date="@APPDATA_RELEASE_DATE@">
<url type="details">https://github.com/obsproject/obs-studio/releases/tag/@OBS_VERSION@</url>
</release>
</releases>
<custom>
<value key="flathub::manifest">https://github.com/obsproject/obs-studio/blob/@GIT_HASH@/build-aux/</value>
</custom>
</component>

View file

@ -22,9 +22,21 @@ if(NOT DEFINED APPDATA_RELEASE_DATE)
endif()
endif()
configure_file(cmake/linux/com.obsproject.Studio.appdata.xml.in com.obsproject.Studio.appdata.xml)
if(NOT DEFINED GIT_HASH)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(
COMMAND git rev-parse HEAD
OUTPUT_VARIABLE GIT_HASH
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
set(GIT_HASH "master")
endif()
endif()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.appdata.xml"
configure_file(cmake/linux/com.obsproject.Studio.metainfo.xml.in com.obsproject.Studio.metainfo.xml)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.metainfo.xml"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
install(FILES cmake/linux/com.obsproject.Studio.desktop DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")