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.

150 lines
4.8 KiB

  1. @setlocal enableextensions
  2. @echo off
  3. if defined verbose echo on
  4. REM Notes:
  5. REM Currently, there is no nec98 specific version of ntprint.inf. If there
  6. REM were, it would be listed as such in setup\inf\win4\inf\makefile.inc
  7. REM Process command line switches
  8. for %%a in (./ .- .) do if ".%1." == "%%a?." goto Usage
  9. REM Validate architecture
  10. rem
  11. rem can't assume that the build host platform is the build type
  12. rem or that a single OS is built here
  13. rem
  14. if not defined BUILD_DEFAULT_TARGETS goto BDT_not_defined
  15. set NTPRINT_TARGETS=%BUILD_DEFAULT_TARGETS:-=%
  16. set NTPRINT_TARGETS=%NTPRINT_TARGETS:386=i386%
  17. set NTPRINT_TARGETS=%NTPRINT_TARGETS:x86=i386%
  18. goto ntprint_targets_defined
  19. :BDT_not_defined
  20. if /i "%processor_architecture%"=="x86" (
  21. set NTPRINT_TARGETS=i386
  22. ) else (
  23. if /i "%processor_architecture%"=="alpha" (
  24. set NTPRINT_TARGETS=alpha
  25. ) else (
  26. if /i "%processor_architecture%"=="axp64" (
  27. set NTPRINT_TARGETS=axp64
  28. ) else (
  29. if /i "%processor_architecture%"=="ia64" (
  30. set NTPRINT_TARGETS=ia64
  31. ) else (
  32. echo unknown architecture %processor_architecture%
  33. goto :ErrUnSupportedArchitecture
  34. ))))
  35. :ntprint_targets_defined
  36. if "%1"=="" goto :ErrMissingLanguage
  37. set langs=
  38. :langs_loop
  39. if "%1"=="" goto ok_langs
  40. if /i "%1"=="clean" set nmake_args=/a & shift & goto langs_loop
  41. set langs=%langs% %1
  42. shift
  43. goto langs_loop
  44. :ok_langs
  45. REM SD path
  46. set root=%_ntdrive%%_ntroot%\admin\ntsetup\inf\win4\inf\daytona
  47. if not exist %root%\ echo ERROR: %root% not found & goto end
  48. REM Build specified ntprint.infs
  49. for %%L in (%langs%) do (
  50. for %%f in (wks srv) do (
  51. call :buildntprintinf %%L %%f
  52. )
  53. echo.
  54. )
  55. goto :end
  56. REM Build one ntprint.inf
  57. :buildntprintinf
  58. set lang=%1
  59. set flavor=%2
  60. set dir=%root%\%lang%inf\%flavor%
  61. if not exist %dir% goto :WrnDirNotExist
  62. rem since we are recreating build.exe should check to see if in build_options
  63. rem if /i "%lang%" neq "usa" for /f %%a in ('echo "%build_options%" ^| findstr /iv %lang%inf') do goto :WrnNotListedInBuildOptions
  64. rem sigh, should really be part of build options if we build there but that exposes too many other issues
  65. rem like missing components in the inf structure
  66. pushd %dir%
  67. build -OZ
  68. for %%a in (%NTPRINT_TARGETS%) do (
  69. echo Building %dir%\obj\%%a\ntprint.inf
  70. nmake %nmake_args% -nologo obj\%%a\ntprint.inf
  71. )
  72. popd
  73. goto :EOF
  74. :usage
  75. echo Build Far East ntprint.inf files for US builds in support of world
  76. echo ready single binary testing. Since many FE-specific printer drivers
  77. echo release with every US build, testers find it convenient to install
  78. echo these drivers with the appropriate language version of ntprint.inf,
  79. echo all of which are found in the language subdirectories on US release
  80. echo shares.
  81. echo.
  82. echo This script is an interim measure that builds ntprint.inf but avoids
  83. echo building other international setup infs whose *.txt files are not
  84. echo updated to the current build level at the time the US builds are
  85. echo performed. In general, international setup infs are based on
  86. echo localized versions of the .txt files checked into the setup project
  87. echo and need to be built on the international build machines only after:
  88. echo 1) merging changes from inf\usa\*.txt into inf\^<fe lang^>\*.txt, and
  89. echo 2) localizing strings in inf\^<fe lang^>\*.txt
  90. echo.
  91. echo By not building international infs by default, developers and US
  92. echo builders do not incur the overhead of generating infs for wks, srv and
  93. echo enterprise for 5-7 international languages. This avoids breaks when
  94. echo a new inf is added to the US product but the international .txt files
  95. echo are not.
  96. echo.
  97. echo By keeping the international ntprint.inf files building under their
  98. echo respective languageINF subdirectories, they can still be rebuilt for
  99. echo localized builds in a manner common with other localized infs.
  100. echo.
  101. echo Contacts:
  102. echo FE printer files and ntprint.inf [eigos, takashim]
  103. echo International NT builds [matthoe]
  104. echo Add/del files in US NT product [vijeshs]
  105. echo Add/del files in FE NT products [scotthsu, wkwok]
  106. echo.
  107. echo Usage: %0 {jpn chs cht kor} [clean]
  108. echo ex: %0 jpn chs Builds jpn chs ntprint.inf
  109. echo ex: %0 jpn Builds jpn ntprint.inf
  110. echo ex: %0 jpn clean Builds jpn ntprint.inf even if up-to-date
  111. goto :end
  112. :WrnDirNotExist
  113. echo.
  114. echo Warning: %dir% does not exist
  115. goto :EOF
  116. :WrnNotListedInBuildOptions
  117. echo.
  118. echo Warning: %lang%inf is not in build_options; and will not run
  119. goto :EOF
  120. :ErrMissingLanguage
  121. echo.
  122. echo Error: Missing language(s)
  123. echo Aborting process...
  124. echo.
  125. goto usage
  126. :ErrUnSupportedArchitecture
  127. echo.
  128. echo Error: Unknown architecture %processor_architecture%
  129. echo Aborting process...
  130. echo.
  131. goto :end
  132. :end
  133. endlocal