OLD | NEW |
| (Empty) |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 | |
6 import argparse | |
7 import os | |
8 import subprocess | |
9 import sys | |
10 | |
11 | |
12 def main(): | |
13 parser = argparse.ArgumentParser( | |
14 description='A script to compile xib and storyboard.', | |
15 fromfile_prefix_chars='@') | |
16 parser.add_argument('-o', '--output', required=True, | |
17 help='Path to output bundle.') | |
18 parser.add_argument('-i', '--input', required=True, | |
19 help='Path to input xib or storyboard.') | |
20 parser.add_argument('-m', '--minimum-deployment-target', required=True, | |
21 help='Minimum deployment target.') | |
22 args = parser.parse_args() | |
23 | |
24 subprocess.check_call([ | |
25 'xcrun', 'ibtool', '--errors', '--warnings', '--notices', | |
26 '--auto-activate-custom-fonts', '--target-device', 'iphone', | |
27 '--target-device', 'ipad', '--output-format', 'human-readable-text', | |
28 '--minimum-deployment-target', args.minimum_deployment_target, | |
29 '--compile', os.path.abspath(args.output), os.path.abspath(args.input), | |
30 ]) | |
31 | |
32 | |
33 if __name__ == '__main__': | |
34 sys.exit(main()) | |
OLD | NEW |