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

the fix for known/unknown child UTIs to be handled by QLStephen, resolves #87 #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toy
Copy link

@toy toy commented Feb 17, 2022

So cheaply pretending to be a QLGenerator from Apple seems to be the way to make Quick Look use QLStephen also for UTIs with direct, indirect, explicit and implicit (for dynamic UTIs) conformance to UTI registered for it.

If this is the fix, I can only remember that most used language in programming is profanity.

…lves whomwah#87

So cheaply pretending to be a QLGenerator from Apple seems to be the way
to make Quick Look use QLStephen also for UTIs with direct, indirect,
explicit and implicit (for dynamic UTIs) conformance to UTI registered
for it.
If this is the fix, I can only remember that most used language in
programming is profanity.
@MikaelHashiCorp
Copy link

MikaelHashiCorp commented Apr 9, 2022

I tested this fix and it worked for me.

Commands and sample output:

git clone git@github.com:toy/qlstephen.git
cd qlstephen
git switch extensions-fix
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
make && make install
    xcodebuild SYMROOT=../build -project QuickLookStephenProject/QuickLookStephen.xcodeproj -configuration "Release" build
    2022-04-08 18:16:06.766
    ...
    ** BUILD SUCCEEDED **
qlmanage -m
    public.data -> /Users/mikael/Library/QuickLook/QLStephen.qlgenerator (1.5.1)

/Users/mikael/Library/QuickLook/QLStephen.qlgenerator/Contents/Info.plist:

			<key>LSItemContentTypes</key>
			<array>
				<string>public.data</string>
				<string>public.content</string>
				<string>public.unix-executable</string>
			</array>

Finder Screenshot:
2022-04-08_18-25-50

Thank you Ivan.

*** UPDATE ***
2023-03-22: After updating my Intel Macbook 2019 to Venture, I had to remake and reinstall QLStephen, but it still works.

@toy toy marked this pull request as ready for review April 9, 2022 12:03
Marginal added a commit to Marginal/QLVideo that referenced this pull request Nov 13, 2022
Restores support for avi files and for less common codecs in .mov, .ts and
.m2ts files. Fixes #86 #91

Inspired by whomwah/qlstephen#135
@glorious1
Copy link

This is not working for some reason:

`JimsMBPro:Packages jim$ git clone git@github.com:toy/qlstephen.git
Cloning into 'qlstephen'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
JimsMBPro:Packages jim$`

@toy
Copy link
Author

toy commented Nov 26, 2022

@glorious1 Try git clone https://github.com/toy/qlstephen.git instead

@glorious1
Copy link

glorious1 commented Nov 26, 2022

@toy
JimsMBPro:Packages jim$ git clone https://github.com/com:toy/qlstephen.git Cloning into 'qlstephen'... fatal: unable to access 'https://github.com/com:toy/qlstephen.git/': The requested URL returned error: 400
I think the problem must be that my github key expired or something. I'll work on it. Thanks.

@toy
Copy link
Author

toy commented Nov 26, 2022

@glorious1 I failed with copy-pasting 🤦, see the corrected command

@glorious1
Copy link

glorious1 commented Nov 26, 2022

I set up my github keys again and was able to get it with the original URL, thank you. Also thanks to @MikaelHashiCorp for putting in the build commands; I would have never guessed it requires Xcode and how to do it.

After running these for good measure:

qlmanage -r
qlmanage -r cache

it works like magic! Thank you @toy

EDIT: I found a few text files that didn't work, like xml, srt. I just used mdls to get their kMDItemContentType, like "public.xml" and "dyn.ah62d4um4ge81g6xy", and added them and "public.item" also to ~/Library/QuickLook/QLStephen.qlgenerator/Contents/Info.plist, the LSItemContentTypes array, and they work, which they didn't before.

@cvn
Copy link

cvn commented Jan 3, 2024

This works! So many file extensions are working again. 🥲 Thank you, @toy!

On macOS 14.2.1, with Xcode 15.1, my first build failed with a warning about MACOSX_DEPLOYMENT_TARGET. So I opened the project in Xcode and set a Deployment Target. Then I ran make && make install again and it worked.

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.

4 participants