Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
7.5 KiB

  1. @echo off
  2. setlocal
  3. rem
  4. rem Batch file for taking base Tripoli build and localizing it for Japanese
  5. rem
  6. set DLLNOBINGEN=idq query
  7. set DLLNAME=cistp htmlfilt infosoft KPPP KPPP7 KPW6 KPWORD KPXL5 QPerf SCCFA SCCFI sccifilt SCCUT nlgwbrkr
  8. set EXENAME=cidaemon install webhits
  9. set URLNAME=ISAdmin ISDoc ISQuery ISReadme
  10. set PERFINI=perfci perffilt perfwci
  11. set PERFH=ciperfm filtperf perfwci
  12. set LANG=noise.dat noise.deu noise.eng noise.enu noise.esn noise.fra noise.ita noise.jpn noise.nld noise.sve wbcache.deu wbcache.eng wbcache.enu wbcache.esn wbcache.fra wbcache.ita wbcache.nld wbcache.sve wbdbase.deu wbdbase.eng wbdbase.enu wbdbase.esn wbdbase.fra wbdbase.ita wbdbase.nld wbdbase.sve
  13. set SAMPBIN=32x_book.jpg 64x_book.jpg bestwith.gif book08.jpg home.gif powrbybo.gif qhitspat.gif
  14. set SAMPHTM=admin.htm author.htm disclaim.htm filesize.htm filetime.htm query.htm queryhit.htm readme.htm
  15. set SAMPHTX=admin.htx deferror.htx detail1.htx detail2.htx detail3.htx detail4.htx format1.htx format2.htx format3.htx format4.htx hquery.htx head.htx hidden.htx htxerror.htx idqerror.htx next.htx prev.htx qfullhit.htw qsumrhit.htw query.htx queryhit.htx reserror.htx scan.htx sformat1.htx sformat2.htx sformat3.htx sformat4.htx snext.htx stail.htx state.htx shead.htx tail.htx unfilt.htx
  16. set SAMPIDQ=admin.ida admin.idq author.idq filesize.idq filetime.idq hquery.idq merge.ida query.idq queryhit.idq scan.ida scan.idq simple.idq state.ida unfilt.idq
  17. set HELPBIN=active2.gif active6.gif active6a.gif active7.gif backgrd.gif bullet.gif idx_logo.gif next.gif onepix.gif powered.gif previous.gif toc.gif up.gif up_end.gif xag_e19.gif
  18. set HELPHTM=adminhlp.htm cathlp.htm default.htm errhandl.htm errorhlp.htm faq.htm filtrhlp.htm front.htm glossary.htm htxhelp.htm idq-vars.htm idqhelp.htm indexhlp.htm install.htm intro.htm license.htm qrylang.htm queryhlp.htm reghelp.htm scanhlp.htm sechelp.htm tipshelp.htm webhits.htm
  19. set TXTFILES=license.txt setupci.inf
  20. rem
  21. rem Parse arguments
  22. rem
  23. :loop
  24. if "%1" == "" goto gotargs
  25. if "%1" == "-binaries" set QBINARIES=%2& shift & shift & goto loop
  26. if "%1" == "-tokens" set QTOKENS=%2& shift & shift & goto loop
  27. if "%1" == "-text" set QTEXT=%2& shift & shift & goto loop
  28. if "%1" == "-help" set QHELP=%2& shift & shift & goto loop
  29. if "%1" == "-samples" set QSAMPLES=%2& shift & shift & goto loop
  30. if "%1" == "-dest" set QDEST=%2& shift & shift & goto loop
  31. goto noargs
  32. :gotargs
  33. cls
  34. echo BINARIES: %QBINARIES%
  35. echo TOKENS: %QTOKENS%
  36. echo TEXT: %QTEXT%
  37. echo HELP: %QHELP%
  38. echo SAMPLES: %QSAMPLES%
  39. echo DESTINATION: %QDEST%
  40. echo .
  41. echo .
  42. echo Checking validity of locations...
  43. for %%f in (%DLLNAME%) do if not exist %QBINARIES%\%%f.dll set dirfault=-binaries& set missing=%%f.dll& goto baddir
  44. for %%f in (%EXENAME%) do if not exist %QBINARIES%\%%f.exe set dirfault=-binaries& set missing=%%f.exe& goto baddir
  45. for %%f in (%URLNAME%) do if not exist %QBINARIES%\%%f.url set dirfault=-binaries& set missing=%%f.url& goto baddir
  46. for %%f in (%LANG%) do if not exist %QBINARIES%\Lang\%%f if not exist %QBINARIES%\%%f set dirfault=-binaries& set missing=%%f& goto baddir
  47. for %%f in (%SAMPBIN%) do if not exist %QBINARIES%\Sample\%%f if not exist %QBINARIES%\%%f set dirfault=-binaries& set missing=%%f& goto baddir
  48. for %%f in (%SAMPHTM%) do if not exist %QBINARIES%\Sample\%%f if not exist %QBINARIES%\%%f set dirfault=-binaries& set missing=%%f& goto baddir
  49. for %%f in (%SAMPHTX%) do if not exist %QBINARIES%\Sample\%%f if not exist %QBINARIES%\%%f set dirfault=-binaries& set missing=%%f& goto baddir
  50. for %%f in (%SAMPIDQ%) do if not exist %QBINARIES%\Sample\%%f if not exist %QBINARIES%\%%f set dirfault=-binaries& set missing=%%f& goto baddir
  51. for %%f in (%DLLNAME%) do if not exist %QTOKENS%\%%f.dl_ set dirfault=-tokens& set missing=%%f.dl_& goto baddir
  52. for %%f in (%EXENAME%) do if not exist %QTOKENS%\%%f.ex_ set dirfault=-tokens& set missing=%%f.ex_& goto baddir
  53. for %%f in (%TXTFILES%) do if not exist %QTEXT%\%%f set dirfault=-text& set missing=%%f& goto baddir
  54. for %%f in (%PERFINI%) do if not exist %QTEXT%\%%f.ini set dirfault=-text& set missing=%%f.ini& goto baddir
  55. for %%f in (%PERFH%) do if not exist %QBINARIES%\%%f.h if not exist %QBINARIES%\Perf\%%f.h set dirfault=-text& set missing=%%f.ini& goto baddir
  56. for %%f in (%HELPBIN%) do if not exist %QHELP%\%%f set dirfault=-help& set missing=%%f& goto baddir
  57. for %%f in (%HELPHTM%) do if not exist %QHELP%\%%f set dirfault=-help& set missing=%%f& goto baddir
  58. if not exist %QSAMPLES%\query.htx set dirfault=-samples& goto baddir
  59. echo Creating and cleaning output directory structure...
  60. md %QDEST% 1>nul 2>nul
  61. md %QDEST%\help 1>nul 2>nul
  62. md %QDEST%\sample 1>nul 2>nul
  63. md %QDEST%\lang 1>nul 2>nul
  64. md %QDEST%\perf 1>nul 2>nul
  65. echo y|del %QDEST%\*.* 1>nul 2>nul
  66. echo y|del %QDEST%\help\*.* 1>nul 2>nul
  67. echo y|del %QDEST%\sample\*.* 1>nul 2>nul
  68. echo y|del %QDEST%\lang\*.* 1>nul 2>nul
  69. echo y|del %QDEST%\perf\*.* 1>nul 2>nul
  70. copy %QTEXT%\perfwci.ini %QDEST%\perf 1>nul 2>nul
  71. if not exist %QDEST%\perf\perfwci.ini set dirfault=-dest& goto baddir
  72. echo Replacing resources...
  73. for %%f in (%DLLNAME%) do bingen -i 9 1 -o 17 1 -w -f -r %QBINARIES%\%%f.dll %QTOKENS%\%%f.dl_ %QDEST%\%%f.dll 2>&1 | findstr -i dll | findstr -v Processing
  74. for %%f in (%EXENAME%) do bingen -i 9 1 -o 17 1 -w -f -r %QBINARIES%\%%f.exe %QTOKENS%\%%f.ex_ %QDEST%\%%f.exe 2>&1 | findstr -i exe | findstr -v Processing
  75. echo Copying miscellaneous files...
  76. for %%f in (%URLNAME%) do copy %QBINARIES%\%%f.url %QDEST% 1>nul
  77. for %%f in (%DLLNOBINGEN%) do copy %QBINARIES%\%%f.dll %QDEST% 1>nul
  78. for %%f in (%TXTFILES%) do copy %QTEXT%\%%f %QDEST% 1>nul
  79. echo Copying performance counter files...
  80. for %%f in (%PERFINI%) do copy %QTEXT%\%%f.ini %QDEST%\Perf 1>nul
  81. for %%f in (%PERFH%) do if exist %QBINARIES%\Perf\%%f.h copy %QBINARIES%\Perf\%%f.h %QDEST%\Perf 1>nul
  82. for %%f in (%PERFH%) do if exist %QBINARIES%\%%f.h copy %QBINARIES%\%%f.h %QDEST%\Perf 1>nul
  83. echo Copying language resources...
  84. for %%f in (%LANG%) do if exist %QBINARIES%\Lang\%%f copy %QBINARIES%\Lang\%%f %QDEST%\Lang 1>nul
  85. for %%f in (%LANG%) do if exist %QBINARIES%\%%f copy %QBINARIES%\%%f %QDEST%\Lang 1>nul
  86. echo Copying documentation...
  87. for %%f in (%HELPBIN%) do if exist %QBINARIES%\%%f copy %QBINARIES%\%%f %QDEST%\Help 1>nul
  88. for %%f in (%HELPBIN%) do if exist %QBINARIES%\Help\%%f copy %QBINARIES%\Help\%%f %QDEST%\Help 1>nul
  89. for %%f in (%HELPBIN%) do if exist %QHELP%\%%f copy %QHELP%\%%f %QDEST%\HELP 1>nul
  90. for %%f in (%HELPHTM%) do copy %QHELP%\%%f %QDEST%\HELP 1>nul
  91. echo Copying samples...
  92. for %%f in (%SAMPBIN%) do if exist %QBINARIES%\Sample\%%f copy %QBINARIES%\Sample\%%f %QDEST%\Sample 1>nul
  93. for %%f in (%SAMPBIN%) do if exist %QBINARIES%\%%f copy %QBINARIES%\%%f %QDEST%\Sample 1>nul
  94. for %%f in (%SAMPHTM%) do if exist %QBINARIES%\Sample\%%f copy %QBINARIES%\Sample\%%f %QDEST%\Sample 1>nul
  95. for %%f in (%SAMPHTM%) do if exist %QBINARIES%\%%f copy %QBINARIES%\%%f %QDEST%\Sample 1>nul
  96. for %%f in (%SAMPHTX%) do if exist %QBINARIES%\Sample\%%f copy %QBINARIES%\Sample\%%f %QDEST%\Sample 1>nul
  97. for %%f in (%SAMPHTX%) do if exist %QBINARIES%\%%f copy %QBINARIES%\%%f %QDEST%\Sample 1>nul
  98. for %%f in (%SAMPIDQ%) do if exist %QBINARIES%\Sample\%%f copy %QBINARIES%\Sample\%%f %QDEST%\Sample 1>nul
  99. for %%f in (%SAMPIDQ%) do if exist %QBINARIES%\%%f copy %QBINARIES%\%%f %QDEST%\Sample 1>nul
  100. goto end
  101. :noargs
  102. echo Missing arguments
  103. goto Usage
  104. :baddir
  105. echo Bad directory for %dirfault% parameter. File %missing% is missing.
  106. goto end
  107. :Usage
  108. echo Usage: Trip-J [-binaries dir] [-tokens dir] [-text dir] [-help dir] [-samples dir]
  109. echo [-destination dir]
  110. goto end
  111. :end