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.

168 lines
3.7 KiB

  1. setlocal
  2. if "%CPUBIN%"=="i386" set MYSTDDEFINE=
  3. if not "%CPUBIN%"=="i386" set MYSTDDEFINE=
  4. call cl /nologo /EP /Zs %MYSTDDEFINE% .\WMDMCore.inx >.\WMDMCore.inf
  5. @echo off
  6. set verbose=0
  7. if "%1" == "/v" set verbose=1
  8. if "%1" == "/V" set verbose=1
  9. if "%1" == "-v" set verbose=1
  10. if "%1" == "-V" set verbose=1
  11. if %verbose%==1 echo on
  12. REM ***************************
  13. REM Added by Praveen 01/09/01
  14. REM ***************************
  15. set _REL_DIR=%_NTx86TREE%\WMDMRelease\%_BUILDTYPE%
  16. set DRMVERDIR=..\drmver\obj\i386
  17. set IEXPRESSDIR=..\iexpress
  18. REM ****************************
  19. set releasepoint=%_REL_DIR%
  20. set dumpdir=WMDMCore
  21. set exefile=WMDMCore.exe
  22. set exename=WMDMCore
  23. set home=%cd%
  24. set CONTROLFILE=%_REL_DIR%\%dumpdir%\control.ini
  25. set COUNT=1
  26. echo. > %CONTROLFILE%
  27. rem
  28. rem Prep the target directory
  29. rem
  30. echo Building %exefile% setup for releasepoint %releasepoint%
  31. @mkdir %releasepoint%\.. >nul 2>nul
  32. @mkdir %releasepoint% >nul 2>nul
  33. @mkdir %releasepoint%\%dumpdir% >nul 2>nul
  34. echo.
  35. echo Collect the files
  36. echo.
  37. mkdir obj >nul 2>nul
  38. del obj\checkrel.out >nul 2>nul
  39. rmdir /s/q temp
  40. mkdir temp
  41. call files.bat CAB
  42. if %verbose%==1 echo on
  43. dir /s temp | qgrep -e "Total of" > obj\checkrel2.out
  44. set categories=Install
  45. set root=%home%\temp
  46. echo.
  47. echo Copy all files into TEMP directory where IEXPRESS will collect.
  48. echo At the same time, rename any duplicates to unique filenames.
  49. echo.
  50. for %%c in (%categories%) do cd %root%\%%c 2>nul && for %%a in (*.*) do call %home%\makeset3 %%a
  51. cd %home%
  52. attrib -R temp\*.*
  53. cd %home%
  54. echo.
  55. echo Generate WMDMCore.CDF
  56. echo.
  57. del WMDMCore_2.cdf >nul 2>nul
  58. copy WMDMCore.cdf WMDMCore_2.cdf
  59. cd temp
  60. set n=0
  61. for %%a in (*.*) do call ..\buildcdf.bat cmd1 %%a
  62. echo. >>..\WMDMCore_2.cdf
  63. echo [SourceFiles] >>..\WMDMCore_2.cdf
  64. echo SourceFiles0=%releasepoint%\%dumpdir% >>..\WMDMCore_2.cdf
  65. echo [SourceFiles0] >>..\WMDMCore_2.cdf
  66. set n=0
  67. for %%a in (*.*) do call ..\buildcdf.bat cmd2
  68. cd %home%
  69. echo Setting version information...
  70. call %DRMVERDIR%\drmver.exe >> WMDMCore_2.cdf
  71. echo.
  72. echo Copy raw setup to the dump directory
  73. echo.
  74. @del %releasepoint%\%exefile% >nul 2>nul
  75. @rmdir /s /q %releasepoint%\%dumpdir% >nul 2>nul
  76. mkdir %releasepoint%\%dumpdir%
  77. copy temp\*.* %releasepoint%\%dumpdir%
  78. copy WMDMCore_2.cdf %releasepoint%\%dumpdir%\WMDMCore.cdf
  79. del WMDMCore_2.cdf >nul 2>nul
  80. copy .\eula.txt %releasepoint%\%dumpdir%
  81. rem if exist .\eula.txt attrib -r .\eula.txt
  82. rem copy ..\eula.txt .
  83. echo.
  84. echo Run IEXPRESS to build setup
  85. echo.
  86. set quiet=/Q /M
  87. if %verbose%==1 set quiet=
  88. echo Running %IEXPRESSDIR%\iexpress /N %quiet% %releasepoint%\%dumpdir%\WMDMCore.CDF
  89. %IEXPRESSDIR%\iexpress /N %quiet% %releasepoint%\%dumpdir%\WMDMCore.CDF
  90. del ~cabpack.cab
  91. del ~cabpack.ddf
  92. copy %exefile% %releasepoint%
  93. del %exefile%
  94. if %verbose%==0 del WMDMCore_2.cdf
  95. if %verbose%==0 del WMDMCore.inf
  96. if %verbose%==0 rmdir /s /q temp
  97. rem
  98. rem build cabs
  99. rem
  100. call makecab.bat
  101. rem
  102. rem Report errors
  103. rem
  104. :error
  105. if exist obj\checkrel.out goto someerrors
  106. echo SETUP BUILD REPORT for %releasepoint% > obj\checkrel.out
  107. echo All files exist >> obj\checkrel.out
  108. type obj\checkrel2.out >> obj\checkrel.out
  109. goto noerrors
  110. :someerrors
  111. del obj\checkrel4.out
  112. rename obj\checkrel.out checkrel4.out
  113. echo SETUP BUILD REPORT for %releasepoint% > obj\checkrel.out
  114. type obj\checkrel4.out >> obj\checkrel.out
  115. wc -l obj\checkrel4.out | trans obj\\checkrel4.out "Files missing" >> obj\checkrel.out
  116. type obj\checkrel2.out >> obj\checkrel.out
  117. :noerrors
  118. type obj\checkrel.out
  119. endlocal