Skip to content

Commit

Permalink
Use rDNS name in metainfo and desktop file
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1t3cht committed Dec 23, 2024
1 parent ad047fb commit 9ca616e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/desktop/aegisub.desktop.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GenericName=Subtitle Editor
Comment=Create and edit subtitles for film and videos.
Exec=@AEGISUB_COMMAND@ %f
TryExec=@AEGISUB_COMMAND@
Icon=aegisub
Icon=@AEGISUB_RDNS_NAME@
Terminal=false
Categories=AudioVideo;AudioVideoEditing;GTK;
Keywords=subtitles;subtitle;captions;captioning;video;audio;
Expand Down
10 changes: 5 additions & 5 deletions packages/desktop/aegisub.metainfo.xml.in.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>aegisub.desktop</id>
<id>@AEGISUB_RDNS_NAME@</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-3-Clause AND MIT AND MPL-1.1</project_license>
<name>Aegisub</name>
Expand All @@ -19,9 +19,7 @@
<li>Fully scriptable through the Automation module</li>
</ul>
</description>
<!-- XXX: appstreamcli validation warning: cid-desktopapp-is-not-rdns
If improving this, the <id> and filename should probably also be changed. -->
<launchable type="desktop-id">aegisub.desktop</launchable>
<launchable type="desktop-id">@AEGISUB_RDNS_NAME@.desktop</launchable>
<kudos>
<kudo>HiDpiIcon</kudo>
<kudo>HighContrast</kudo>
Expand All @@ -41,7 +39,9 @@
<image>https://aegisub.org/img/screenshots/unix/audio-timing.png</image>
</screenshot>
</screenshots>
<developer_name>Aegisub Group</developer_name>
<developer id="@AEGISUB_RDNS_DEVELOPER@">
<name>Aegisub Group</name>
</developer>
<url type="bugtracker">https://github.com/TypesettingTools/Aegisub/issues</url>
<url type="faq">https://aegisub.org/docs/latest/faq</url>
<url type="help">https://aegisub.org/docs/latest/main_page</url>
Expand Down
9 changes: 7 additions & 2 deletions packages/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ elif host_machine.system() == 'darwin'
run_target('osx-build-dmg',
command: [build_dmg_sh, meson.project_source_root(), meson.project_build_root(), meson.project_version()])
else
aegisub_rdns_developer = 'org.aegisub'
aegisub_rdns_name = aegisub_rdns_developer + '.Aegisub'
conf_pkg.set('AEGISUB_COMMAND', 'aegisub')
conf_pkg.set('AEGISUB_RDNS_DEVELOPER', aegisub_rdns_developer)
conf_pkg.set('AEGISUB_RDNS_NAME', aegisub_rdns_name)

desktop_template = configure_file(input: 'desktop/aegisub.desktop.in.in',
output: 'aegisub.desktop.in',
configuration: conf_pkg)

i18n = import('i18n')
i18n.merge_file(input: desktop_template,
output: 'aegisub.desktop',
output: aegisub_rdns_name + '.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
Expand All @@ -40,7 +44,7 @@ else
output: 'aegisub.metainfo.xml.in',
configuration: conf_pkg)
i18n.merge_file(input: metainfo_template,
output: 'aegisub.metainfo.xml',
output: aegisub_rdns_name + '.metainfo.xml',
type: 'xml',
po_dir: '../po',
install: true,
Expand All @@ -52,6 +56,7 @@ else
dir = s.split('.')[0]
ext = s.split('.')[1]
install_data('desktop' / dir / 'aegisub.' + ext,
rename: aegisub_rdns_name + '.' + ext,
install_dir: datadir / 'icons' / 'hicolor' / dir / 'apps')
endforeach
endif

0 comments on commit 9ca616e

Please sign in to comment.