Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

macos : make thumbnails of kra, krz and ora

Ivan Yossi88363c5c1f13
diff --git a/krita/Info.plist.template b/krita/Info.plist.template
index da03c64f1e..890acb22af 100644
--- a/krita/Info.plist.template
+++ b/krita/Info.plist.template
@@ -349,7 +349,7 @@
<dict>
<key>UTTypeConformsTo</key>
<array>
- <string>public.zip-archive</string>
+ <string>public.data</string>
<string>public.image</string>
</array>
<key>UTTypeDescription</key>
@@ -373,6 +373,7 @@
<array>
<string>public.data</string>
<string>public.archive</string>
+ <string>public.image</string>
</array>
<key>UTTypeDescription</key>
<string>Krita Archival File</string>
@@ -415,7 +416,7 @@
<dict>
<key>UTTypeConformsTo</key>
<array>
- <string>public.zip-archive</string>
+ <string>public.data</string>
<string>public.image</string>
</array>
<key>UTTypeDescription</key>
diff --git a/krita/integration/CMakeLists.txt b/krita/integration/CMakeLists.txt
index 00bcabb2e9..637ae93312 100644
--- a/krita/integration/CMakeLists.txt
+++ b/krita/integration/CMakeLists.txt
@@ -7,10 +7,10 @@ endif()
add_custom_target( kritaintegration ALL xcodebuild -project "${CMAKE_CURRENT_SOURCE_DIR}/integration.xcodeproj" ${XCODEBUILD_ARCHS} -alltargets -configuration Release COMMENT build all macOS plugins )
-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Build/Release/kritaquicklook.qlgenerator DESTINATION ${KDE_INSTALL_PLUGINDIR})
+# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Build/Release/kritaquicklook.qlgenerator DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Build/Release/kritaspotlight.mdimporter DESTINATION ${KDE_INSTALL_PLUGINDIR})
# TODO fix and reenable - https://bugs.kde.org/show_bug.cgi?id=430553
-# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Build/Release/kritaquicklookng.appex DESTINATION ${KDE_INSTALL_PLUGINDIR})
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Build/Release/kritaquicklookng.appex DESTINATION ${KDE_INSTALL_PLUGINDIR})
endif(APPLE)
diff --git a/krita/integration/integration.xcodeproj/project.pbxproj b/krita/integration/integration.xcodeproj/project.pbxproj
index c4b73f34af..7405bc6576 100644
--- a/krita/integration/integration.xcodeproj/project.pbxproj
+++ b/krita/integration/integration.xcodeproj/project.pbxproj
@@ -3,10 +3,11 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 53;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
+ 114946422EA3FACB00515C4C /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 114946412EA3FACB00515C4C /* AppKit.framework */; };
84B7B62925619404003662DB /* QuickLookThumbnailing.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B7B62825619404003662DB /* QuickLookThumbnailing.framework */; };
84B7B62B25619404003662DB /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B7B62A25619404003662DB /* Quartz.framework */; };
84B7B62E25619404003662DB /* ThumbnailProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B7B62D25619404003662DB /* ThumbnailProvider.swift */; };
@@ -74,9 +75,9 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 114946412EA3FACB00515C4C /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
84A059912560A72500E4EAFD /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; };
84A059942560A75000E4EAFD /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
- 84A059962560A7D100E4EAFD /* libbz2.1.0.5.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.1.0.5.tbd; path = usr/lib/libbz2.1.0.5.tbd; sourceTree = SDKROOT; };
84B7B62725619404003662DB /* kritaquicklookng.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = kritaquicklookng.appex; sourceTree = BUILT_PRODUCTS_DIR; };
84B7B62825619404003662DB /* QuickLookThumbnailing.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLookThumbnailing.framework; path = System/Library/Frameworks/QuickLookThumbnailing.framework; sourceTree = SDKROOT; };
84B7B62A25619404003662DB /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
@@ -108,6 +109,7 @@
buildActionMask = 2147483647;
files = (
84B7B62925619404003662DB /* QuickLookThumbnailing.framework in Frameworks */,
+ 114946422EA3FACB00515C4C /* AppKit.framework in Frameworks */,
84B7B63425619534003662DB /* libunziptask.a in Frameworks */,
84B7B62B25619404003662DB /* Quartz.framework in Frameworks */,
);
@@ -142,7 +144,7 @@
84A059902560A72500E4EAFD /* Frameworks */ = {
isa = PBXGroup;
children = (
- 84A059962560A7D100E4EAFD /* libbz2.1.0.5.tbd */,
+ 114946412EA3FACB00515C4C /* AppKit.framework */,
84A059942560A75000E4EAFD /* libz.tbd */,
84A059912560A72500E4EAFD /* libbz2.tbd */,
84B7B62825619404003662DB /* QuickLookThumbnailing.framework */,
@@ -356,7 +358,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1130;
- LastUpgradeCheck = 1130;
+ LastUpgradeCheck = 2600;
ORGANIZATIONNAME = "Stichting Krita Foundation";
TargetAttributes = {
84B7B62625619404003662DB = {
@@ -483,10 +485,13 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = quicklookng/quicklookng.entitlements;
- CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
+ DEAD_CODE_STRIPPING = YES;
+ ENABLE_APP_SANDBOX = NO;
+ ENABLE_HARDENED_RUNTIME = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
+ NOUNCRYPT,
"$(inherited)",
);
INFOPLIST_FILE = quicklookng/Info.plist;
@@ -495,14 +500,12 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 10.15;
- MARKETING_VERSION = 4.4.0;
+ MARKETING_VERSION = 5.0;
PRODUCT_BUNDLE_IDENTIFIER = org.krita.quicklookng;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OBJC_BRIDGING_HEADER = "quicklookng/quicklookng-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
@@ -512,22 +515,21 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = quicklookng/quicklookng.entitlements;
- CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
+ DEAD_CODE_STRIPPING = YES;
+ ENABLE_APP_SANDBOX = NO;
+ ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = quicklookng/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 10.15;
- MARKETING_VERSION = 4.4.0;
+ MARKETING_VERSION = 5.0;
PRODUCT_BUNDLE_IDENTIFIER = org.krita.quicklookng;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
- SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OBJC_BRIDGING_HEADER = "quicklookng/quicklookng-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
};
name = Release;
@@ -536,7 +538,9 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
+ DEAD_CODE_STRIPPING = YES;
EXECUTABLE_PREFIX = lib;
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
@@ -546,7 +550,9 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
+ DEAD_CODE_STRIPPING = YES;
EXECUTABLE_PREFIX = lib;
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
@@ -586,9 +592,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
+ DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@@ -605,11 +613,12 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../../../Frameworks";
- MACOSX_DEPLOYMENT_TARGET = 10.13;
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
+ STRING_CATALOG_GENERATE_SYMBOLS = YES;
};
name = Debug;
};
@@ -647,9 +656,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
+ DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = NOUNCRYPT;
@@ -660,10 +671,11 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../../../Frameworks";
- MACOSX_DEPLOYMENT_TARGET = 10.13;
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
+ STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_COMPILATION_MODE = wholemodule;
};
name = Release;
diff --git a/krita/integration/integration.xcodeproj/xcshareddata/xcschemes/kritaquicklook.xcscheme b/krita/integration/integration.xcodeproj/xcshareddata/xcschemes/kritaquicklook.xcscheme
index 18763b8492..2b330216cd 100644
--- a/krita/integration/integration.xcodeproj/xcshareddata/xcschemes/kritaquicklook.xcscheme
+++ b/krita/integration/integration.xcodeproj/xcshareddata/xcschemes/kritaquicklook.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "1130"
+ LastUpgradeVersion = "2600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
diff --git a/krita/integration/quicklookng/Info.plist b/krita/integration/quicklookng/Info.plist
index 8e9afbfd3f..80e91f0774 100644
--- a/krita/integration/quicklookng/Info.plist
+++ b/krita/integration/quicklookng/Info.plist
@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
- <string>1</string>
+ <string>5.2.14</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSExtension</key>
@@ -28,53 +28,12 @@
<dict>
<key>QLSupportedContentTypes</key>
<array>
- <dict>
- <key>UTTypeConformsTo</key>
- <array>
- <string>public.image</string>
- </array>
- <key>UTTypeDescription</key>
- <string>Open Raster Image</string>
- <key>UTTypeIdentifier</key>
- <string>org.krita.ora</string>
- <key>UTTypeTagSpecification</key>
- <dict>
- <key>public.filename-extension</key>
- <array>
- <string>ora</string>
- <string>ORA</string>
- </array>
- <key>public.mime-type</key>
- <array>
- <string>image/openraster</string>
- </array>
- </dict>
- </dict>
- <dict>
- <key>UTTypeConformsTo</key>
- <array>
- <string>public.image</string>
- </array>
- <key>UTTypeDescription</key>
- <string>Krita 3.0 Image</string>
- <key>UTTypeIdentifier</key>
- <string>org.krita.kra</string>
- <key>UTTypeTagSpecification</key>
- <dict>
- <key>public.filename-extension</key>
- <array>
- <string>kra</string>
- <string>KRA</string>
- </array>
- <key>public.mime-type</key>
- <array>
- <string>application/x-krita</string>
- </array>
- </dict>
- </dict>
+ <string>org.krita.kra</string>
+ <string>org.openraster.ora</string>
+ <string>org.krita.krz</string>
</array>
<key>QLThumbnailMinimumDimension</key>
- <integer>17</integer>
+ <integer>0</integer>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.quicklook.thumbnail</string>
diff --git a/krita/integration/quicklookng/ThumbnailProvider.swift b/krita/integration/quicklookng/ThumbnailProvider.swift
index 6faf9e70c2..05d32b09ba 100644
--- a/krita/integration/quicklookng/ThumbnailProvider.swift
+++ b/krita/integration/quicklookng/ThumbnailProvider.swift
@@ -24,8 +24,12 @@ import QuickLookThumbnailing
class ThumbnailProvider: QLThumbnailProvider {
+// override init() {
+// print("initializing thumbnailer for org.krita.kra")
+// super.init()
+// }
override func provideThumbnail(for request: QLFileThumbnailRequest, _ handler: @escaping (QLThumbnailReply?, Error?) -> Void) {
-
+ print("handler called org.krita.kra")
// There are three ways to provide a thumbnail through a QLThumbnailReply. Only one of them should be used.
// First way: Draw the thumbnail into the current context, set up with UIKit's coordinate system.
@@ -39,29 +43,34 @@ class ThumbnailProvider: QLThumbnailProvider {
// Second way: Draw the thumbnail into a context passed to your block, set up with Core Graphics's coordinate system.
- handler(QLThumbnailReply(contextSize: request.maximumSize, drawing: { (context: CGContext) -> Bool in
+// handler(QLThumbnailReply(contextSize: request.maximumSize, drawing: { (context: CGContext) -> Bool in
+ handler(QLThumbnailReply(contextSize: request.maximumSize, currentContextDrawing: { () -> Bool in
// Draw the thumbnail here.
var appPlist = UnzipTask(request.fileURL.path, "preview.png")
// Not made with Krita. Find ORA thumbnail instead.
if (appPlist == nil || appPlist!.isEmpty) {
- appPlist =
- UnzipTask(request.fileURL.path, "Thumbnails/thumbnail.png");
+ appPlist = UnzipTask(request.fileURL.path, "Thumbnails/thumbnail.png");
}
if (appPlist != nil && !appPlist!.isEmpty) {
- let appIcon = NSImage.init(data: appPlist!);
-
- let rep = appIcon!.representations.first!;
-
- var renderRect = NSMakeRect(0.0, 0.0, CGFloat(rep.pixelsWide), CGFloat(rep.pixelsHigh));
-
- let cgImage = appIcon?.cgImage(forProposedRect: &renderRect, context: nil, hints: nil);
-
- context.draw(cgImage!, in: renderRect);
+ let appIcon = NSImage.init(data: appPlist!)
+
+// let rep = appIcon!.representations.first!
+
+ let renderRect = NSMakeRect(0.0, 0.0, request.maximumSize.width, request.maximumSize.height)
+
+ appIcon?.draw(in: renderRect)
+
+// guard let cgImage = appIcon?.cgImage(forProposedRect: &renderRect, context: nil, hints: nil)
+// else {
+// return false
+// }
+//
+// context.draw(cgImage, in: renderRect);
} else {
- return false;
+ return false
}
// Return true if the thumbnail was successfully drawn inside this block.
diff --git a/krita/integration/quicklookng/quicklookng.entitlements b/krita/integration/quicklookng/quicklookng.entitlements
index f2ef3ae026..18aff0ce43 100644
--- a/krita/integration/quicklookng/quicklookng.entitlements
+++ b/krita/integration/quicklookng/quicklookng.entitlements
@@ -2,9 +2,9 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>com.apple.security.app-sandbox</key>
- <true/>
- <key>com.apple.security.files.user-selected.read-only</key>
- <true/>
+ <key>com.apple.security.app-sandbox</key>
+ <true/>
+ <key>com.apple.security.files.user-selected.read-only</key>
+ <true/>
</dict>
</plist>
diff --git a/packaging/macos/kis-thumbnail.entitlements b/packaging/macos/kis-thumbnail.entitlements
new file mode 100644
index 0000000000..f2ef3ae026
--- /dev/null
+++ b/packaging/macos/kis-thumbnail.entitlements
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.app-sandbox</key>
+ <true/>
+ <key>com.apple.security.files.user-selected.read-only</key>
+ <true/>
+</dict>
+</plist>
diff --git a/packaging/macos/osxdeploy.sh b/packaging/macos/osxdeploy.sh
index 1997f10630..fde13f7cda 100755
--- a/packaging/macos/osxdeploy.sh
+++ b/packaging/macos/osxdeploy.sh
@@ -634,6 +634,7 @@ krita_deploy () {
cd ${KIS_INSTALL_DIR}/share/
rsync -prul --delete ./ \
--exclude krita.icns \
+ --exclude krita-krz.icns \
--exclude Assets.car \
--exclude aclocal \
--exclude doc \
@@ -669,16 +670,6 @@ krita_deploy () {
rsync -prul ${KIS_INSTALL_DIR}/translations/ \
${KRITA_DMG}/krita.app/Contents/Resources/translations
- echo "Copying QuickLook plugin..."
- mkdir -p ${KRITA_DMG}/krita.app/Contents/Library/QuickLook
- rsync -prul ${KIS_INSTALL_DIR}/plugins/kritaquicklook.qlgenerator ${KRITA_DMG}/krita.app/Contents/Library/QuickLook
- echo "Copying Spotlight plugin..."
- mkdir -p ${KRITA_DMG}/krita.app/Contents/Library/Spotlight
- rsync -prul ${KIS_INSTALL_DIR}/plugins/kritaspotlight.mdimporter ${KRITA_DMG}/krita.app/Contents/Library/Spotlight
- # TODO fix and reenable - https://bugs.kde.org/show_bug.cgi?id=430553
- # echo "Copying QuickLook Thumbnailing extension..."
- # rsync -prul ${KIS_INSTALL_DIR}/plugins/kritaquicklookng.appex ${KRITA_DMG}/krita.app/Contents/PlugIns
-
cd ${KRITA_DMG}/krita.app/Contents
ln -shF Resources share
ln -shF Frameworks lib
@@ -688,12 +679,25 @@ krita_deploy () {
echo "Copying plugins..."
local KRITA_DMG_PLUGIN_DIR="${KRITA_DMG}/krita.app/Contents/PlugIns"
- # exclude kritaquicklook.qlgenerator/
+
+ # do not copy excluded files but delete if present in dst
cd ${KIS_INSTALL_DIR}/plugins/
rsync -prul --delete --delete-excluded ./ \
--exclude kritaquicklook.qlgenerator \
--exclude kritaspotlight.mdimporter \
${KRITA_DMG_PLUGIN_DIR}
+
+ echo "Copying QuickLook plugin..."
+ mkdir -p ${KRITA_DMG}/krita.app/Contents/Library/QuickLook
+ rsync -prul ${KIS_INSTALL_DIR}/plugins/kritaquicklook.qlgenerator ${KRITA_DMG}/krita.app/Contents/Library/QuickLook
+ echo "Copying Spotlight plugin..."
+ mkdir -p ${KRITA_DMG}/krita.app/Contents/Library/Spotlight
+ rsync -prul ${KIS_INSTALL_DIR}/plugins/kritaspotlight.mdimporter ${KRITA_DMG}/krita.app/Contents/Library/Spotlight
+
+ # thumbnails for macOS 11.0 and up
+ echo "Copying QuickLook Thumbnailing extension..."
+ rsync -prul ${KIS_INSTALL_DIR}/plugins/kritaquicklookng.appex ${KRITA_DMG_PLUGIN_DIR}
+
cd ${BUILDROOT}
rsync -prul ${KIS_INSTALL_DIR}/lib/kritaplugins/* ${KRITA_DMG_PLUGIN_DIR}
@@ -747,11 +751,11 @@ krita_deploy () {
# Fix rpath for plugins
# Uncomment if the Finder plugins (kritaquicklook, kritaspotlight) lack the rpath below
- # printf "Repairing rpath for Finder plugins\n"
- # find "${KRITA_DMG}/krita.app/Contents/Library" -type f -path "*/Contents/MacOS/*" -perm 755 | xargs -I FILE install_name_tool -add_rpath @loader_path/../../../../../Frameworks FILE
+ printf "Repairing rpath for Finder plugins\n"
+ find "${KRITA_DMG}/krita.app/Contents/Library" -type f -path "*/Contents/MacOS/*" -perm 755 | xargs -I FILE install_name_tool -add_rpath @loader_path/../../../../../Frameworks FILE
printf "removing absolute or broken linksys, if any\n"
- find "${KRITA_DMG}/krita.app/Contents" -type l \( -lname "/*" -or -not -exec test -e {} \; \) -print | xargs rm
+ find "${KRITA_DMG}/krita.app/Contents" -type l \( -lname "/*" -or -not -exec test -e {} \; \) -print | xargs rm -v
printf "clean any left over rpath\n"
libs_clean_rpath $(find "${KRITA_DMG}/krita.app/Contents" -type f -perm 755 -or -name "*.dylib" -or -name "*.so")
@@ -760,6 +764,7 @@ krita_deploy () {
# remove debug version as both versions can't be signed.
rm ${KRITA_DMG}/krita.app/Contents/Frameworks/QtScript.framework/Versions/Current/QtScript_debug
echo "## Finished preparing krita.app bundle!"
+
}
@@ -797,6 +802,9 @@ signBundle() {
cd ${KRITA_DMG}/krita.app/Contents/Library/Spotlight
printf "kritaspotlight.mdimporter" | batch_codesign
+ cd ${KRITA_DMG}/krita.app/Contents/PlugIns
+ printf "kritaquicklookng.appex" | batch_codesign
+
# It is necessary to sign every binary Resource file
cd ${KRITA_DMG}/krita.app/Contents/Resources
find . -perm +111 -type f | batch_codesign