Last active
August 29, 2015 14:17
-
-
Save brendanzagaeski/9acb258667be37b98270 to your computer and use it in GitHub Desktop.
Install path fixups for GTK# with Xamarin.Mac mmp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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