Browse Source

Fix Mac dependencies for libs depending on libs.

pull/4/head
David Dawes 6 years ago
parent
commit
c71c99237b
  1. 17
      makeReleaseMac.sh

17
makeReleaseMac.sh

@ -38,20 +38,31 @@ do
DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'` DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
echo "copying indirect $DYLIBS to $KMD_DIR" echo "copying indirect $DYLIBS to $KMD_DIR"
# copy the dylibs to the dest dir # copy the dylibs to the dest dir
for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=(i$dylib); done for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); done
done done
for binary in "${binaries[@]}"; for binary in "${binaries[@]}";
do do
# modify komodod to point to dylibs # modify komodod to point to dylibs
echo "modifying $binary to use local libraries" echo "modifying $binary to use local libraries"
i=0
for dylib in "${alllibs[@]}" for dylib in "${alllibs[@]}"
do do
let i=i+1
echo "Next lib is $dylib " echo "Next lib is $dylib "
install_name_tool -change $dylib @executable_path/`basename $dylib` $KMD_DIR/$binary
done
chmod +x $KMD_DIR/$binary
done
for binary in "${libraries[@]}";
do
# modify libraries to point to dylibs
echo "modifying $binary to use local libraries"
for dylib in "${alllibs[@]}"
do
echo "Next lib is $dylib "
install_name_tool -change $dylib @executable_path/`basename $dylib` $KMD_DIR/$binary install_name_tool -change $dylib @executable_path/`basename $dylib` $KMD_DIR/$binary
done done
chmod +x $KMD_DIR/$binary chmod +x $KMD_DIR/$binary
done done

Loading…
Cancel
Save