build: make appdata/desktop files use dynamic app-id

This ensures we get the right app-id based on -Ddevelopment=true.
This commit is contained in:
Christian Hergert
2022-07-22 12:55:12 -07:00
parent 4b68b9180b
commit 59c196e0f1
3 changed files with 16 additions and 6 deletions

View File

@ -3,17 +3,27 @@ if get_option('gtk') and get_option('libsysprof')
install_dir: join_paths(datadir, 'mime/packages')
)
appdata_in = configure_file(
input: 'org.gnome.Sysprof.appdata.xml.in.in',
output: 'org.gnome.Sysprof.appdata.xml.in',
configuration: config_h,
)
i18n.merge_file(
input: 'org.gnome.Sysprof.appdata.xml.in',
output: 'org.gnome.Sysprof.appdata.xml',
input: appdata_in,
output: '@0@.appdata.xml'.format(app_id),
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
desktop_in = configure_file(
input: 'org.gnome.Sysprof.desktop.in.in',
output: 'org.gnome.Sysprof.desktop.in',
configuration: config_h,
)
i18n.merge_file(
input: 'org.gnome.Sysprof.desktop.in',
output: 'org.gnome.Sysprof.desktop',
input: desktop_in,
output: '@0@.desktop'.format(app_id),
type: 'desktop',
po_dir: podir,
install: true,

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.gnome.Sysprof.desktop</id>
<id>@APP_ID@.desktop</id>
<translation type="gettext">sysprof</translation>
<name>Sysprof</name>
<summary>Profile an application or entire system</summary>

View File

@ -6,7 +6,7 @@ Comment=Profile an application or entire system.
Exec=sysprof %u
TryExec=sysprof
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.Sysprof
Icon=@APP_ID@
StartupNotify=true
Terminal=false
Type=Application