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

Unified Diff: tools/grit/build/grit_resource_file.bat

Issue 24011: chrome_resources take 2 (Closed)
Patch Set: rebase Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/views/tree_view.cc ('k') | tools/grit/build/grit_resources.rules » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/build/grit_resource_file.bat
diff --git a/tools/grit/build/grit_resource_file.bat b/tools/grit/build/grit_resource_file.bat
index 9769befdb717f2014ab47be92d9d81959c441dc9..bc5af2113a5850fd13aff54619e62cc3470da129 100644
--- a/tools/grit/build/grit_resource_file.bat
+++ b/tools/grit/build/grit_resource_file.bat
@@ -9,11 +9,24 @@ set InFile=%~1
set SolutionDir=%~2
set OutDir=%~3
+:: We treat the next five args as preprocessor defines for grit.
+set PreProc1=%~4
+set PreProc2=%~5
+set PreProc3=%~6
+set PreProc4=%~7
+set PreProc5=%~8
+
IF NOT EXIST %OutDir% (
mkdir %OutDir%
)
+IF NOT (%PreProc1%)==() set PreProc1=-D %PreProc1%
+IF NOT (%PreProc2%)==() set PreProc2=-D %PreProc2%
+IF NOT (%PreProc3%)==() set PreProc3=-D %PreProc3%
+IF NOT (%PreProc4%)==() set PreProc4=-D %PreProc4%
+IF NOT (%PreProc5%)==() set PreProc5=-D %PreProc5%
+
:: Put cygwin in the path
call %SolutionDir%\..\third_party\cygwin\setup_env.bat
-%SolutionDir%\..\third_party\python_24\python.exe %SolutionDir%\..\tools\grit\grit.py -i %InFile% build -o %OutDir%
+%SolutionDir%\..\third_party\python_24\python.exe %SolutionDir%\..\tools\grit\grit.py -i %InFile% build -o %OutDir% %PreProc1% %PreProc2% %PreProc3% %PreProc4% %PreProc5%
« no previous file with comments | « chrome/views/tree_view.cc ('k') | tools/grit/build/grit_resources.rules » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698