Re: Custom component fails to load images by name in a IBPlugin
Re: Custom component fails to load images by name in a IBPlugin
- Subject: Re: Custom component fails to load images by name in a IBPlugin
- From: "Dalzhim Dalzhim" <email@hidden>
- Date: Tue, 23 Sep 2008 13:23:52 -0400
Hello everyone,
after working some more to get the dynamic loading of the plugin from linked-in frameworks to work properly I have found a working solution. Here are the details in case anyone else ever has the same problem I had.
In order to get the plugin to find the framework we need to modify the path to the framework in the ibplugin's executable by adding the following run script build phase at the end of the plugin target:
/usr/bin/install_name_tool -change \
'@loader_path/../Frameworks/MyFramework.framework/Versions/A/MyFramework' \
'@loader_path/../../../../../../../MyFramework.framework/Versions/A/MyFramework' \
"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"
This way, it is only when we are using the ibplugin at this path is being used, and other clients of the framework such as the main application will still use the original @loader_path/../Frameworks installation directory to locate the framework.
The only issue that I still have with this solution is that the plugin target now references a hardcoded path to MyFramework.framework/Versions/A/MyFramework instead of using the symbolic link MyFramework.framework/MyFramework. I have tried adding a run script build phase to the framework target to apply that change using install_name_tool without success. I have tried doing the same thing on the command line as well and it doesn't seem to work. Anyone knows how I could make sure the ${EXECUTABLE_PATH} uses the symbolic links rather than the hardcoded version path?
regards
-Dalzhim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden