OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Tool for automatically creating .nmf files from .nexe/.pexe executables. | 6 """Tool for automatically creating .nmf files from .nexe/.pexe executables. |
7 | 7 |
8 As well as creating the nmf file this tool can also find and stage | 8 As well as creating the nmf file this tool can also find and stage |
9 any shared libraries dependencies that the executables might have. | 9 any shared libraries dependencies that the executables might have. |
10 """ | 10 """ |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 parser.error('Bad --extra-files (-x) argument syntax') | 575 parser.error('Bad --extra-files (-x) argument syntax') |
576 | 576 |
577 remap = {} | 577 remap = {} |
578 for ren in options.name: | 578 for ren in options.name: |
579 parts = ren.split(',') | 579 parts = ren.split(',') |
580 if len(parts) != 2: | 580 if len(parts) != 2: |
581 parser.error('Expecting --name=<orig_arch.so>,<new_name.so>') | 581 parser.error('Expecting --name=<orig_arch.so>,<new_name.so>') |
582 remap[parts[0]] = parts[1] | 582 remap[parts[0]] = parts[1] |
583 | 583 |
584 if options.path_prefix: | 584 if options.path_prefix: |
585 sys.stderr.write('warning: option -P/--path-prefix is deprecated.\n') | |
586 options.lib_prefix = options.path_prefix | 585 options.lib_prefix = options.path_prefix |
587 | 586 |
588 for libpath in options.lib_path: | 587 for libpath in options.lib_path: |
589 if not os.path.exists(libpath): | 588 if not os.path.exists(libpath): |
590 sys.stderr.write('Specified library path does not exist: %s\n' % libpath) | 589 sys.stderr.write('Specified library path does not exist: %s\n' % libpath) |
591 elif not os.path.isdir(libpath): | 590 elif not os.path.isdir(libpath): |
592 sys.stderr.write('Specified library is not a directory: %s\n' % libpath) | 591 sys.stderr.write('Specified library is not a directory: %s\n' % libpath) |
593 | 592 |
594 if not options.no_default_libpath: | 593 if not options.no_default_libpath: |
595 # Add default libraries paths to the end of the search path. | 594 # Add default libraries paths to the end of the search path. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 if __name__ == '__main__': | 634 if __name__ == '__main__': |
636 try: | 635 try: |
637 rtn = main(sys.argv[1:]) | 636 rtn = main(sys.argv[1:]) |
638 except Error, e: | 637 except Error, e: |
639 sys.stderr.write('%s: %s\n' % (os.path.basename(__file__), e)) | 638 sys.stderr.write('%s: %s\n' % (os.path.basename(__file__), e)) |
640 rtn = 1 | 639 rtn = 1 |
641 except KeyboardInterrupt: | 640 except KeyboardInterrupt: |
642 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) | 641 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) |
643 rtn = 1 | 642 rtn = 1 |
644 sys.exit(rtn) | 643 sys.exit(rtn) |
OLD | NEW |