mirror of
https://github.com/transmission/transmission
synced 2025-01-30 19:03:04 +00:00
gtk: add AppData file
This file was originally written by Richard Hughes, for Fedora, who proposed it on the Transmission forum here: https://forum.transmissionbt.com/viewtopic.php?f=3&t=16443 It's used to display a nice description and screenshot in GNOME Software. The format is documented here: https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html The <_name/> and <_summary/> fields match the Name= and Comment= fields in the .desktop file so are already translated. The screenshot is taken with Transmission 2.92 (14714) on Fedora 25. It's at one of the sizes recommended by the GNOME Shell Screenshot Window Sizer extension. The <update_contact/> is based on the Git history.
This commit is contained in:
parent
fdfbe225da
commit
23d61b6457
5 changed files with 57 additions and 0 deletions
|
@ -50,6 +50,7 @@ add_custom_command(
|
|||
|
||||
if(ENABLE_NLS)
|
||||
find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge REQUIRED)
|
||||
|
||||
set(${PROJECT_NAME}_DESKTOP_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.desktop")
|
||||
add_custom_command(
|
||||
OUTPUT ${${PROJECT_NAME}_DESKTOP_FILE}
|
||||
|
@ -57,6 +58,14 @@ if(ENABLE_NLS)
|
|||
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
set(${PROJECT_NAME}_APPDATA_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.appdata.xml")
|
||||
add_custom_command(
|
||||
OUTPUT ${${PROJECT_NAME}_APPDATA_FILE}
|
||||
COMMAND ${INTLTOOL_MERGE_EXECUTABLE} --xml-style --utf8 ${CMAKE_SOURCE_DIR}/po ${PROJECT_SOURCE_DIR}/transmission-gtk.appdata.xml.in ${${PROJECT_NAME}_APPDATA_FILE}
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.appdata.xml.in
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
|
||||
set(${PROJECT_NAME}_SOURCES
|
||||
|
@ -148,6 +157,7 @@ add_executable(${TR_NAME}-gtk WIN32
|
|||
${${PROJECT_NAME}_SOURCES}
|
||||
${${PROJECT_NAME}_HEADERS}
|
||||
${${PROJECT_NAME}_DESKTOP_FILE}
|
||||
${${PROJECT_NAME}_APPDATA_FILE}
|
||||
${${PROJECT_NAME}_WIN32_RC_FILE}
|
||||
)
|
||||
|
||||
|
@ -188,6 +198,7 @@ endif()
|
|||
|
||||
if(ENABLE_NLS)
|
||||
install(FILES ${${PROJECT_NAME}_DESKTOP_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
install(FILES ${${PROJECT_NAME}_APPDATA_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/appdata)
|
||||
else()
|
||||
install(FILES transmission-gtk.desktop.in DESTINATION ${CMAKE_INSTALL_DATADIR}/applications RENAME ${TR_NAME}-gtk.desktop)
|
||||
endif()
|
||||
|
|
|
@ -100,6 +100,13 @@ DESKTOP_FILES=$(DESKTOP_IN_FILES:.desktop.in=.desktop)
|
|||
Productivitydir = $(datadir)/applications
|
||||
Productivity_DATA = $(DESKTOP_FILES)
|
||||
|
||||
APPDATA_IN_FILES=transmission-gtk.appdata.xml.in
|
||||
APPDATA_FILES=$(APPDATA_IN_FILES:.xml.in=.xml)
|
||||
@INTLTOOL_XML_RULE@
|
||||
|
||||
appdatadir = $(datadir)/appdata
|
||||
appdata_DATA = $(APPDATA_FILES)
|
||||
|
||||
icon_DATA = transmission.png
|
||||
icondir = $(datadir)/pixmaps
|
||||
|
||||
|
|
BIN
gtk/screenshots/a.png
Normal file
BIN
gtk/screenshots/a.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 112 KiB |
38
gtk/transmission-gtk.appdata.xml.in
Normal file
38
gtk/transmission-gtk.appdata.xml.in
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright 2014 Richard Hughes <richard@hughsie.com>
|
||||
Copyright 2017 Endless Mobile, Inc.
|
||||
-->
|
||||
<component type="desktop-application">
|
||||
<id type="desktop">transmission-gtk.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-2.0 OR GPL-3.0</project_license>
|
||||
|
||||
<_name>Transmission</_name>
|
||||
<_summary>Download and share files over BitTorrent</_summary>
|
||||
|
||||
<description>
|
||||
<!-- Translators: these are the application description paragraphs in the AppData file. -->
|
||||
<_p>
|
||||
BitTorrent is a peer-to-peer file-sharing protocol that is commonly used to
|
||||
distribute large amounts of data between multiple users.
|
||||
</_p>
|
||||
<_p>
|
||||
Transmission is a BitTorrent client with an easy-to-use frontend on top a
|
||||
cross-platform backend.
|
||||
Native frontends are available for OS X and Windows, as well as command line and
|
||||
web frontends.
|
||||
</_p>
|
||||
<_p>
|
||||
Notable features of Transmission include support for Local Peer Discovery, encryption,
|
||||
DHT, µTP, PEX and Magnet Link.
|
||||
</_p>
|
||||
</description>
|
||||
<url type="homepage">https://transmissionbt.com/</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image type="source">https://raw.githubusercontent.com/transmission/transmission/master/gtk/screenshots/a.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<update_contact>info_AT_transmissionbt.com</update_contact>
|
||||
</component>
|
|
@ -15,6 +15,7 @@ gtk/open-dialog.c
|
|||
gtk/relocate.c
|
||||
gtk/stats.c
|
||||
gtk/torrent-cell-renderer.c
|
||||
gtk/transmission-gtk.appdata.xml.in
|
||||
gtk/transmission-gtk.desktop.in
|
||||
gtk/tr-core.c
|
||||
gtk/tr-icon.c
|
||||
|
|
Loading…
Reference in a new issue