Skip to content

Commit

Permalink
data: Fix appdata to use custom app-id
Browse files Browse the repository at this point in the history
* Rename to newer appdata name
* Enable usage of different app-id to distinguish stable from
  development builds
  • Loading branch information
gpoo committed May 1, 2024
1 parent 6712098 commit 18124fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
16 changes: 11 additions & 5 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,16 @@ foreach man_page: man_pages
endforeach

# Metainfo file
metainfo = ev_namespace + '.metainfo.xml'
i18n.merge_file(
input: metainfo + '.in',
output: metainfo,
metainfo_config = configuration_data()
metainfo_config.set('app_id', ev_app_id)
metainfo_file_in = configure_file(
input: 'org.gnome.Evince.metainfo.xml.in.in',
output: 'org.gnome.Evince.metainfo.xml.in',
configuration: metainfo_config,
)
metainfo_file = i18n.merge_file(
input: metainfo_file_in,
output: '@[email protected]'.format(ev_app_id),
po_dir: po_dir,
install: true,
install_dir: ev_appstreamdir,
Expand All @@ -85,7 +91,7 @@ appstreamcli = find_program('appstreamcli', required: false)
if (appstreamcli.found())
test('validate-appdata',
appstreamcli,
args: ['validate', '--no-net', '--explain', metainfo],
args: ['validate', '--no-net', '--explain', metainfo_file],
workdir: meson.current_build_dir()
)
endif
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<component type="desktop-application">
<id>org.gnome.Evince</id>
<launchable type="desktop-id">org.gnome.Evince.desktop</launchable>
<id>@app_id@</id>
<launchable type="desktop-id">@app_id@.desktop</launchable>
<metadata_license>GPL-2.0+ or GFDL-1.3-only</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<name>Document Viewer</name>
Expand Down
2 changes: 1 addition & 1 deletion po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ backend/xps/evince-xpsdocument.metainfo.xml.in.in
backend/xps/xpsdocument.evince-backend.desktop.in.in
data/org.gnome.Evince.desktop.in.in
data/org.gnome.Evince.gschema.xml
data/org.gnome.Evince.metainfo.xml.in
data/org.gnome.Evince.metainfo.xml.in.in
data/org.gnome.Evince-previewer.desktop.in.in
libdocument/ev-attachment.c
libdocument/ev-document-factory.c
Expand Down

0 comments on commit 18124fa

Please sign in to comment.