MaddTheSane / Simple-Comic

macOS comic viewer
MIT License
256 stars 21 forks source link

Quicklook generator not working if app is launched from outside the /Applications folder #57

Open eugeniosz opened 3 years ago

eugeniosz commented 3 years ago

Quicklook works only if the app is launched from the Application folder. I usually keep Apps in ~/Applications/ and launched from there quicklook stops showing preview.

Petwannar commented 2 years ago

The quick look worked on my Mac since a few months, but after every update of Simple Comic, I had to deinstall and reinstall the program otherwise, quick look was lost. Since the last update, despite this manoeuvre, I completely lost the option of the quick look. Any suggestions ?

SquaTront commented 1 year ago

Quicklook isn't working for me if I have a copy of ComicTagger installed. If I zip the ComicTagger app, Quicklook will work. Looks like there's some sort of incompatibility. I have both cbz and cbr files mapped to open with Simple Comic. Here's a thread discussing the bug:

https://forums.macrumors.com/threads/view-thumbnails-from-cbr-cbz-in-finder.1793528/

DavidPhillipOster commented 1 year ago

SimpleComic uses the original style of QuickLook plugin interface. SimpleComc/QuickComic/GenerateThumbnailForURL.m

Quicklook programming is documented in https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/Quicklook_Programming_Guide/Articles/QLProjectConfig.html including quicklook debugging using the /usr/bin/qlmanage tool.

If you do a search for quicklook thumbnails, most of the search results refer to the revised Quicklook interface that Apple introduced in macOS Catalina (10.15) 2019. They are misleading because, as shown in https://developer.apple.com/videos/play/wwdc2018/237/ and https://developer.apple.com/videos/play/wwdc2019/719 Apple was mostly concerned with bringing QuickLook to iOS. More new-style documentation at: https://developer.apple.com/documentation/quicklookthumbnailing/providing_thumbnails_of_your_custom_file_types

https://developer.apple.com/documentation/quicklookthumbnailing/creating_quick_look_thumbnails_to_preview_files_in_your_app

Inspecting the Simple Comic downloaded from the App Store, Its Info.plist and ./Library/QuickLook/Contents/QuickComic.qlgenerator/Contents/Info.plist contain none of the new data documented above.

I don't know what happens if you have multiple apps with quicklook plugins (or stand-alone plugins) claiming to handle the same file type. I don't know if Apple addresses what happens when you have both new and old style quicklook plugins.

The next step, on a system with and without the bug is to follow the directions on Quicklook debugging using /usr/bin/qlmanage.

The bug doesn't happen for me:

I'm on: M1 Mac Mini, macOS Ventura. Simple Comic 1.9.5 in a sub-directory of /Applications.

Thumbnail for a .cbz file does not show in Finder as List mode, but it does if the containing folder is in as Icons mode. Selecting the file and choosing Quick Look does show the extended Quick Look view with large title bar and side bar of all the page thumbnails. Button at top says: "Open with Simple Comic". File is on a removable APFS volume.

YURIART1 commented 3 months ago

DavidPhillipOster, I can't seem to fix it. I have catalina, the cbz and car files showed thumbnails until a few days ago, now they are gone when I upgraded to the new simple comic. what's going on?!!! please help!! how do I fix the problem

DavidPhillipOster commented 3 months ago

Simple Comic.app/Contents/PlugIns/QuickComic Thumbnailer.appex/Contents/Info.plist has LSMinimumSystemVersion = 11.0 but macOS Catalina is version 10.15 Simple Comic itself (version 1.9.8) has LSMinimumSystemVersion = 10.14.6

And for completeness, Simple Comic's other plugin, the quicklook preview plug-in has a LSMinimumSystemVersion = 12.0

As part of the release process, shouldn't all three of these be the same?

YURIART1 - your problem would be easy to fix if you built the app from the source code, but because the app is code-signed, you can't just edit the Thumbnailer plugin in Info.plist. Can you get the previous version of Simple Comic from one of your Time Machine backups?

nickv2002 commented 3 months ago

I can certainly make all the LSMinimumSystemVersion the same but I'm not sure if they actually do require different OS versions.

You can find many previous code-signed versions on our releases page.

DavidPhillipOster commented 3 months ago

If the LSMinimumSystemVersion is consistent, then the app store would stop people from downloading apps that partially work on their system.

 

Thanks for getting me thinking about this. For my own projects, I'll drop old versions of macOS when I can no longer run them on my oldest machine, but I don't own enough macs to test all the versions. Now that macOS can be virtualized, I plan to store virtual images of macOS with the last point release of each major update and write automated tests to qualify release candidates on every major version the app is supposed to support.

MaddTheSane commented 3 months ago

The different deployment targets for the QuickLook extensions is due to the fact that the APIs provided by the QuickLook extensions aren't available for earlier OSes (QLPreviewProvider, which is what the QuickComic Previewer uses, was introduced in macOS 12). For OSes that are older, the QuickLook plug-in (Which uses APIs introduced in 10.5) should work fine.

Also, looks like QLThumbnailProvider (Which is used by the thumbnailer extension) was introduced in 10.15. A fix for that is coming.