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.

169 lines
3.8 KiB

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