Skip to content

Instantly share code, notes, and snippets.

@brendanzagaeski
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendanzagaeski/9acb258667be37b98270 to your computer and use it in GitHub Desktop.
Save brendanzagaeski/9acb258667be37b98270 to your computer and use it in GitHub Desktop.
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