OLD | NEW |
1 :: Batch file run as build command for .grd files | 1 :: Batch file run as build command for .grd files |
2 :: The custom build rule is set to expect (inputfile).h and (inputfile).rc | 2 :: The custom build rule is set to expect (inputfile).h and (inputfile).rc |
3 :: our grd files must generate files with the same basename. | 3 :: our grd files must generate files with the same basename. |
4 @echo off | 4 @echo off |
5 | 5 |
6 setlocal | 6 setlocal |
7 | 7 |
8 set InFile=%~1 | 8 set InFile=%~1 |
9 set SolutionDir=%~2 | 9 set SolutionDir=%~2 |
10 set OutDir=%~3 | 10 set OutDir=%~3 |
11 | 11 |
| 12 :: We treat the next five args as preprocessor defines for grit. |
| 13 set PreProc1=%~4 |
| 14 set PreProc2=%~5 |
| 15 set PreProc3=%~6 |
| 16 set PreProc4=%~7 |
| 17 set PreProc5=%~8 |
| 18 |
12 IF NOT EXIST %OutDir% ( | 19 IF NOT EXIST %OutDir% ( |
13 mkdir %OutDir% | 20 mkdir %OutDir% |
14 ) | 21 ) |
15 | 22 |
| 23 IF NOT (%PreProc1%)==() set PreProc1=-D %PreProc1% |
| 24 IF NOT (%PreProc2%)==() set PreProc2=-D %PreProc2% |
| 25 IF NOT (%PreProc3%)==() set PreProc3=-D %PreProc3% |
| 26 IF NOT (%PreProc4%)==() set PreProc4=-D %PreProc4% |
| 27 IF NOT (%PreProc5%)==() set PreProc5=-D %PreProc5% |
| 28 |
16 :: Put cygwin in the path | 29 :: Put cygwin in the path |
17 call %SolutionDir%\..\third_party\cygwin\setup_env.bat | 30 call %SolutionDir%\..\third_party\cygwin\setup_env.bat |
18 | 31 |
19 %SolutionDir%\..\third_party\python_24\python.exe %SolutionDir%\..\tools\grit\gr
it.py -i %InFile% build -o %OutDir% | 32 %SolutionDir%\..\third_party\python_24\python.exe %SolutionDir%\..\tools\grit\gr
it.py -i %InFile% build -o %OutDir% %PreProc1% %PreProc2% %PreProc3% %PreProc4%
%PreProc5% |
OLD | NEW |