qlImageSize icon indicating copy to clipboard operation
qlImageSize copied to clipboard

macOS 10.15+ Support

Open manngo opened this issue 5 years ago • 40 comments

I have tried this on two machines with a freshly install MacOS 10.15 Catalina. It doesn’t appear to be working.

manngo avatar Oct 08 '19 22:10 manngo

I don't plan on installing catalina any time soon, so either someone find the cause why it's not working or you'll have to wait.

Nyx0uf avatar Oct 09 '19 08:10 Nyx0uf

As far as I can tell, it must be a 32bit application which no longer works in Catalina. I don’t know whether it would be a matter of recompiling.

manngo avatar Oct 09 '19 08:10 manngo

Nonsense, this plugin has been 64-bit only since the beginning.

Nyx0uf avatar Oct 09 '19 11:10 Nyx0uf

This issue is that this and other QL plugins are no longer recognized as created by an identified developer due to notarization enforcement. The binary needs to be notarized by Apple, which needs a Developer Apple ID and Xcode.

Here are the docs on Notarizing Your App Before Distribution.

jeffbyrnes avatar Oct 09 '19 15:10 jeffbyrnes

I don't want to waste the little time I have with this kind of bullshit. With 900+ stars & 50 forks on this repo it should not be too hard to find someone to do it.

Nyx0uf avatar Oct 09 '19 17:10 Nyx0uf

I don't want to waste the little time I have with this kind of bullshit. With 900+ stars & 50 forks on this repo it should not be too hard to find someone to do it.

Then it will require the pull request every time you want to release a new version.

rurza avatar Oct 28 '19 07:10 rurza

Has anyone tried to see if it works on 10.15.1? I updated my virtual machine and it seems that now the various qlgenerators works but I'm not sure if I did something strange in the settings or if it's a problem solved in the last update.

sbarex avatar Oct 30 '19 07:10 sbarex

The title bar does not provide information except these two formats; WebP, BPG macOS Catalina 10.15.1

setanarut avatar Oct 30 '19 15:10 setanarut

I think that macos don't allow to customize the quicklook for some common file formats like jpg, png… so for these files is used the standard generator, for less common format (like webp) is used the custom generator.

sbarex avatar Oct 30 '19 15:10 sbarex

I think that macos don't allow to customize the quicklook for some common file formats like jpg, png… so for these files is used the standard generator, for less common format (like webp) is used the custom generator.

duplicate https://github.com/Nyx0uf/qlImageSize/issues/44

setanarut avatar Oct 30 '19 17:10 setanarut

The system prefers the public.image identifier.

/System/Library/QuickLook/Image.qlgenerator/Contents/Info.plist

<key>CFBundleTypeRole</key>
            <string>QLGenerator</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.image</string>
            </array>

setanarut avatar Oct 31 '19 14:10 setanarut

The system prefers the public.image identifier.

/System/Library/QuickLook/Image.qlgenerator/Contents/Info.plist

<key>CFBundleTypeRole</key>
            <string>QLGenerator</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.image</string>
            </array>

I just tried moving /System/Library/QuickLook/Image.qlgenerator somewhere else to see if it makes any difference. To my surprise, quick looking images still works the same. Looks like ql for images works somewhat different in Catalina...

RomanSmolka avatar Nov 05 '19 00:11 RomanSmolka

The system prefers the public.image identifier. /System/Library/QuickLook/Image.qlgenerator/Contents/Info.plist

<key>CFBundleTypeRole</key>
            <string>QLGenerator</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.image</string>
            </array>

I just tried moving /System/Library/QuickLook/Image.qlgenerator somewhere else to see if it makes any difference. To my surprise, quick looking images still works the same. Looks like ql for images works somewhat different in Catalina...

How did you move it? I tried it myself and the system won’t let me.

manngo avatar Nov 05 '19 00:11 manngo

How did you move it? I tried it myself and the system won’t let me.

You need to re-mount the system partition as writable with sudo mount -uw /. Then use mv with sudo.

RomanSmolka avatar Nov 05 '19 01:11 RomanSmolka

Ah. I forgot about about the new partitioning system for Catalina.

manngo avatar Nov 05 '19 01:11 manngo

@RomanSmolka I wonder if changing the file extension will give the same result. maybe changing the file location is ineffective. you can back up the file by compressing it. if the generator is not used. why there? interesting.

setanarut avatar Nov 05 '19 13:11 setanarut

I just tried moving /System/Library/QuickLook/Image.qlgenerator somewhere else to see if it makes any difference. To my surprise, quick looking images still works the same. Looks like ql for images works somewhat different in Catalina...

after moving the generator do you have reset quicklook with qlmanage -r? and after try to view an image that you don't have opened recenty to be sure it's not in the cache.

sbarex avatar Nov 05 '19 14:11 sbarex

after moving the generator do you have reset quicklook with qlmanage -r? and after try to view an image that you don't have opened recenty to be sure it's not in the cache.

Yes, it's still the same even after reboot.

RomanSmolka avatar Nov 05 '19 15:11 RomanSmolka

So what you are saying is that you can make this extension work by deleting the default image preview in Catalina? Do you still have the new Catalina controls like the rotate and markup button?

skynet01 avatar Nov 05 '19 19:11 skynet01

Someone who understands Catalina should write a new plugin. All we need is to show the title bar information. WebP is not required. the system's own generator should be used. I lost a feature that was very useful to me and loved.

setanarut avatar Nov 05 '19 19:11 setanarut

I think someone can just fork the current one and fix it. :)

skynet01 avatar Nov 05 '19 20:11 skynet01

@skynet01 No, that doesn't make it work. There is actually no difference whether the image generator is present or not, which leads me to a thought that in Catalina, image QL is not generated by an extension. Maybe they did it to support the new features you mentioned. But I might be wrong.

RomanSmolka avatar Nov 05 '19 22:11 RomanSmolka

Regarding this:

This issue is that this and other QL plugins are no longer recognized as created by an identified developer due to notarization enforcement. The binary needs to be notarized by Apple, which needs a Developer Apple ID and Xcode.

You can disable gatekeeper by opening a terminal and running this. After doing this, qlImage runs OK on Catalina for webp files (the system generator is still used for all other image types)

$ xattr -d -r com.apple.quarantine ~/Library/QuickLook/qlImageSize.qlgenerator/

As an FYI, homebrew-cask team is currently frustrated by gatekeeper on Catalina, it's breaking many useful-but-small-audience utilities. See https://github.com/Homebrew/homebrew-cask/issues/70798 for a more in depth discussion.

I did try to debug the public.image issue, got as far as this line but it still seems to render preview without the sizes in the title bar. Output does claim it's using the qlImageSize generator - perhaps someone with more experience in QL can spot an error I've made here:

$ qlmanage -p -g ~/Library/QuickLook/qlImageSize.qlgenerator -c jpg ~/Downloads/medium.jpg

hamiltont avatar Mar 22 '20 19:03 hamiltont

Reason:

This issue is actually caused by the macOS 10.15.4 won't call the function QuickLookGeneratorPluginFactory of custom plugin which is not same as the macOS 10.14.6;

Detail:

How I debug with this project by the steps:

  1. git clone https://github.com/Nyx0uf/qlImageSize.git
  2. cd qlImageSize
  3. tar xJvf images-samples.txz (decompress sample image in the project)
  4. open qlImageSize.xcodeproj
  5. Xcode top menu: Product -> Scheme -> Edit Scheme
    • Info -> Executable -> Other -> cmd + shift + g -> /usr/bin/qlmanage 1
    • Arguments: 3 [A] copy from 3 [B] copy result from terminal: realpath Users/benjamin/btsync/projects/qlImageSize/images-samples/webp.webp [C] webp
    • close
  6. add breakpoint in QuickLookGeneratorPluginFactory of main.m 4
  7. Xcode top menu: Product - Run, break point is hit with webp on macOS 10.15.4 (if not, try to restart Xcode, god bless Apple)
  8. but if replace webp to png, the break point is not hit with png on macOS 10.15.4.:
    • replace [B] with result from terminal realpath Users/benjamin/btsync/projects/qlImageSize/images-samples/png.png
    • replace [C] with png 5
    • after run project, the break point is not hit with png on macOS 10.15.4.
  9. but repeating the same steps wrote above on macOS 10.14.6, I find the break point is hit with both webp and png on macOS 10.14.6. It works well.

Conclusion until now:

As sabrex wrote the macOS 10.15.4 is not calling the custom quick look plugin with the common image file type such as png / jpg.

macOS 10.14.6 macOS 10.15.4
webp
png

PS:

As hazarek wrote I love this handy feature too. Sadly I can't fix it so far. If anyone have any thought, please leave a comment. 😭😭😭

ChesterYue avatar Apr 08 '20 09:04 ChesterYue

I have pull a request of info about this behavios to the apple support about october 2019, but without any response.

sbarex avatar Apr 08 '20 09:04 sbarex

I have pull a request of info about this behavios to the apple support about october 2019, but without any response.

As Xcode(11.4) is not able to create QuickLook project already (since some Xcode version before), I think Apple is going to be disregard for maintaining the QuickLook development. 🙁🙁🙁

ChesterYue avatar Apr 08 '20 14:04 ChesterYue

I have pull a request of info about this behavios to the apple support about october 2019, but without any response.

As Xcode(11.4) is not able to create QuickLook project already (since some Xcode version before), I think Apple is going to be disregard for maintaining the QuickLook development. 🙁🙁🙁

So does it mean it is impossible to show Quicklook title bar information?

setanarut avatar Apr 08 '20 15:04 setanarut

I have pull a request of info about this behavios to the apple support about october 2019, but without any response.

As Xcode(11.4) is not able to create QuickLook project already (since some Xcode version before), I think Apple is going to be disregard for maintaining the QuickLook development. 🙁🙁🙁

So does it mean it is impossible to show Quicklook title bar information?

I think so with the information i got as so far.

ChesterYue avatar Apr 08 '20 15:04 ChesterYue

I have pull a request of info about this behavios to the apple support about october 2019, but without any response.

As Xcode(11.4) is not able to create QuickLook project already (since some Xcode version before), I think Apple is going to be disregard for maintaining the QuickLook development. 🙁🙁🙁

So does it mean it is impossible to show Quicklook title bar information?

I think so with the information i got as so far.

But sbarex's plugin can modify the quicklook window (right click, cursor selection). I'm just thinking. i'm not a Apple developer.

setanarut avatar Apr 08 '20 16:04 setanarut

I have pull a request of info about this behavios to the apple support about october 2019, but without any response.

As Xcode(11.4) is not able to create QuickLook project already (since some Xcode version before), I think Apple is going to be disregard for maintaining the QuickLook development. 🙁🙁🙁

So does it mean it is impossible to show Quicklook title bar information?

I think so with the information i got as so far.

But sbarex's plugin can modify the quicklook window (right click, cursor selection). I'm just thinking. i'm not a Apple developer.

It's not about the ability to modify window, the key point is the common image file type (png) which is not support to using customized plugin. I think sbarex knows what's going on.

ChesterYue avatar Apr 08 '20 16:04 ChesterYue