OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """ | 6 """ |
7 package_ios.py - Build and Package Release and Rebug fat libraries for iOS. | 7 package_ios.py - Build and Package Release and Rebug fat libraries for iOS. |
8 """ | 8 """ |
9 | 9 |
10 import argparse | 10 import argparse |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 if build_result != 0: | 115 if build_result != 0: |
116 return build_result | 116 return build_result |
117 | 117 |
118 # Copy framework. | 118 # Copy framework. |
119 shutil.copytree(os.path.join(build_dir, 'Cronet.framework'), | 119 shutil.copytree(os.path.join(build_dir, 'Cronet.framework'), |
120 os.path.join(out_dir, target_dir, 'Cronet.framework')) | 120 os.path.join(out_dir, target_dir, 'Cronet.framework')) |
121 # Copy symbols. | 121 # Copy symbols. |
122 shutil.copytree(os.path.join(build_dir, 'Cronet.dSYM'), | 122 shutil.copytree(os.path.join(build_dir, 'Cronet.dSYM'), |
123 os.path.join(out_dir, target_dir, 'Cronet.framework.dSYM')) | 123 os.path.join(out_dir, target_dir, 'Cronet.framework.dSYM')) |
124 | 124 |
| 125 # Copy static library. |
| 126 shutil.copy2(os.path.join(build_dir, 'cronet', 'libcronet.a'), |
| 127 os.path.join(out_dir, target_dir)) |
| 128 |
125 # Copy common files from last built package. | 129 # Copy common files from last built package. |
126 package_dir = os.path.join(build_dir, 'cronet') | 130 package_dir = os.path.join(build_dir, 'cronet') |
127 shutil.copy2(os.path.join(package_dir, 'AUTHORS'), out_dir) | 131 shutil.copy2(os.path.join(package_dir, 'AUTHORS'), out_dir) |
128 shutil.copy2(os.path.join(package_dir, 'LICENSE'), out_dir) | 132 shutil.copy2(os.path.join(package_dir, 'LICENSE'), out_dir) |
129 shutil.copy2(os.path.join(package_dir, 'VERSION'), out_dir) | 133 shutil.copy2(os.path.join(package_dir, 'VERSION'), out_dir) |
130 # Copy the headers. | 134 # Copy the headers. |
131 shutil.copytree(os.path.join(build_dir, | 135 shutil.copytree(os.path.join(build_dir, |
132 'Cronet.framework', 'Headers'), | 136 'Cronet.framework', 'Headers'), |
133 os.path.join(out_dir, 'Headers')) | 137 os.path.join(out_dir, 'Headers')) |
134 print 'Cronet dynamic framework is packaged into %s' % out_dir | 138 print 'Cronet dynamic framework is packaged into %s' % out_dir |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 194 |
191 if options.gn: | 195 if options.gn: |
192 return package_ios_framework_using_gn(out_dir, extra_options_list) | 196 return package_ios_framework_using_gn(out_dir, extra_options_list) |
193 | 197 |
194 return package_ios(out_dir, "out/Release", "opt") or \ | 198 return package_ios(out_dir, "out/Release", "opt") or \ |
195 package_ios(out_dir, "out/Debug", "dbg") | 199 package_ios(out_dir, "out/Debug", "dbg") |
196 | 200 |
197 | 201 |
198 if __name__ == '__main__': | 202 if __name__ == '__main__': |
199 sys.exit(main()) | 203 sys.exit(main()) |
OLD | NEW |