-
Notifications
You must be signed in to change notification settings - Fork 3
Home
portnov edited this page Jun 7, 2015
·
3 revisions
This section contains information about format of *.bundle files that I discovered by reverse-engineering bundle files created by Krita. The format is not officially documented, basically it is "defined by implementation".
So, bundle file is a (renamed) ZIP archive, with the following contents:
- `mimetype' file. This file should contain a string "application/x-krita-resourcebundle", without trailing newline character. This file is packed using STORE mode, i.e. it is not compressed. Other files can be compressed or not, it seems Krita will understand them anyway.
- `meta.xml' file. This file contains metainformation about bundle author, description and so on. See description below.
- `preview.png' file. Preview to show in Krita's "manage resources" dialog.
- `manifest.xml' file under META-INF/ directory. This file contains a list of bundle contents. See description below.
- Directories `brushes', 'paintoppresets', 'patterns', all optional. Each directory contains resource files of corresponding type, as in usual ~/.kde/share/apps/krita/ hierarchy. Theoretically, directory names can be different, as reference to resource file from manifest.xml contains type of resource and full path to it. But I didn't try to use other directory names yet.
This file is, for some reason, not a valid XML file in those bundles which I tried, since it does not contain proper reference for "meta" and "dc" namespace aliases. The file has the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<meta:meta>
<meta:generator>Name and version of program that created bundle</meta:generator>
<dc:author>Bundle's author</dc:author>
<dc:description>Description of bundle</dc:description>
<meta:initial-creator>I suppose here should be name of author of original resources used in bundle</meta:initial-creator>
<dc:creator>I suppose this is name of one who actually created bundle file</dc:creator>
<meta:creation-date>Date of bundle creation</meta:creation-date>
<meta:dc-date>Date of bundle creation. Not sure why duplication is needed.</meta:dc-date>
<meta:meta-userdefined meta:name="email" meta:value="Bundle author email"/>
<meta:meta-userdefined meta:name="license" meta:value="Bundle license"/>
<meta:meta-userdefined meta:name="website" meta:value="Bundle author website"/>
</meta:meta>
This file is a valid XML file, with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">
<!-- First entry describes bundle itself -->
<manifest:file-entry manifest:media-type="application/x-krita-resourcebundle" manifest:full-path="/"/>
<!-- Each of the following entries describes resource file: it's type, location and MD5 checksum -->
<!-- Media-type can be "paintoppresets", "brushes" or "patterns". -->
<manifest:file-entry manifest:media-type="paintoppresets" manifest:full-path="paintoppresets/file.kpp" manifest:md5sum="364ace10f2a7c7af6bc4f3f9ba145f6c"/>
<manifest:file-entry manifest:media-type="brushes" manifest:full-path="brushes/file.gbr" manifest:md5sum="364ace10f2a7c7af6bc4f3f9ba145f6c"/>
<manifest:file-entry manifest:media-type="patterns" manifest:full-path="patterns/file.kpp" manifest:md5sum="364ace10f2a7c7af6bc4f3f9ba145f6c"/>
</manifest:manifest>