Copy link to clipboard
Copied
Hello,
after some months the first version of my plugin is finished and works fine on Windows. It uses Qt 5 and Adobe Illustrator SDK 2017. I just finished getting my plugin compiled on macOS but I have the problem that Adobe Illustrator won't load the plugin no matter what, although it works fine with the sample plugins. I am using the right Xcode version (7.3.1) and trying it out in Adobe Illustrator 2018 and 2019. I installed Qt through the Qt installer as version 5.11.2. Everything is x86_64: my macOS, my Adobe Illustrator.app (both) and my installed Qt. I know that it's probably due to some library/framework missing or mismatching versions as I run into this issue earlier on Windows. I tried both debug and release mode and always use macdeployqt on the resulting .aip file after compilation. Adobe Illustrator outputs nothing not even when I attach Xcode. As someone who is not that familiar with application development on macOS, how am I supposed to figure out what's the cause for that? Can someone maybe share an Xcode project (source files can be removed) of how it should look like with Qt?
Any help is really welcome!
Kind regards,
Sebbo
Okay, I figured it out. I started with removing every source file from my project and using only the Hello World file, changing target language from Objective-C++ to C++ and removing all Qt dependencies. Then the plugin loaded. Then I realized Objective-C++ had nothing to do with it and I changed it back. Then I only added QtCore.framework as dependency and figured out why it does not work: By default Xcode sets it as @rpath/QtCore.framework/Versions/5/QtCore. I started with changing it to my ab
...Copy link to clipboard
Copied
Still relevant.. 😕 I'd really appreciate any kind of help, since I am completely lost. Where should I start looking around? I tried everything but it simply does not load and without any error messages it will be hard to debug.
Copy link to clipboard
Copied
Okay, I figured it out. I started with removing every source file from my project and using only the Hello World file, changing target language from Objective-C++ to C++ and removing all Qt dependencies. Then the plugin loaded. Then I realized Objective-C++ had nothing to do with it and I changed it back. Then I only added QtCore.framework as dependency and figured out why it does not work: By default Xcode sets it as @rpath/QtCore.framework/Versions/5/QtCore. I started with changing it to my absolute Qt path with install_name_tool as described here and it worked.Then I added all my Qt dependencies, changed them to absolute path and the plugin also worked. Now for deployment: At first I wanted to change all plugins, but since they are already on @rpath by default, what I do now is cp them into my Plugin.aip/Contents/Frameworks directory and just add it as rpath via install_name_tool -add_rpath "@loader_path/../Frameworks" Plugin.aip/Contents/MacOS/Plugin. It is important to use @loader_path since @executable_path shows on the Adobe Illustrator executable I think.
Kinda long text, but I really hope I can help someone. I was lost several times on the road of developing an Adobe Illustrator plugin with Qt and nowadays it's way easier than it was some years ago. Also, if you cannot find QtMacExtras for QMacNativeWidget, you need to change your language to Objective C++, although I am currently not using the widget correctly I think.
Copy link to clipboard
Copied
Another short update for anyone else who is reading this maybe one or two years later and spending way too much time on figuring out some things: Now after compilation I only execute macdeployqt and execute install_name_tool -add-rpath "@loader_path/../Frameworks" "Plugin.aip/Contents/MacOS/Plugin" and it works fine. I had a problem where my plugin only ran on my own computer. This had to do with the plugins which are loaded at runtime, before initializing the QApllication you need to add the "Plugin.aip/Contents/PlugIns" path to the searched library paths via QCoreApplication::addLibraryPath().
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more