mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
move fix_dylibs.sh to /dev
This commit is contained in:
parent
036564f864
commit
336055634a
2 changed files with 2 additions and 2 deletions
24
dev/fix_dylibs.sh
Executable file
24
dev/fix_dylibs.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
PROJECT_NAME=$1
|
||||
CONFIG=$2
|
||||
OUTPUT_DIR=$3
|
||||
LIBS_DIR="$OUTPUT_DIR/libs"
|
||||
|
||||
mkdir -p "$LIBS_DIR"
|
||||
|
||||
TMP_BINARY="$OUTPUT_DIR/tmp_$PROJECT_NAME"
|
||||
BINARY="$OUTPUT_DIR/$PROJECT_NAME"
|
||||
|
||||
cp "$BINARY" "$TMP_BINARY"
|
||||
|
||||
otool -L "$TMP_BINARY" | grep -o '/.*dylib' | while read -r dylib; do
|
||||
if [[ "$dylib" == /usr/lib/* || "$dylib" == /System/Library/* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
cp "$dylib" "$LIBS_DIR"
|
||||
install_name_tool -change "$dylib" "@executable_path/libs/$(basename "$dylib")" "$TMP_BINARY"
|
||||
done
|
||||
|
||||
mv "$TMP_BINARY" "$BINARY"
|
||||
Loading…
Add table
Add a link
Reference in a new issue