Leaked source code of windows server 2003
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.

223 lines
4.6 KiB

  1. #
  2. #
  3. # Description:
  4. #
  5. # Builds WinPE infs
  6. #
  7. # Author:
  8. #
  9. # Vijay Jayaseelan (vijayj@microsoft.com) 20 May 2001
  10. #
  11. # Revision:
  12. #
  13. #
  14. !IFNDEF LANGUAGE
  15. LANGUAGE=usa
  16. !ENDIF
  17. #
  18. # ANSI_CODEPAGE: ANSI codepage for a given language.
  19. #
  20. # LCID: Locale ID in hex.
  21. #
  22. # UNITEXT_OPT: Unitext.exe command line options to specify the ANSI codepage
  23. # for a given language. Used for Multibuyte -> Unicode conversion.
  24. #
  25. # Defaults
  26. ANSI_CODEPAGE=1252
  27. LCID=409
  28. !if "$(LANGUAGE)"=="ARA" || "$(LANGUAGE)"=="ara"
  29. # Arabic
  30. ANSI_CODEPAGE=1256
  31. LCID=401
  32. !elseif "$(LANGUAGE)"=="BR" || "$(LANGUAGE)"=="br"
  33. # Portuguese, Brazilian
  34. ANSI_CODEPAGE=1252
  35. LCID=416
  36. !elseif "$(LANGUAGE)"=="CHH" || "$(LANGUAGE)"=="chh"
  37. # Chinese, Traditional (Hong Kong)
  38. ANSI_CODEPAGE=950
  39. LCID=C04
  40. !elseif "$(LANGUAGE)"=="CHS" || "$(LANGUAGE)"=="chs"
  41. # Chinese, Simplified
  42. ANSI_CODEPAGE=936
  43. LCID=804
  44. !elseif "$(LANGUAGE)"=="CHT" || "$(LANGUAGE)"=="cht"
  45. # Chinese, Traditional (Taiwan)
  46. ANSI_CODEPAGE=950
  47. LCID=404
  48. !elseif "$(LANGUAGE)"=="CS" || "$(LANGUAGE)"=="cs"
  49. # Czech
  50. ANSI_CODEPAGE=1250
  51. LCID=405
  52. !elseif "$(LANGUAGE)"=="DA" || "$(LANGUAGE)"=="da"
  53. # Danish
  54. ANSI_CODEPAGE=1252
  55. LCID=406
  56. !elseif "$(LANGUAGE)"=="EL" || "$(LANGUAGE)"=="el"
  57. # Greek
  58. ANSI_CODEPAGE=1253
  59. LCID=408
  60. !elseif "$(LANGUAGE)"=="ES" || "$(LANGUAGE)"=="es"
  61. # Spanish
  62. ANSI_CODEPAGE=1252
  63. LCID=C0A
  64. !elseif "$(LANGUAGE)"=="FI" || "$(LANGUAGE)"=="fi"
  65. # Finish
  66. ANSI_CODEPAGE=1252
  67. LCID=40b
  68. !elseif "$(LANGUAGE)"=="FR" || "$(LANGUAGE)"=="fr"
  69. # French
  70. ANSI_CODEPAGE=1252
  71. LCID=40C
  72. !elseif "$(LANGUAGE)"=="GER" || "$(LANGUAGE)"=="ger"
  73. # German
  74. ANSI_CODEPAGE=1252
  75. LCID=407
  76. !elseif "$(LANGUAGE)"=="HEB" || "$(LANGUAGE)"=="heb"
  77. # Hebrew
  78. ANSI_CODEPAGE=1255
  79. LCID=40D
  80. !elseif "$(LANGUAGE)"=="HU" || "$(LANGUAGE)"=="hu"
  81. # Hungarian
  82. ANSI_CODEPAGE=1250
  83. LCID=40e
  84. !elseif "$(LANGUAGE)"=="IT" || "$(LANGUAGE)"=="it"
  85. # Italian
  86. ANSI_CODEPAGE=1252
  87. LCID=410
  88. !elseif "$(LANGUAGE)"=="JPN" || "$(LANGUAGE)"=="jpn"
  89. # Japanese
  90. ANSI_CODEPAGE=932
  91. LCID=411
  92. !elseif "$(LANGUAGE)"=="KOR" || "$(LANGUAGE)"=="kor"
  93. # Korean
  94. ANSI_CODEPAGE=949
  95. LCID=412
  96. !elseif "$(LANGUAGE)"=="NL" || "$(LANGUAGE)"=="nl"
  97. # Dutch
  98. ANSI_CODEPAGE=1252
  99. LCID=413
  100. !elseif "$(LANGUAGE)"=="NO" || "$(LANGUAGE)"=="no"
  101. # Norwegian
  102. ANSI_CODEPAGE=1252
  103. LCID=414
  104. !elseif "$(LANGUAGE)"=="PL" || "$(LANGUAGE)"=="pl"
  105. # Polish
  106. ANSI_CODEPAGE=1250
  107. LCID=415
  108. !elseif "$(LANGUAGE)"=="PSU" || "$(LANGUAGE)"=="psu"
  109. # Pseudo-loc
  110. ANSI_CODEPAGE=1253
  111. LCID=408
  112. !elseif "$(LANGUAGE)"=="PT" || "$(LANGUAGE)"=="pt"
  113. # Portuguese
  114. ANSI_CODEPAGE=1252
  115. LCID=816
  116. !elseif "$(LANGUAGE)"=="RU" || "$(LANGUAGE)"=="ru"
  117. # Russian
  118. ANSI_CODEPAGE=1251
  119. LCID=419
  120. !elseif "$(LANGUAGE)"=="SV" || "$(LANGUAGE)"=="sv"
  121. # Swedish
  122. ANSI_CODEPAGE=1252
  123. LCID=41D
  124. !elseif "$(LANGUAGE)"=="TR" || "$(LANGUAGE)"=="tr"
  125. # Turkish
  126. ANSI_CODEPAGE=1254
  127. LCID=41F
  128. !endif
  129. #
  130. # unicode conversion options
  131. #
  132. UNITEXT_OPT=-m -$(ANSI_CODEPAGE)
  133. #
  134. # Precompile flags
  135. #
  136. PREFLAGS=/DLANGUAGE_ID=0x0$(LCID) -nologo /EP
  137. !if $(PRERELEASE)
  138. PREFLAGS=/DPRERELEASE $(PREFLAGS)
  139. !endif
  140. _SRC=..
  141. _LNG=$(_SRC)\usa
  142. _INF=$(O)
  143. #
  144. # targets to build
  145. #
  146. make_infs: \
  147. $(O)\config.inf \
  148. $(O)\extra.inf \
  149. $(O)\winpesys.inf \
  150. $(O)\winpesft.inf \
  151. $(O)\winpedef.inf
  152. #
  153. # Can the below be optimized using rules ?
  154. #
  155. $(O)\config.inf:
  156. $(CC) $(PREFLAGS) $(_LNG)\$(@B).txt > $(O)\$(@B).txt
  157. $(CC) $(PREFLAGS) $(_SRC)\$(@B).inx > $(O)\$(@B).inx
  158. copy $(O)\$(@B).inx+$(O)\$(@B).txt $(O)\$(@B).tmp
  159. unitext $(UNITEXT_OPT) $(O)\$(@B).tmp $(O)\$(@B).inf
  160. $(O)\extra.inf:
  161. $(CC) $(PREFLAGS) $(_LNG)\$(@B).txt > $(O)\$(@B).txt
  162. $(CC) $(PREFLAGS) $(_SRC)\$(@B).inx > $(O)\$(@B).inx
  163. copy $(O)\$(@B).inx+$(O)\$(@B).txt $(O)\$(@B).tmp
  164. unitext $(UNITEXT_OPT) $(O)\$(@B).tmp $(O)\$(@B).inf
  165. $(O)\winpesys.inf:
  166. $(CC) $(PREFLAGS) $(_LNG)\$(@B).txt > $(O)\$(@B).txt
  167. $(CC) $(PREFLAGS) $(_SRC)\$(@B).inx > $(O)\$(@B).inx
  168. copy $(O)\$(@B).inx+$(O)\$(@B).txt $(O)\$(@B).tmp
  169. unitext $(UNITEXT_OPT) $(O)\$(@B).tmp $(O)\$(@B).inf
  170. $(O)\winpesft.inf:
  171. $(CC) $(PREFLAGS) $(_LNG)\$(@B).txt > $(O)\$(@B).txt
  172. $(CC) $(PREFLAGS) $(_SRC)\$(@B).inx > $(O)\$(@B).inx
  173. copy $(O)\$(@B).inx+$(O)\$(@B).txt $(O)\$(@B).tmp
  174. unitext $(UNITEXT_OPT) $(O)\$(@B).tmp $(O)\$(@B).inf
  175. $(O)\winpedef.inf:
  176. $(CC) $(PREFLAGS) $(_LNG)\$(@B).txt > $(O)\$(@B).txt
  177. $(CC) $(PREFLAGS) $(_SRC)\$(@B).inx > $(O)\$(@B).inx
  178. copy $(O)\$(@B).inx+$(O)\$(@B).txt $(O)\$(@B).tmp
  179. unitext $(UNITEXT_OPT) $(O)\$(@B).tmp $(O)\$(@B).inf