[英]execute qlmanage in sandboxed (electron) App doesn't work
My setup is an electron app on macOs. 我的设置是macOS上的电子应用程序。 I am using exec-sh to run
$ qlmanage
... to generate thumbnails. 我正在使用exec-sh运行
$ qlmanage
...生成缩略图。 It all works fine, except when I sign the app and set the sandbox entitlements to true. 一切正常,除非我对应用程序进行了签名并将沙盒权利设置为true。 I tried everything, but nothing works:
我尝试了一切,但没有任何效果:
If I set com.apple.security.app-sandbox
to false
it works. 如果我将
com.apple.security.app-sandbox
设置为false
则可以使用。 The error log is pretty useless to me: 错误日志对我来说毫无用处:
Error: Shell command exit with non zero code: 255
I am pretty unsure if it is even possible to run $ qlmanage
inside a sandboxed app... 我非常不确定是否有可能在沙盒应用程序中运行$
qlmanage
...
To get a Quicklook image from a file, you'd rather use 要从文件中获取Quicklook图像,您宁愿使用
CGImageRef QLThumbnailImageCreate(CFAllocatorRef allocator, CFURLRef url, CGSize maxThumbnailSize, CFDictionaryRef options);
This will return an CGImage that you may use as a thumbnail. 这将返回一个CGImage,您可以将其用作缩略图。 See documentation here: https://developer.apple.com/documentation/quicklook/1402623-qlthumbnailimagecreate
请参阅此处的文档: https : //developer.apple.com/documentation/quicklook/1402623-qlthumbnailimagecreate
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.