45 lines
2.4 KiB
XML
45 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
The MIME type of a plugin package (.fwspacm), the archive the packaging
|
|
script at the repo root builds (see make-plugin-package.py).
|
|
|
|
Without this file the extension is unknown to the desktop, so a file manager
|
|
never offers the application that knows how to read it: the user could only
|
|
install a package by dropping it on an already open window. Declaring the
|
|
type is what makes Dolphin (and any other freedesktop file manager) list
|
|
PacManager under "Ouvrir avec" for a .fwspacm file and hand the path over on
|
|
the command line: the desktop entry takes %U and
|
|
MainWindow::installLocalFiles takes it from there.
|
|
|
|
Which of those files open with PacManager straight away is decided by
|
|
mimeapps.list (installed next to the desktop entry), not here: the MIME
|
|
database only says what a file *is*.
|
|
|
|
No <icon> element on purpose: the spec says the system database ignores it,
|
|
and the name a file manager looks up is derived from the type by convention
|
|
(application-vnd.fws.pacmanager.plugin-package), which is the name the
|
|
matching icon is installed under.
|
|
-->
|
|
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
|
<mime-type type="application/vnd.fws.pacmanager.plugin-package">
|
|
<comment xml:lang="fr">Paquet de plugin PacManager</comment>
|
|
<comment xml:lang="en">PacManager plugin package</comment>
|
|
<!-- An archive, so a file manager that only knows ZIP still shows something
|
|
sensible, and so the generic archive actions stay available. -->
|
|
<sub-class-of type="application/zip"/>
|
|
<glob pattern="*.fwspacm"/>
|
|
<!-- The glob alone is not enough. Content detection runs before name
|
|
matching and a .fwspacm *is* a ZIP, so application/zip (priority 50)
|
|
would win and the file manager would offer Archive Manager instead.
|
|
Matching the archive layout instead of the name: the local file header
|
|
starts with PK\x03\x04 and its 26 following bytes carry the name of the
|
|
first entry, which a package always makes plugin.json. Priority 60 puts
|
|
it above the generic ZIP rule while staying below a more specific type
|
|
that would claim the file for a better reason. -->
|
|
<magic priority="60">
|
|
<match type="string" offset="0" value="PK\x03\x04"/>
|
|
<match type="string" offset="30" value="plugin.json"/>
|
|
</magic>
|
|
</mime-type>
|
|
</mime-info>
|