![]() Registered Member ![]()
|
Hi all,
I search a description how I can integrate my own tool 'tkBurn' into KDE4. In KDE3 it was easy via some files in: ~/.kde/share/applnk ~/.kde/share/icons ~/.kde/share/mimelnk but especially for new mimetypes I found currently no way how I can create a new one with a appropriate icon and how I should associate the tool. For new menu entries and new icons I can use the files in /usr/share/applications/* Is there a description available or can anybody give me a hint ? Thanks a lot Werner thBurn: http://home.arcor.de/wfranke/tkburn/index.html |
![]() Administrator ![]()
|
You need to provide a mimetype xml file, as specified by http://www.freedesktop.org/standards/shared-mime-info
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thanks bcooksley,
due to your hint I found the files under /usr/share/mime. I assume during the installation of my tool I must copy a new mime xml file to the right directory (e.g. /usr/share/mime/application). But beside the mime xml file I found also some ascii files at /usr/share/mime (e.g globs, generic-icons). I'm not clear how I have/must add lines to this files during installation of my tool. The shared-mime-info-spec mention the command "update-mime-database" but no example. Please can you more explain it or exist a example somewhere ? Thanks Werner |
![]() Administrator ![]()
|
KDE itself installs its mime types to /usr/share/mime/packages only. The text files in the top level directory ( and the other sub-directories ) are maintained by update-mime-database, which can be run during installation using the following CMake macro:
Note that XDG_MIME_INSTALL_DIR is the sub-directory where they were installed.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thanks again
![]() Hmmm, I assume the CMake macro is somewhat in RPM ? I'm still not familiar with that. Up to now I not build a RPM packet. I hope my next question join not in a never-ending story. Where I found the contents of the CMake macro ? I like to realize the tool installation as shell script (until I understand the RPM way) I hope the CMake macro give me the information I need for that ? Concerning Icons and desktop files: Does support KDE4 still the mechanism behind $KDEDIRS of KDE3 ? Werner |
![]() Administrator ![]()
|
Yes, KDE 4 still supports $KDEDIRS.
I don't know where the CMake macro is however, other than the fact that kdelibs itself uses it. You may be able to find further information in the update-mime-database man page ( man update-mime-database )
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() KDE Developer ![]()
|
No, it is part of the build system. For example in Akonadi we install this file http://websvn.kde.org/trunk/kdesupport/ ... iew=markup for subtypes of text/calendar, like this:
See http://websvn.kde.org/trunk/kdesupport/ ... iew=markup No idea how that is transformed into an RPM post-install hook, maybe you can check your distribution's package for Akonadi. [/quote] Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() KDE Developer ![]()
|
First step: create an XML file describing your MIME type. See http://websvn.kde.org/trunk/KDE/kdepim/ ... iew=markup This file describes two new MIME types: 1) application/x-vnd.kde.notes a sub type of the generic "text/plain" type 2) text/x-vnd.akonadi.note a sub type of the more specific "message/rfc822" type This file is then being processed during installation, by use of these additions to the CMakeLists.txt build file (see http://websvn.kde.org/trunk/KDE/kdepim/ ... iew=markup)
These three lines let the build system check for the availability of the shared MIME type data base (shared between Free Software desktop projects such as KDE, GNOME, etc.) The following lines than take care of installing the XML file describing the new MIME types
Summarizing the three necessary steps are: 1) create XML file describing the new MIME type(s) 2) installing this file (first line in the snippet above) 3) updating MIME database (second line in the snippet above) Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient