• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

3rdparty/H24-Aug-2021-2,9052,195

integration.xcodeproj/H24-Aug-2021-850834

quicklook/H24-Aug-2021-602422

quicklookng/H24-Aug-2021-201121

spotlight/H24-Aug-2021-620436

unzipTask/H24-Aug-2021-12381

.gitignoreH A D24-Aug-20212.2 KiB8966

README.mdH A D24-Aug-20212.5 KiB5543

README.md

1# Krita's macOS integration
2
3This Xcode project generates QuickLook (macOS < 10.15), QuickLook Thumbnailing
4(macOS 10.15+) and Spotlight plugins for .kra and .ora files.
5
6The QuickLook plugins take the `preview.png` image in the root of the ZIP
7container and use it as the thumbnail image, and the `mergedimage.png` file as
8the preview image. On files created with older versions of Krita that do not
9have `mergedimage.png`, QuickLook will simply fall back to using the thumbnail
10image instead.
11
12The Spotlight plugin extracts the following metadata from the kra file, if
13available:
14- image dimensions, DPI, bit depth, and color space
15- color space profile name (not the actual name, as it's not embedded in the container; only the file path)
16- layer names
17- authors, image title and description
18
19# Installing
20
21Compile the project using Xcode or the provided CMake file. Find the build
22output folder (depends on how you configured the project), and place:
23- `kritaquicklook.qlgenerator` inside `~/Library/QuickLook`
24- `kritaspotlight.mdimporter` inside `~/Library/Spotlight`.
25
26You can also place them in the system folders (`/Library/QuickLook` and
27`/Library/Spotlight` respectively). Test that they have been properly installed
28with:
29- QuickLook: `qlmanage -d2 -p <path to a kra file>; qlmanage -d2 -t <path to a kra file>`
30- Spotlight: `mdimport -d2 -t <path to a kra file>`
31
32Be sure to reset QuickLook with `qlmanage -r` and `qlmanage -r cache`. If the
33changes don't happen right away, `killall Finder`.
34
35**NOTE 1:** `kritaquicklookng.appex` **cannot be used standalone. You must bundle it with Krita (see below).**
36
37**NOTE 2:** If you have krita installed to `/Applications`, Quicklook will always find
38first `kritaquicklook.qlgenerator` from `/Applications/krita.app` application
39bundle.
40
41# Bundling
42
43If you package Krita, place:
44- `kritaquicklook.qlgenerator` inside `krita.app/Contents/Library/QuickLook`
45- `kritaspotlight.mdimporter` inside `krita.app/Contents/Library/Spotlight`
46- `kritaquicklookng.appex` inside `krita.app/Contents/Library/PlugIns`
47Ensure the app is defined as the default app for opening .kra and .ora files,
48and codesign it whole if necessary.
49
50# Hacking
51After applying changes and compiling, test your changes as instructed below.
52- Quicklook: run in terminal: `qlmanage -g <path to kritaquicklook.qlgenerator> -c image -d2 -p <path to a kra file>`
53- Spotlight: install `kritaspotlight.mdimporter` inside `~/Library/Spotlight` and
54clear caches, then run `mdimport -d2 -t <path to a kra file>`. Installed
55mdimporter will be first in the list when running `mdimport -L`.