Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: webrtc/build/ios/build_ios_libs.sh

Issue 2296613002: Delete talk directory, and references from build_ios_libs.sh. (Closed)
Patch Set: Update filenames for c -> c++ conversion. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/LICENSE_THIRD_PARTY ('k') | webrtc/build/ios/merge_ios_libs.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 # Copyright 2015 The WebRTC project authors. All Rights Reserved.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license 5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source 6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found 7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may 8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree. 9 # be found in the AUTHORS file in the root of the source tree.
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 fi 65 fi
66 local ninja_flavor_dir=${ninja_output_dir}/${flavor} 66 local ninja_flavor_dir=${ninja_output_dir}/${flavor}
67 67
68 # Compile framework by default. 68 # Compile framework by default.
69 local gyp_file=webrtc/sdk/sdk.gyp 69 local gyp_file=webrtc/sdk/sdk.gyp
70 local gyp_target=rtc_sdk_framework_objc 70 local gyp_target=rtc_sdk_framework_objc
71 # Set to 1 to explicitly not hide symbols. We'll want this if we're just 71 # Set to 1 to explicitly not hide symbols. We'll want this if we're just
72 # generating static libs. 72 # generating static libs.
73 local override_visibility=0 73 local override_visibility=0
74 if [[ ${build_type} = "legacy" ]]; then 74 if [[ ${build_type} = "legacy" ]]; then
75 echo "Building legacy." 75 echo "Building objc legacy libraries no longer supported."
76 gyp_file=webrtc/build/ios/merge_ios_libs.gyp 76 exit 1
77 gyp_target=libjingle_peerconnection_objc_no_op
78 override_visibility=1
79 elif [[ ${build_type} = "static_only" ]]; then 77 elif [[ ${build_type} = "static_only" ]]; then
80 echo "Building static only." 78 echo "Building static only."
81 gyp_file=webrtc/build/ios/merge_ios_libs.gyp 79 gyp_file=webrtc/build/ios/merge_ios_libs.gyp
82 gyp_target=rtc_sdk_peerconnection_objc_no_op 80 gyp_target=rtc_sdk_peerconnection_objc_no_op
83 override_visibility=1 81 override_visibility=1
84 elif [[ ${build_type} == "framework" ]]; then 82 elif [[ ${build_type} == "framework" ]]; then
85 echo "Building framework." 83 echo "Building framework."
86 else 84 else
87 echo "Unexpected build type: ${build_type}" 85 echo "Unexpected build type: ${build_type}"
88 exit 1 86 exit 1
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 fi 122 fi
125 } 123 }
126 124
127 function usage { 125 function usage {
128 echo "WebRTC iOS FAT libraries build script." 126 echo "WebRTC iOS FAT libraries build script."
129 echo "Each architecture is compiled separately before being merged together." 127 echo "Each architecture is compiled separately before being merged together."
130 echo "By default, the fat libraries will be created in out_ios_libs/fat_libs." 128 echo "By default, the fat libraries will be created in out_ios_libs/fat_libs."
131 echo "The headers will be copied to out_ios_libs/include." 129 echo "The headers will be copied to out_ios_libs/include."
132 echo "Usage: $0 [-h] [-b build_type] [-c] [-o output_dir]" 130 echo "Usage: $0 [-h] [-b build_type] [-c] [-o output_dir]"
133 echo " -h Print this help." 131 echo " -h Print this help."
134 echo " -b The build type. Can be framework, static_only or legacy." 132 echo " -b The build type. Can be framework or static_only."
135 echo " Defaults to framework." 133 echo " Defaults to framework."
136 echo " -c Removes generated build output." 134 echo " -c Removes generated build output."
137 echo " -o Specifies a directory to output build artifacts to." 135 echo " -o Specifies a directory to output build artifacts to."
138 echo " If specified together with -c, deletes the dir." 136 echo " If specified together with -c, deletes the dir."
139 echo " -r Specifies a revision number to embed if building the framework." 137 echo " -r Specifies a revision number to embed if building the framework."
140 exit 0 138 exit 0
141 } 139 }
142 140
143 check_preconditions 141 check_preconditions
144 142
145 # Set default arguments. 143 # Set default arguments.
146 # Output directory for build artifacts. 144 # Output directory for build artifacts.
147 OUTPUT_DIR=${WEBRTC_BASE_DIR}/out_ios_libs 145 OUTPUT_DIR=${WEBRTC_BASE_DIR}/out_ios_libs
148 # The type of build to perform. Valid arguments are framework, static_only and 146 # The type of build to perform. Valid arguments are framework and static_only.
149 # legacy.
150 BUILD_TYPE="framework" 147 BUILD_TYPE="framework"
151 PERFORM_CLEAN=0 148 PERFORM_CLEAN=0
152 FLAVOR="Profile" 149 FLAVOR="Profile"
153 POINT_VERSION="0" 150 POINT_VERSION="0"
154 # TODO(tkchin): Add ability to pass in a flag to build vp9. Odds are mobile 151 # TODO(tkchin): Add ability to pass in a flag to build vp9. Odds are mobile
155 # clients will not want it though because of the higher CPU usage. 152 # clients will not want it though because of the higher CPU usage.
156 LIBVPX_BUILD_VP9=0 153 LIBVPX_BUILD_VP9=0
157 154
158 # Parse arguments. 155 # Parse arguments.
159 while getopts "hb:co:r:" opt; do 156 while getopts "hb:co:r:" opt; do
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ${INFOPLIST_PATH}) 220 ${INFOPLIST_PATH})
224 VERSION_NUMBER="${MAJOR_MINOR}.${POINT_VERSION}" 221 VERSION_NUMBER="${MAJOR_MINOR}.${POINT_VERSION}"
225 echo "Substituting revision number: ${VERSION_NUMBER}" 222 echo "Substituting revision number: ${VERSION_NUMBER}"
226 PlistBuddy -c "Set :CFBundleVersion ${VERSION_NUMBER}" ${INFOPLIST_PATH} 223 PlistBuddy -c "Set :CFBundleVersion ${VERSION_NUMBER}" ${INFOPLIST_PATH}
227 plutil -convert binary1 ${INFOPLIST_PATH} 224 plutil -convert binary1 ${INFOPLIST_PATH}
228 225
229 # Copy pod file. 226 # Copy pod file.
230 FORMAT_STRING=s/\${FRAMEWORK_VERSION_NUMBER}/${VERSION_NUMBER}/g 227 FORMAT_STRING=s/\${FRAMEWORK_VERSION_NUMBER}/${VERSION_NUMBER}/g
231 sed -e ${FORMAT_STRING} ${WEBRTC_BASE_DIR}/webrtc/sdk/objc/WebRTC.podspec > \ 228 sed -e ${FORMAT_STRING} ${WEBRTC_BASE_DIR}/webrtc/sdk/objc/WebRTC.podspec > \
232 ${OUTPUT_DIR}/WebRTC.podspec 229 ${OUTPUT_DIR}/WebRTC.podspec
233 else 230 elif [[ ${BUILD_TYPE} = "static_only" ]]; then
234 echo "Merging static library slices." 231 echo "Merging static library slices."
235 # Merge the static libraries together into individual FAT archives. 232 # Merge the static libraries together into individual FAT archives.
236 ${MERGE_SCRIPT} ${OUTPUT_DIR} 233 ${MERGE_SCRIPT} ${OUTPUT_DIR}
237 234
238 # Merge the dSYM files together. 235 # Merge the dSYM files together.
239 TARGET_NAME="rtc_sdk_peerconnection_objc_no_op" 236 TARGET_NAME="rtc_sdk_peerconnection_objc_no_op"
240 if [[ ${BUILD_TYPE} = "legacy" ]]; then
241 TARGET_NAME="libjingle_peerconnection_objc_no_op"
242 fi
243 DSYM_PATH="${TARGET_NAME}.app.dSYM/Contents/Resources/DWARF/${TARGET_NAME}" 237 DSYM_PATH="${TARGET_NAME}.app.dSYM/Contents/Resources/DWARF/${TARGET_NAME}"
244 cp -R ${ARM_NINJA_DIR}/${TARGET_NAME}.app.dSYM ${OUTPUT_DIR} 238 cp -R ${ARM_NINJA_DIR}/${TARGET_NAME}.app.dSYM ${OUTPUT_DIR}
245 echo "Merging dSYM slices." 239 echo "Merging dSYM slices."
246 lipo ${ARM_NINJA_DIR}/${DSYM_PATH} \ 240 lipo ${ARM_NINJA_DIR}/${DSYM_PATH} \
247 ${ARM64_NINJA_DIR}/${DSYM_PATH} \ 241 ${ARM64_NINJA_DIR}/${DSYM_PATH} \
248 ${IA32_NINJA_DIR}/${DSYM_PATH} \ 242 ${IA32_NINJA_DIR}/${DSYM_PATH} \
249 ${X64_NINJA_DIR}/${DSYM_PATH} \ 243 ${X64_NINJA_DIR}/${DSYM_PATH} \
250 -create -output ${OUTPUT_DIR}/${DSYM_PATH} 244 -create -output ${OUTPUT_DIR}/${DSYM_PATH}
251 245
252 # Strip debugging symbols. 246 # Strip debugging symbols.
253 # TODO(tkchin): Override chromium settings in supplement.gypi instead to do 247 # TODO(tkchin): Override chromium settings in supplement.gypi instead to do
254 # stripping at build time. 248 # stripping at build time.
255 echo "Stripping debug symbols." 249 echo "Stripping debug symbols."
256 strip -S ${OUTPUT_DIR}/fat_libs/*.a 250 strip -S ${OUTPUT_DIR}/fat_libs/*.a
257 251
258 # Symlink the headers. 252 # Symlink the headers.
259 echo "Symlinking headers." 253 echo "Symlinking headers."
260 INPUT_HEADER_DIR="${WEBRTC_BASE_DIR}/webrtc/sdk/objc/Framework/Headers/WebRTC" 254 INPUT_HEADER_DIR="${WEBRTC_BASE_DIR}/webrtc/sdk/objc/Framework/Headers/WebRTC"
261 OUTPUT_HEADER_DIR="${OUTPUT_DIR}/include" 255 OUTPUT_HEADER_DIR="${OUTPUT_DIR}/include"
262 if [[ -d ${OUTPUT_HEADER_DIR} ]]; then 256 if [[ -d ${OUTPUT_HEADER_DIR} ]]; then
263 rm -rf ${OUTPUT_HEADER_DIR} 257 rm -rf ${OUTPUT_HEADER_DIR}
264 fi 258 fi
265 if [[ ${BUILD_TYPE} = "legacy" ]]; then 259 mkdir -p ${OUTPUT_HEADER_DIR}
266 INPUT_HEADER_DIR="${WEBRTC_BASE_DIR}/talk/app/webrtc/objc/public" 260 ln -sf ${INPUT_HEADER_DIR} ${OUTPUT_HEADER_DIR}/WebRTC
267 ln -sf ${INPUT_HEADER_DIR} ${OUTPUT_HEADER_DIR} 261 else
268 else 262 echo "BUILD_TYPE ${BUILD_TYPE} not supported."
269 mkdir -p ${OUTPUT_HEADER_DIR} 263 exit 1
270 ln -sf ${INPUT_HEADER_DIR} ${OUTPUT_HEADER_DIR}/WebRTC
271 fi
272 fi 264 fi
273 265
274 echo "Generating LICENSE.html." 266 echo "Generating LICENSE.html."
275 ${LICENSE_SCRIPT} ${OUTPUT_DIR}/arm64_libs ${OUTPUT_DIR} 267 ${LICENSE_SCRIPT} ${OUTPUT_DIR}/arm64_libs ${OUTPUT_DIR}
276 268
277 echo "Done!" 269 echo "Done!"
OLDNEW
« no previous file with comments | « webrtc/LICENSE_THIRD_PARTY ('k') | webrtc/build/ios/merge_ios_libs.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698