Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Preview and Thumbnail Extension #59

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

nostradani
Copy link

  • macOS 10.15 deprecated and removed support for quicklook generators
  • Since macOS 12, an extension can be created to provide Quicklook previews
  • This change implements this in addition to the existing quicklook generator
  • Code has been refactored to share the existing implementation with both approaches
  • Since app extensions are sandboxed, the usage of NSTask had to be replaced. This has also been done und thus offers now also better performance

@gabrielmaldi
Copy link

Hi, @nostradani, thanks for this! If I build the repo using your branch, will this work locally for me? I've been missing ProvisionQL for some time now and don't want to wait for this PR to be merged and then a new release. Thanks!

@nostradani
Copy link
Author

@gabrielmaldi Yes, you should be able to build this locally. More precisely, you need to build the ProvisionQLApp, copy it to your Applications folder and run it at least once (you can directly close it then). That should give you back the quicklook preview functionality.

Regarding the thumbnails: I don't know why this doesn't work for me anymore (at the moment). Let me know whether it works for you.

@gabrielmaldi
Copy link

@nostradani, THANK YOU! I missed so much this QL extension. It's working perfectly now. I didn't even need to copy the app, after building it in Xcode I just got a System Settings notification and enabled it:

Screenshot 2024-11-07 at 20 13 51

Wrt the thumbnail, is this what you mean?

Screenshot 2024-11-07 at 20 14 48

Fyi, I had to make this change:

image

@gabrielmaldi
Copy link

Do you have anything for APKs? I used https://github.com/ArtRoman/QuickLookAPK but it's not working anymore. Would you say it's a lot of work to make it work in Sequoia? Thanks again.

@ddaddy
Copy link

ddaddy commented Nov 8, 2024

@nostradani, I didn't even need to copy the app, after building it in Xcode I just got a System Settings notification and enabled it:

It’ll be in your Xcode DevidedData folder, so you risk it being deleted/cleaned at some point. Best moving it to the Applications folder.

@nostradani
Copy link
Author

Do you have anything for APKs? I used https://github.com/ArtRoman/QuickLookAPK but it's not working anymore. Would you say it's a lot of work to make it work in Sequoia? Thanks again.

I don't develop for Android, but I quickly checked the project. The structure would be easy to migrate. There are already methods that provide the needed content, so you would just have to plug it into the new API.

However it also uses NSTask, which I had to remove here due to sandboxing. That must be done there as well, but I noticed that it's using a tool named aapt which I cannot simply replace.

Not sure whether we can run it when its bundled with the plugin...

@gabrielmaldi
Copy link

Thanks for looking into it! In https://github.com/ArtRoman/QuickLookAPK/blob/master/QuickLookAPK/HZAndroidPackage.m I can see that it also uses NSTask for unzipping and grepping, so we'd have to replace those too (in addition to aapt). I might give it a try when I have some free time. Thanks again!

@ipad4
Copy link

ipad4 commented Nov 10, 2024

Showing Recent Messages
fatalError

ZIPFoundationObjC

Updating from https://github.com/nostradani/ZIPFoundationObjC.git
Creating working copy
Checking out 0.1.0
Couldn’t check out revision ‘a942ae952320faf94023456ec3a0125028d1d0ff’:
fatal: reference is not a tree: a942ae952320faf94023456ec3a0125028d1d0ff
Couldn’t check out revision ‘a942ae952320faf94023456ec3a0125028d1d0ff’:

Resolving Package Graph Failed 2024/11/10, 22:54 3.9 seconds

@gabrielmaldi
Copy link

gabrielmaldi commented Nov 10, 2024

@ipad4, make this change:

image

980f2f91ff4e38263afb8cf8ec694e21491a26dc

@ealeksandrov ealeksandrov self-requested a review November 10, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants