summaryrefslogtreecommitdiffstats
path: root/tools/grit
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 22:17:35 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 22:17:35 +0000
commita34134678d6b2b048da627ef3105af312404a808 (patch)
tree498124b779b6e377b1275d18613062f0eb1436bb /tools/grit
parentafce7a16a03691a072164fb681d7c5a444121002 (diff)
downloadchromium_src-a34134678d6b2b048da627ef3105af312404a808.zip
chromium_src-a34134678d6b2b048da627ef3105af312404a808.tar.gz
chromium_src-a34134678d6b2b048da627ef3105af312404a808.tar.bz2
Have GRIT generate files into a common directory.
Joi has convinced me that GRIT should generate platform specific resources files. This is easier than parsing .rc files because GRIT effectively has an .rc parser. To that end, we need to convert some existing .rc files to .grd files (e.g., net_resources.rc and webkit_resources.rc). Rather than having every grd file output to a different place and -I all the different paths, have GRIT generate all files into one directory. This directory is grit_derived_sources. Review URL: http://codereview.chromium.org/13776 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/grit')
-rw-r--r--tools/grit/build/grit_resource_file.bat8
-rw-r--r--tools/grit/build/grit_resource_file.rules104
2 files changed, 58 insertions, 54 deletions
diff --git a/tools/grit/build/grit_resource_file.bat b/tools/grit/build/grit_resource_file.bat
index 7853212..9769bef 100644
--- a/tools/grit/build/grit_resource_file.bat
+++ b/tools/grit/build/grit_resource_file.bat
@@ -7,9 +7,13 @@ setlocal
set InFile=%~1
set SolutionDir=%~2
-set InputDir=%~3
+set OutDir=%~3
+
+IF NOT EXIST %OutDir% (
+mkdir %OutDir%
+)
:: 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 %InputDir%
+%SolutionDir%\..\third_party\python_24\python.exe %SolutionDir%\..\tools\grit\grit.py -i %InFile% build -o %OutDir%
diff --git a/tools/grit/build/grit_resource_file.rules b/tools/grit/build/grit_resource_file.rules
index d180c35..2f9e7f9 100644
--- a/tools/grit/build/grit_resource_file.rules
+++ b/tools/grit/build/grit_resource_file.rules
@@ -7,58 +7,58 @@
<CustomBuildRule
Name="GRIT Generated Resources"
DisplayName="GRIT Generated Resources"
- CommandLine="$(SolutionDir)..\tools\grit\build\grit_resource_file.bat [inputs] &quot;$(SolutionDir)&quot; &quot;$(IntDir)&quot;"
- Outputs="$(IntDir)\$(InputName).h;
- $(IntDir)\$(InputName)_ar.rc;
- $(IntDir)\$(InputName)_bg.rc;
- $(IntDir)\$(InputName)_bn.rc;
- $(IntDir)\$(InputName)_ca.rc;
- $(IntDir)\$(InputName)_cs.rc;
- $(IntDir)\$(InputName)_da.rc;
- $(IntDir)\$(InputName)_de.rc;
- $(IntDir)\$(InputName)_el.rc;
- $(IntDir)\$(InputName)_en-GB.rc;
- $(IntDir)\$(InputName)_en-US.rc;
- $(IntDir)\$(InputName)_es.rc;
- $(IntDir)\$(InputName)_es-419.rc;
- $(IntDir)\$(InputName)_et.rc;
- $(IntDir)\$(InputName)_fi.rc;
- $(IntDir)\$(InputName)_fil.rc;
- $(IntDir)\$(InputName)_fr.rc;
- $(IntDir)\$(InputName)_gu.rc;
- $(IntDir)\$(InputName)_he.rc;
- $(IntDir)\$(InputName)_hi.rc;
- $(IntDir)\$(InputName)_hr.rc;
- $(IntDir)\$(InputName)_hu.rc;
- $(IntDir)\$(InputName)_id.rc;
- $(IntDir)\$(InputName)_it.rc;
- $(IntDir)\$(InputName)_ja.rc;
- $(IntDir)\$(InputName)_kn.rc;
- $(IntDir)\$(InputName)_ko.rc;
- $(IntDir)\$(InputName)_lt.rc;
- $(IntDir)\$(InputName)_lv.rc;
- $(IntDir)\$(InputName)_ml.rc;
- $(IntDir)\$(InputName)_mr.rc;
- $(IntDir)\$(InputName)_nl.rc;
- $(IntDir)\$(InputName)_nb.rc;
- $(IntDir)\$(InputName)_or.rc;
- $(IntDir)\$(InputName)_pl.rc;
- $(IntDir)\$(InputName)_pt-BR.rc;
- $(IntDir)\$(InputName)_pt-PT.rc;
- $(IntDir)\$(InputName)_ro.rc;
- $(IntDir)\$(InputName)_ru.rc;
- $(IntDir)\$(InputName)_sk.rc;
- $(IntDir)\$(InputName)_sl.rc;
- $(IntDir)\$(InputName)_sr.rc;
- $(IntDir)\$(InputName)_sv.rc;
- $(IntDir)\$(InputName)_ta.rc;
- $(IntDir)\$(InputName)_te.rc;
- $(IntDir)\$(InputName)_th.rc;
- $(IntDir)\$(InputName)_tr.rc;
- $(IntDir)\$(InputName)_uk.rc;
- $(IntDir)\$(InputName)_vi.rc;
- $(IntDir)\$(InputName)_zh-CN.rc;
- $(IntDir)\$(InputName)_zh-TW.rc;"
+ CommandLine="$(SolutionDir)..\tools\grit\build\grit_resource_file.bat [inputs] &quot;$(SolutionDir)&quot; &quot;$(OutDir)\grit_derived_sources&quot;"
+ Outputs="$(OutDir)\grit_derived_sources\$(InputName).h;
+ $(OutDir)\grit_derived_sources\$(InputName)_ar.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_bg.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_bn.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_ca.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_cs.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_da.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_de.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_el.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_en-GB.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_en-US.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_es.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_es-419.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_et.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_fi.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_fil.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_fr.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_gu.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_he.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_hi.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_hr.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_hu.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_id.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_it.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_ja.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_kn.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_ko.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_lt.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_lv.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_ml.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_mr.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_nl.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_nb.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_or.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_pl.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_pt-BR.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_pt-PT.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_ro.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_ru.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_sk.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_sl.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_sr.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_sv.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_ta.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_te.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_th.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_tr.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_uk.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_vi.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_zh-CN.rc;
+ $(OutDir)\grit_derived_sources\$(InputName)_zh-TW.rc;"
AdditionalDependencies="$(SolutionDir)..\tools\grit\build\grit_resource_file.bat;$(SolutionDir)..\tools\grit\grit.py;
resources\$(InputName)_ar.xtb;
resources\$(InputName)_bg.xtb;