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

Side by Side Diff: tools/grit/grit/tool/resize.py

Issue 6676030: WinDDK ATL and MSVC express compatability (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: common.gypi: use gyp defines instead of direct compiler flags; _SECURE_ATL conditional handling Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python2.4 1 #!/usr/bin/python2.4
2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2008 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 '''The 'grit resize' tool. 6 '''The 'grit resize' tool.
7 ''' 7 '''
8 8
9 import getopt 9 import getopt
10 import os 10 import os
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 # once and change it, then after you close it you won't be able to reopen it. 68 # once and change it, then after you close it you won't be able to reopen it.
69 RC_TEMPLATE = '''\ 69 RC_TEMPLATE = '''\
70 // Copyright (c) Google Inc. 2005 70 // Copyright (c) Google Inc. 2005
71 // All rights reserved. 71 // All rights reserved.
72 // This file is automatically generated by GRIT and intended for editing 72 // This file is automatically generated by GRIT and intended for editing
73 // the layout of the dialogs contained in it. Do not edit anything but the 73 // the layout of the dialogs contained in it. Do not edit anything but the
74 // dialogs. Any changes made to translateable portions of the dialogs will 74 // dialogs. Any changes made to translateable portions of the dialogs will
75 // be ignored by GRIT. 75 // be ignored by GRIT.
76 76
77 #include "resource.h" 77 #include "resource.h"
78 #include <winres.h>
79 #include <winresrc.h> 78 #include <winresrc.h>
79 #ifdef IDC_STATIC
80 #undef IDC_STATIC
81 #endif
82 #define IDC_STATIC (-1)
80 83
81 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 84 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
82 85
83 #pragma code_page([[CODEPAGE_NUM]]) 86 #pragma code_page([[CODEPAGE_NUM]])
84 87
85 [[INCLUDES]] 88 [[INCLUDES]]
86 89
87 [[DIALOGS]] 90 [[DIALOGS]]
88 ''' 91 '''
89 92
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 header_defines.append(formatter.Format(node, self.lang)) 294 header_defines.append(formatter.Format(node, self.lang))
292 header_text = HEADER_TEMPLATE.replace('[[DEFINES]]', ''.join(header_defines) ) 295 header_text = HEADER_TEMPLATE.replace('[[DEFINES]]', ''.join(header_defines) )
293 fname = os.path.join(dir_path, 'resource.h') 296 fname = os.path.join(dir_path, 'resource.h')
294 self.WriteFile(fname, header_text) 297 self.WriteFile(fname, header_text)
295 print "Wrote %s" % fname 298 print "Wrote %s" % fname
296 299
297 def WriteFile(self, filename, contents, encoding='cp1252'): 300 def WriteFile(self, filename, contents, encoding='cp1252'):
298 f = util.WrapOutputStream(file(filename, 'wb'), encoding) 301 f = util.WrapOutputStream(file(filename, 'wb'), encoding)
299 f.write(contents) 302 f.write(contents)
300 f.close() 303 f.close()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698