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

Side by Side Diff: talk/build/build_ios_libs.sh

Issue 1673503002: Update build_ios_libs.sh script to build new Objective-C API (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | talk/build/headers.txt » ('j') | talk/build/merge_ios_libs.gyp » ('J')
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 # libjingle 3 # libjingle
4 # Copyright 2015 Google Inc. 4 # Copyright 2015 Google Inc.
5 # 5 #
6 # Redistribution and use in source and binary forms, with or without 6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met: 7 # modification, are permitted provided that the following conditions are met:
8 # 8 #
9 # 1. Redistributions of source code must retain the above copyright notice, 9 # 1. Redistributions of source code must retain the above copyright notice,
10 # this list of conditions and the following disclaimer. 10 # this list of conditions and the following disclaimer.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 echo "Failed to find gyp generator." >&2 45 echo "Failed to find gyp generator." >&2
46 exit 1 46 exit 1
47 fi 47 fi
48 # Check for merge script. 48 # Check for merge script.
49 MERGE_SCRIPT=${SCRIPT_DIR}/merge_ios_libs 49 MERGE_SCRIPT=${SCRIPT_DIR}/merge_ios_libs
50 if [[ ! -x ${MERGE_SCRIPT} ]]; then 50 if [[ ! -x ${MERGE_SCRIPT} ]]; then
51 echo "Failed to find library merging script." >&2 51 echo "Failed to find library merging script." >&2
52 exit 1 52 exit 1
53 fi 53 fi
54 54
55 # Check for list of header files.
56 HEADERS=${SCRIPT_DIR}/headers.txt
57 if [[ ! -e ${HEADERS} ]]; then
58 echo "Failed to find list of headers." >&2
59 exit 1
60 fi
61
55 pushd ${WEBRTC_BASE_DIR} 62 pushd ${WEBRTC_BASE_DIR}
56 LIBRARY_BASE_DIR="out_ios_libs" 63 LIBRARY_BASE_DIR="out_ios_libs"
57 64
58 function build_webrtc { 65 function build_webrtc {
59 OUTPUT_DIR=$1 66 OUTPUT_DIR=$1
60 FLAVOR=$2 67 FLAVOR=$2
61 TARGET_ARCH=$3 68 TARGET_ARCH=$3
62 TARGET_SUBARCH=$4
63 if [[ ${TARGET_ARCH} = 'arm' || ${TARGET_ARCH} = 'arm64' ]]; then 69 if [[ ${TARGET_ARCH} = 'arm' || ${TARGET_ARCH} = 'arm64' ]]; then
64 FLAVOR="${FLAVOR}-iphoneos" 70 FLAVOR="${FLAVOR}-iphoneos"
65 else 71 else
66 FLAVOR="${FLAVOR}-iphonesimulator" 72 FLAVOR="${FLAVOR}-iphonesimulator"
67 fi 73 fi
68 export GYP_DEFINES="OS=ios target_arch=${TARGET_ARCH} clang_xcode=1" 74 export GYP_DEFINES="OS=ios target_arch=${TARGET_ARCH} clang_xcode=1"
69 export GYP_GENERATORS="ninja" 75 export GYP_GENERATORS="ninja"
70 export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}" 76 export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}"
71 webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp 77 webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp
72 ninja -C ${OUTPUT_DIR}/${FLAVOR} libjingle_peerconnection_objc_no_op 78 ninja -C ${OUTPUT_DIR}/${FLAVOR} libjingle_peerconnection_objc_no_op
73 mkdir -p ${LIBRARY_BASE_DIR}/${TARGET_ARCH} 79 mkdir -p ${LIBRARY_BASE_DIR}/${TARGET_ARCH}
74 mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH} 80 mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH}
75 } 81 }
76 82
83 function copy_headers {
84 LIST_OF_HEADERS=$1
85 INCLUDE_BASE_DIR=$2
86 while read -r HEADER_PATH || [[ -n "$HEADER_PATH" ]]; do
87 ditto ${HEADER_PATH} ${INCLUDE_BASE_DIR}/${HEADER_PATH}
88 done < ${LIST_OF_HEADERS}
89 }
90
77 # Build all the common architectures. 91 # Build all the common architectures.
78 build_webrtc "out_ios_arm" "Release" "arm" 92 build_webrtc "out_ios_arm" "Release" "arm"
79 build_webrtc "out_ios_arm64" "Release" "arm64" 93 build_webrtc "out_ios_arm64" "Release" "arm64"
80 build_webrtc "out_ios_ia32" "Release" "ia32" 94 build_webrtc "out_ios_ia32" "Release" "ia32"
81 build_webrtc "out_ios_x86_64" "Release" "x64" 95 build_webrtc "out_ios_x86_64" "Release" "x64"
82 96
97 # Copy header files.
98 copy_headers ${HEADERS} ${LIBRARY_BASE_DIR}/include
tkchin_webrtc 2016/02/05 15:57:59 Can we do this in a .py instead? And place both th
hjon_webrtc 2016/02/10 21:41:15 Done.
99
83 popd 100 popd
84 101
85 # Merge the libraries together. 102 # Merge the libraries together.
86 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} 103 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR}
OLDNEW
« no previous file with comments | « no previous file | talk/build/headers.txt » ('j') | talk/build/merge_ios_libs.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698