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
7e70269b
Commit
7e70269b
authored
Aug 13, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EmbedFrameworksScript] Support dylibs
parent
6f3230b3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
12 deletions
+20
-12
embed_frameworks_script.rb
lib/cocoapods/generator/embed_frameworks_script.rb
+10
-7
installer.rb
lib/cocoapods/installer.rb
+1
-4
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+1
-1
file_accessor.rb
lib/cocoapods/sandbox/file_accessor.rb
+8
-0
No files found.
lib/cocoapods/generator/embed_frameworks_script.rb
View file @
7e70269b
...
@@ -34,7 +34,7 @@ module Pod
...
@@ -34,7 +34,7 @@ module Pod
# @return [String] The contents of the embed frameworks script.
# @return [String] The contents of the embed frameworks script.
#
#
def
script
def
script
script
=
<<-
eos
.
strip_heredoc
script
=
<<-
SH
.
strip_heredoc
#!/bin/sh
#!/bin/sh
set -e
set -e
...
@@ -65,8 +65,11 @@ module Pod
...
@@ -65,8 +65,11 @@ module Pod
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}" "${destination}"
local basename
local basename
basename="$(basename
"$1" | sed -E s/
\\\\
..+// && exit ${PIPESTATUS[0]}
)"
basename="$(basename
-s .framework "$1"
)"
binary="${destination}/${basename}.framework/${basename}"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
...
@@ -114,15 +117,15 @@ module Pod
...
@@ -114,15 +117,15 @@ module Pod
fi
fi
}
}
eos
SH
script
+=
"
\n
"
unless
frameworks_by_config
.
values
.
all?
(
&
:empty?
)
script
<<
"
\n
"
unless
frameworks_by_config
.
values
.
all?
(
&
:empty?
)
frameworks_by_config
.
each
do
|
config
,
frameworks
|
frameworks_by_config
.
each
do
|
config
,
frameworks
|
unless
frameworks
.
empty?
unless
frameworks
.
empty?
script
+=
%(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
script
<<
%(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
frameworks
.
each
do
|
framework
|
frameworks
.
each
do
|
framework
|
script
+=
" install_framework '
#{
framework
}
'
\n
"
script
<<
" install_framework '
#{
framework
}
'
\n
"
end
end
script
+=
"fi
\n
"
script
<<
"fi
\n
"
end
end
end
end
script
script
...
...
lib/cocoapods/installer.rb
View file @
7e70269b
...
@@ -417,10 +417,7 @@ module Pod
...
@@ -417,10 +417,7 @@ module Pod
dependencies
=
pod_targets
.
select
(
&
:should_build?
).
flat_map
(
&
:dependencies
)
dependencies
=
pod_targets
.
select
(
&
:should_build?
).
flat_map
(
&
:dependencies
)
dependended_upon_targets
=
pod_targets
.
select
{
|
t
|
dependencies
.
include?
(
t
.
pod_name
)
&&
!
t
.
should_build?
}
dependended_upon_targets
=
pod_targets
.
select
{
|
t
|
dependencies
.
include?
(
t
.
pod_name
)
&&
!
t
.
should_build?
}
static_libs
=
dependended_upon_targets
.
flat_map
(
&
:file_accessors
).
flat_map
do
|
fa
|
static_libs
=
dependended_upon_targets
.
flat_map
(
&
:file_accessors
).
flat_map
(
&
:vendored_static_artifacts
)
fa
.
vendored_static_libraries
+
fa
.
vendored_static_frameworks
end
unless
static_libs
.
empty?
unless
static_libs
.
empty?
raise
Informative
,
"The '
#{
aggregate_target
.
label
}
' target has "
\
raise
Informative
,
"The '
#{
aggregate_target
.
label
}
' target has "
\
"transitive dependencies that include static binaries: (
#{
static_libs
.
to_sentence
}
)"
"transitive dependencies that include static binaries: (
#{
static_libs
.
to_sentence
}
)"
...
...
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
7e70269b
...
@@ -148,7 +148,7 @@ module Pod
...
@@ -148,7 +148,7 @@ module Pod
pod_target
.
include_in_build_config?
(
target_definition
,
config
)
pod_target
.
include_in_build_config?
(
target_definition
,
config
)
end
end
frameworks_by_config
[
config
]
=
relevant_pod_targets
.
flat_map
do
|
pod_target
|
frameworks_by_config
[
config
]
=
relevant_pod_targets
.
flat_map
do
|
pod_target
|
frameworks
=
pod_target
.
file_accessors
.
flat_map
(
&
:vendored_dynamic_
framework
s
).
map
{
|
fw
|
"${PODS_ROOT}/
#{
fw
.
relative_path_from
(
sandbox
.
root
)
}
"
}
frameworks
=
pod_target
.
file_accessors
.
flat_map
(
&
:vendored_dynamic_
artifact
s
).
map
{
|
fw
|
"${PODS_ROOT}/
#{
fw
.
relative_path_from
(
sandbox
.
root
)
}
"
}
frameworks
<<
"
#{
target_definition
.
label
}
/
#{
pod_target
.
product_name
}
"
if
pod_target
.
should_build?
&&
pod_target
.
requires_frameworks?
frameworks
<<
"
#{
target_definition
.
label
}
/
#{
pod_target
.
product_name
}
"
if
pod_target
.
should_build?
&&
pod_target
.
requires_frameworks?
frameworks
frameworks
end
end
...
...
lib/cocoapods/sandbox/file_accessor.rb
View file @
7e70269b
...
@@ -207,6 +207,14 @@ module Pod
...
@@ -207,6 +207,14 @@ module Pod
vendored_libraries
-
vendored_dynamic_libraries
vendored_libraries
-
vendored_dynamic_libraries
end
end
def
vendored_dynamic_artifacts
vendored_dynamic_libraries
+
vendored_dynamic_frameworks
end
def
vendored_static_artifacts
vendored_static_libraries
+
vendored_static_frameworks
end
# @return [Hash{String => Array<Pathname>}] A hash that describes the
# @return [Hash{String => Array<Pathname>}] A hash that describes the
# resource bundles of the Pod. The keys represent the name of
# resource bundles of the Pod. The keys represent the name of
# the bundle while the values the path of the resources.
# the bundle while the values the path of the resources.
...
...
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