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') 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( i18n.merge_file(
input: 'org.gnome.Sysprof.appdata.xml.in', input: appdata_in,
output: 'org.gnome.Sysprof.appdata.xml', output: '@0@.appdata.xml'.format(app_id),
po_dir: podir, po_dir: podir,
install: true, install: true,
install_dir: join_paths(datadir, 'metainfo') 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( i18n.merge_file(
input: 'org.gnome.Sysprof.desktop.in', input: desktop_in,
output: 'org.gnome.Sysprof.desktop', output: '@0@.desktop'.format(app_id),
type: 'desktop', type: 'desktop',
po_dir: podir, po_dir: podir,
install: true, install: true,

View File

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

View File

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