13
0

set executable and icon name in desktop-file

Also opt for version-agnostic mime-type (file-format version
is independent of program-version and of file-extension)
This commit is contained in:
Robin Gareus 2015-10-22 18:07:55 +02:00
parent b074ff0dd5
commit a02ffb9eed
3 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-ardour4"> <mime-type type="application/x-ardour">
<sub-class-of type="application/xml"/> <sub-class-of type="application/xml"/>
<comment>Ardour session file</comment> <comment>Ardour session file</comment>
<glob pattern="*.ardour"/> <glob pattern="*.ardour"/>

View File

@ -1,9 +1,9 @@
[Desktop Entry] [Desktop Entry]
Name=Ardour Name=Ardour
Comment=Ardour Digital Audio Workstation Comment=Ardour Digital Audio Workstation
Exec=ardour4 Exec=@ARDOUR_EXEC@
Icon=ardour4 Icon=@ARDOUR_ICON@
Terminal=false Terminal=false
MimeType=application/x-ardour4; MimeType=application/x-ardour;
Type=Application Type=Application
Categories=AudioVideo;Audio;AudioEditing;X-Recorders;X-Multitrack;X-Jack; Categories=AudioVideo;Audio;AudioEditing;X-Recorders;X-Multitrack;X-Jack;

View File

@ -669,11 +669,18 @@ def build(bld):
bld.install_files (bld.env['CONFDIR'], program + '.menus') bld.install_files (bld.env['CONFDIR'], program + '.menus')
# Freedesktop # Freedesktop
freedesktop_subst_dict = {
'ARDOUR_EXEC' : 'ardour' + str (bld.env['MAJOR']),
'ARDOUR_ICON' : 'ardour' + str (bld.env['MAJOR'])
}
if bld.env['FREEDESKTOP']: if bld.env['FREEDESKTOP']:
obj = bld(features = 'subst') obj = bld(features = 'subst')
obj.source = 'ardour.desktop.in' obj.source = 'ardour.desktop.in'
obj.target = bld.env['PROGRAM_NAME'].lower() + str (bld.env['MAJOR']) + '.desktop' obj.target = bld.env['PROGRAM_NAME'].lower() + str (bld.env['MAJOR']) + '.desktop'
obj.chmod = Utils.O644 obj.chmod = Utils.O644
obj.dict = freedesktop_subst_dict
set_subst_dict(obj, freedesktop_subst_dict)
obj = bld(features = 'subst') obj = bld(features = 'subst')
obj.source = 'ardour-mime-info.xml' obj.source = 'ardour-mime-info.xml'