From cb561599e809c862c0420e6ff3b34fb24affd89a Mon Sep 17 00:00:00 2001 From: Leo Dion Date: Wed, 25 Oct 2017 13:52:15 -0400 Subject: [PATCH] fixing dylib installation --- Speculid.xcodeproj/project.pbxproj | 2 +- install_dylib.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Speculid.xcodeproj/project.pbxproj b/Speculid.xcodeproj/project.pbxproj index 0edd9954..e4503acd 100644 --- a/Speculid.xcodeproj/project.pbxproj +++ b/Speculid.xcodeproj/project.pbxproj @@ -1444,7 +1444,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#otool -L \"$TARGET_BUILD_DIR/$EXECUTABLE_PATH\"\n\n\"$SRCROOT/install_dylib.sh\" /usr/local/opt/librsvg/lib/librsvg-2.2.dylib\n\"$SRCROOT/install_dylib.sh\" /usr/lib/libSystem.B.dylib\n\"$SRCROOT/install_dylib.sh\" /usr/local/opt/glib/lib/libgio-2.0.0.dylib\n\"$SRCROOT/install_dylib.sh\" /usr/local/opt/gdk-pixbuf/lib/libgdk_pixbuf-2.0.0.dylib\n\"$SRCROOT/install_dylib.sh\" /usr/local/opt/glib/lib/libgobject-2.0.0.dylib\n\"$SRCROOT/install_dylib.sh\" /usr/local/opt/glib/lib/libglib-2.0.0.dylib\n\"$SRCROOT/install_dylib.sh\" /usr/local/opt/gettext/lib/libintl.8.dylib\n\"$SRCROOT/install_dylib.sh\" /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation\n\"$SRCROOT/install_dylib.sh\" /usr/local/opt/cairo/lib/libcairo.2.dylib\n\"$SRCROOT/install_dylib.sh\" /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation\n\"$SRCROOT/install_dylib.sh\" /usr/lib/libobjc.A.dylib\n\n\"$SRCROOT/codesign-framework.sh\""; + shellScript = "DYLIBS=`otool -L \"$TARGET_BUILD_DIR/$EXECUTABLE_PATH\" | grep \"/opt\" | awk -F' ' '{ print $1 }'`\nfor dylib in $DYLIBS; do install -m 755 $dylib \"$TARGET_BUILD_DIR\"; done;\nfor dylib in $DYLIBS; do install_name_tool -change $dylib @executable_path/`basename $dylib` \"$TARGET_BUILD_DIR/$EXECUTABLE_PATH\"; done;"; }; B37C74B71F8C5CB500DF505B /* ShellScript */ = { isa = PBXShellScriptBuildPhase; diff --git a/install_dylib.sh b/install_dylib.sh index 7d91de7a..65777d46 100755 --- a/install_dylib.sh +++ b/install_dylib.sh @@ -12,4 +12,6 @@ mkdir -p "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH" cp -f $1 "$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH" -install_name_tool -change $1 "@executable_path/../Frameworks/$DYLIB" "$TARGET_BUILD_DIR/$EXECUTABLE_PATH" +install_name_tool -change $1 "$FRAMEWORKS_FOLDER_PATH/$DYLIB" "$TARGET_BUILD_DIR/$EXECUTABLE_PATH" + +echo "Installing $DYLIB to $FRAMEWORKS_FOLDER_PATH/$DYLIB"