Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
09a238e0
Commit
09a238e0
authored
Sep 07, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EmbedFrameworksScript] Alias the full frameworks path
parent
e1f96726
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
embed_frameworks_script.rb
lib/cocoapods/generator/embed_frameworks_script.rb
+12
-12
No files found.
lib/cocoapods/generator/embed_frameworks_script.rb
View file @
09a238e0
...
@@ -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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment