mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix .desktop files generated by linux installer
This commit is contained in:
parent
6a4982f6bc
commit
f28aed0511
@ -376,11 +376,14 @@ class PostInstall:
|
|||||||
check_call('xdg-icon-resource install --size 128 calibre-viewer.png calibre-viewer', shell=True)
|
check_call('xdg-icon-resource install --size 128 calibre-viewer.png calibre-viewer', shell=True)
|
||||||
self.icon_resources.append(('apps', 'calibre-viewer', '128'))
|
self.icon_resources.append(('apps', 'calibre-viewer', '128'))
|
||||||
|
|
||||||
|
mimetypes = set([])
|
||||||
|
for x in all_input_formats():
|
||||||
|
mt = guess_type('dummy.'+x)[0]
|
||||||
|
if mt and 'chemical' not in mt:
|
||||||
|
mimetypes.add(mt)
|
||||||
|
|
||||||
def write_mimetypes(f):
|
def write_mimetypes(f):
|
||||||
for x in all_input_formats():
|
f.write('MimeType=%s;\n'%';'.join(mimetypes))
|
||||||
mt = guess_type('dummy.'+x)[0]
|
|
||||||
if mt:
|
|
||||||
f.write('MimeType=%s;\n'%mt)
|
|
||||||
|
|
||||||
f = open('calibre-lrfviewer.desktop', 'wb')
|
f = open('calibre-lrfviewer.desktop', 'wb')
|
||||||
f.write(VIEWER)
|
f.write(VIEWER)
|
||||||
@ -531,7 +534,7 @@ Version=1.0
|
|||||||
Type=Application
|
Type=Application
|
||||||
Name=E-book Viewer
|
Name=E-book Viewer
|
||||||
GenericName=Viewer for E-books
|
GenericName=Viewer for E-books
|
||||||
Comment=Viewer for E-books
|
Comment=Viewer for E-books in all the major formats
|
||||||
TryExec=ebook-viewer
|
TryExec=ebook-viewer
|
||||||
Exec=ebook-viewer %F
|
Exec=ebook-viewer %F
|
||||||
Icon=calibre-viewer
|
Icon=calibre-viewer
|
||||||
@ -545,7 +548,7 @@ Version=1.0
|
|||||||
Type=Application
|
Type=Application
|
||||||
Name=calibre
|
Name=calibre
|
||||||
GenericName=E-book library management
|
GenericName=E-book library management
|
||||||
Comment=E-book library management
|
Comment=E-book library management: Convert, view, share, catalogue all your e-books
|
||||||
TryExec=calibre
|
TryExec=calibre
|
||||||
Exec=calibre
|
Exec=calibre
|
||||||
Icon=calibre-gui
|
Icon=calibre-gui
|
||||||
|
Loading…
x
Reference in New Issue
Block a user