-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add addDylib function similar to addFramework #320
Comments
Hello @ofTheo I'm wondering if maybe it is best avoid copying dylibs to inside the app for now. I've tried to use install_name_tool to simplify, so all libs could work in the same folder, but there are some libraries that calls other ones by this kind of relative paths, so there is not an easy way to solve it automatically. I can comment out the "copy files" phase if you agree |
Hmm.
Without those changes does ofxHap work without issue?
I’d love to either fix it or find any easy way to toggle it off.
Is there an easy reproducible example I can try?
Thanks!!
Theo
|
Hey @dimitre I just tied ofxHapPlayer and I think in this case we should probably ask @bangnoise to have the path be @executable_path/dylibName.dylib or even @rpath/dylibName.dylib now that we are bundling the dylibs in the app. However with how it is right now adding this to the osx Xcode scripts makes it work in and out of the app ( thanks chatgpt : )
could you see if that works for you? Note: the above will probably solve 80-90% of dylib issues with the more involved OF_BUNDLE_DYLIBS for the more extreme cases. Also note: we should prob do cc @artificiel |
@ofTheo after a while I could get it running with your script. Yes we should do this before code sign:
but I confirm it works. |
Thanks @dimitre! Weird that you had to change the Copy Files I thought dylibs were getting copied to Where were they getting copied to for you? |
Yes they are being copied to this directory but then I have this error
so I'm wondering if executable path is "bin" folder only, because it works if I change to that. |
oh weird - it shouldn't be setting it to could you try changing the script lines to:
or
|
from xcode. I'll be testing this soon |
We use a similar script approach for ofxTensorFlow2: https://github.com/zkmkarlsruhe/ofxTensorFlow2/blob/main/scripts/macos_install_libs.sh UPDATE: We install to |
We have to double check to see if it is now copying over in latest PG |
For macOS/iOS Xcode
Currently addons with dylibs cause projects to fail to run as the dlyibs are not copied into the Bundle.
We should add a function similar to addFramework so dylibs are not just linked but added to the Copy File Build Phase.
Good reference here for how to do that:
https://github.com/openframeworks/projectGenerator/blob/master/ofxProjectGenerator/src/projects/xcodeProject.cpp#L422-L509
The text was updated successfully, but these errors were encountered: