Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install path fixups for GTK# with Xamarin.Mac mmp
#!/bin/sh
cp /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdk_pixbuf-2.0.0.dylib "$1/Contents/MonoBundle/"
cp /Library/Frameworks/Mono.framework/Versions/Current/lib/libgio-2.0.0.dylib "$1/Contents/MonoBundle/"
cp /Library/Frameworks/Mono.framework/Versions/Current/lib/libgmodule-2.0.0.dylib "$1/Contents/MonoBundle/"
cp /Library/Frameworks/Mono.framework/Versions/Current/lib/libffi.6.dylib "$1/Contents/MonoBundle/"
cp /Library/Frameworks/Mono.framework/Versions/Current/lib/libxml2.2.dylib "$1/Contents/MonoBundle/"
find $1 -name "*.config" | while read FILE; do
sed -i "" 's:/Library/Frameworks/Mono.framework/Versions/3.12.1/lib/:@executable_path/../MonoBundle/:' "$FILE";
done
find $1 -name "*.dylib" -or -name "*.so" | while read FILE; do
otool -L "$FILE" |
grep Mono\.framework |
sed 's/\s*//' | sed 's/ .*//' | while read LIB; do
install_name_tool -change "$LIB" '@executable_path/../MonoBundle/'"${LIB##*/}" "$FILE";
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.