Commit 09a238e0 authored by Marius Rackwitz's avatar Marius Rackwitz

[EmbedFrameworksScript] Alias the full frameworks path

parent e1f96726
...@@ -38,8 +38,10 @@ module Pod ...@@ -38,8 +38,10 @@ module Pod
#!/bin/sh #!/bin/sh
set -e set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" FRAMEWORKS_DIR="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "mkdir -p ${FRAMEWORKS_DIR}"
mkdir -p "${FRAMEWORKS_DIR}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
...@@ -53,22 +55,20 @@ module Pod ...@@ -53,22 +55,20 @@ module Pod
local source="$1" local source="$1"
fi fi
local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then if [ -L "${source}" ]; then
echo "Symlinked..." echo "Symlinked..."
source="$(readlink "${source}")" source="$(readlink "${source}")"
fi fi
# use filter instead of exclude so missing patterns dont' throw errors # use filter instead of exclude so missing patterns dont' throw errors
echo "rsync -av --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" --filter \\"- Headers\\" --filter \\"- PrivateHeaders\\" --filter \\"- Modules\\" \\"${source}\\" \\"${destination}\\"" echo "rsync -av --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" --filter \\"- Headers\\" --filter \\"- PrivateHeaders\\" --filter \\"- Modules\\" \\"${source}\\" \\"${FRAMEWORKS_DIR}\\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${FRAMEWORKS_DIR}"
local basename local basename
basename="$(basename -s .framework "$1")" basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}" binary="${FRAMEWORKS_DIR}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then if ! [ -r "$binary" ]; then
binary="${destination}/${basename}" binary="${FRAMEWORKS_DIR}/${basename}"
fi fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device # Strip invalid architectures so "fat" simulator / device frameworks work on device
...@@ -77,15 +77,15 @@ module Pod ...@@ -77,15 +77,15 @@ module Pod
fi fi
# Resign the code if required by the build settings to avoid unstable apps # Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")" code_sign_if_enabled "${FRAMEWORKS_DIR}/$(basename "$1")"
# Embed linked Swift runtime libraries # Embed linked Swift runtime libraries
local swift_runtime_libs local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\\\/\\(.+dylib\\).*/\\\\1/g | uniq -u && exit ${PIPESTATUS[0]}) swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\\\/\\(.+dylib\\).*/\\\\1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do for lib in $swift_runtime_libs; do
echo "rsync -auv \\"${SWIFT_STDLIB_PATH}/${lib}\\" \\"${destination}\\"" echo "rsync -auv \\"${SWIFT_STDLIB_PATH}/${lib}\\" \\"${FRAMEWORKS_DIR}\\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${FRAMEWORKS_DIR}"
code_sign_if_enabled "${destination}/${lib}" code_sign_if_enabled "${FRAMEWORKS_DIR}/${lib}"
done done
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment