summaryrefslogtreecommitdiffstats
path: root/tools/grit/build
diff options
context:
space:
mode:
Diffstat (limited to 'tools/grit/build')
-rw-r--r--tools/grit/build/grit_resource_file.bat15
-rw-r--r--tools/grit/build/grit_resource_file.rules103
2 files changed, 118 insertions, 0 deletions
diff --git a/tools/grit/build/grit_resource_file.bat b/tools/grit/build/grit_resource_file.bat
new file mode 100644
index 0000000..3be0231
--- /dev/null
+++ b/tools/grit/build/grit_resource_file.bat
@@ -0,0 +1,15 @@
+:: Batch file run as build command for .grd files
+:: The custom build rule is set to expect (inputfile).h and (inputfile).rc
+:: our grd files must generate files with the same basename.
+@echo off
+
+setlocal
+
+set InFile=%~1
+set SolutionDir=%~2
+set InputDir=%~3
+
+:: Use GNU tools
+call %SolutionDir%\..\third_party\gnu\setup_env.bat
+
+%SolutionDir%\..\third_party\python_24\python.exe %SolutionDir%\..\tools\grit\grit.py -i %InFile% build -o %InputDir%
diff --git a/tools/grit/build/grit_resource_file.rules b/tools/grit/build/grit_resource_file.rules
new file mode 100644
index 0000000..5ab70f5
--- /dev/null
+++ b/tools/grit/build/grit_resource_file.rules
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<VisualStudioToolFile
+ Name="GRIT resource data file"
+ Version="8.00"
+ >
+ <Rules>
+ <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)_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)_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)_ko.rc;
+ $(IntDir)\$(InputName)_lt.rc;
+ $(IntDir)\$(InputName)_lv.rc;
+ $(IntDir)\$(InputName)_nl.rc;
+ $(IntDir)\$(InputName)_nb.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)_th.rc;
+ $(IntDir)\$(InputName)_tr.rc;
+ $(IntDir)\$(InputName)_uk.rc;
+ $(IntDir)\$(InputName)_vi.rc;
+ $(IntDir)\$(InputName)_zh-CN.rc;
+ $(IntDir)\$(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;
+ resources\$(InputName)_ca.xtb;
+ resources\$(InputName)_cs.xtb;
+ resources\$(InputName)_da.xtb;
+ resources\$(InputName)_de.xtb;
+ resources\$(InputName)_el.xtb;
+ resources\$(InputName)_en-GB.xtb;
+ resources\$(InputName)_es.xtb;
+ resources\$(InputName)_es-419.xtb;
+ resources\$(InputName)_et.xtb;
+ resources\$(InputName)_fi.xtb;
+ resources\$(InputName)_fil.xtb;
+ resources\$(InputName)_fr.xtb;
+ resources\$(InputName)_he.xtb;
+ resources\$(InputName)_hi.xtb;
+ resources\$(InputName)_hr.xtb;
+ resources\$(InputName)_hu.xtb;
+ resources\$(InputName)_id.xtb;
+ resources\$(InputName)_it.xtb;
+ resources\$(InputName)_ja.xtb;
+ resources\$(InputName)_ko.xtb;
+ resources\$(InputName)_lt.xtb;
+ resources\$(InputName)_lv.xtb;
+ resources\$(InputName)_nl.xtb;
+ resources\$(InputName)_no.xtb;
+ resources\$(InputName)_pl.xtb;
+ resources\$(InputName)_pt-BR.xtb;
+ resources\$(InputName)_pt-PT.xtb;
+ resources\$(InputName)_ro.xtb;
+ resources\$(InputName)_ru.xtb;
+ resources\$(InputName)_sk.xtb;
+ resources\$(InputName)_sl.xtb;
+ resources\$(InputName)_sr.xtb;
+ resources\$(InputName)_sv.xtb;
+ resources\$(InputName)_th.xtb;
+ resources\$(InputName)_tr.xtb;
+ resources\$(InputName)_uk.xtb;
+ resources\$(InputName)_vi.xtb;
+ resources\$(InputName)_zh-CN.xtb;
+ resources\$(InputName)_zh-TW.xtb;"
+ FileExtensions="*.grd"
+ ExecutionDescription="Generating resources..."
+ >
+ <Properties>
+ </Properties>
+ </CustomBuildRule>
+ </Rules>
+</VisualStudioToolFile>