I am trying to write a QuickLook generator. To do this, I need to associate with the map I created. However, as soon as I refer to the specified structure, qlmanage refuses to load my plugin, telling me:
[ERROR] Can't load plug-in at /path/to/my-ql.qlgenerator: The bundle "my-ql" couldn't be loaded because it is damaged or missing necessary resources.
I read all the relevant manuals for Linking, Frameworks, and QuickLook, but could not find an answer.
Things I have discovered / ruled out so far
- Architecture: When you turn on the Framework as a 32-bit binary, the whole binding process happens, so this doesn't seem to be a problem.
- I checked that the Framework was copied to the plugins package in
Contents/Frameworks . - The framework installation path is set to
@executable_path/../Frameworks
In addition, when using the framework in another application, everything is going well. The only possible explanation that I can understand is: When qlmanage executed, @executable_path actually points to this binary, and so my structure will never be found. If so, how should I set the installation path in order to still resolve the location relative to the plugin? I do not want to establish my infrastructure around the world.
EDIT
otool -L on the built-in QuickLook plugin gives the following:
/System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLook (compatibility version 1.0.0, current version 327.4.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.29.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 15.0.0) @executable_path/../Frameworks/PESHandler.framework/Versions/A/PESHandler (compatibility version 1.0.0, current version 1.0.0) <== *this is my framework* /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
otool -D in my structure gives the following:
@executable_path/../Frameworks/PESHandler.framework/Versions/A/PESHandler
Framework does not require garbage collection.