OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (C) 2011 Google Inc. All rights reserved. | 3 # Copyright (C) 2011 Google Inc. All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 import errno | 36 import errno |
37 import os | 37 import os |
38 import shlex | 38 import shlex |
39 import shutil | 39 import shutil |
40 import sys | 40 import sys |
41 from xml.dom import minidom | 41 from xml.dom import minidom |
42 | 42 |
43 kDevToolsResourcePrefix = 'IDR_DEVTOOLS_' | 43 kDevToolsResourcePrefix = 'IDR_DEVTOOLS_' |
44 kGrdTemplate = '''<?xml version="1.0" encoding="UTF-8"?> | 44 kGrdTemplate = '''<?xml version="1.0" encoding="UTF-8"?> |
45 <grit latest_public_release="0" current_release="1"> | 45 <grit latest_public_release="0" current_release="1" |
| 46 output_all_resource_defines="false"> |
46 <outputs> | 47 <outputs> |
47 <output filename="grit/devtools_resources.h" type="rc_header"> | 48 <output filename="grit/devtools_resources.h" type="rc_header"> |
48 <emit emit_type='prepend'></emit> | 49 <emit emit_type='prepend'></emit> |
49 </output> | 50 </output> |
50 <output filename="grit/devtools_resources_map.cc" type="resource_file_map_so
urce" /> | 51 <output filename="grit/devtools_resources_map.cc" type="resource_file_map_so
urce" /> |
51 <output filename="grit/devtools_resources_map.h" type="resource_map_header"
/> | 52 <output filename="grit/devtools_resources_map.h" type="resource_map_header"
/> |
52 | 53 |
53 <output filename="devtools_resources.pak" type="data_package" /> | 54 <output filename="devtools_resources.pak" type="data_package" /> |
54 </outputs> | 55 </outputs> |
55 <release seq="1"> | 56 <release seq="1"> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 shutil.copy(path.join(dirname, filename), | 162 shutil.copy(path.join(dirname, filename), |
162 path.join(output_directory, 'Images')) | 163 path.join(output_directory, 'Images')) |
163 add_file_to_grd(doc, path.join('Images', filename)) | 164 add_file_to_grd(doc, path.join('Images', filename)) |
164 | 165 |
165 with open(parsed_args.output_filename, 'w') as output_file: | 166 with open(parsed_args.output_filename, 'w') as output_file: |
166 output_file.write(doc.toxml(encoding='UTF-8')) | 167 output_file.write(doc.toxml(encoding='UTF-8')) |
167 | 168 |
168 | 169 |
169 if __name__ == '__main__': | 170 if __name__ == '__main__': |
170 sys.exit(main(sys.argv)) | 171 sys.exit(main(sys.argv)) |
OLD | NEW |