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.7 KiB

  1. setlocal
  2. if "%CPUBIN%"=="i386" set MYSTDDEFINE=
  3. if not "%CPUBIN%"=="i386" set MYSTDDEFINE=
  4. call cl /nologo /EP /Zs %MYSTDDEFINE% .\PMSvDist.inx >.\PMSvDist.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=PMSvDist
  21. set exefile=PMSvDist.exe
  22. set exename=PMSvDist
  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 PMSvDist.CDF
  56. echo.
  57. del PMSvDist_2.cdf >nul 2>nul
  58. copy PMSvDist.cdf PMSvDist_2.cdf
  59. cd temp
  60. set n=0
  61. for %%a in (*.*) do call ..\buildcdf.bat cmd1 %%a
  62. echo. >>..\PMSvDist_2.cdf
  63. echo [SourceFiles] >>..\PMSvDist_2.cdf
  64. echo SourceFiles0=%releasepoint%\%dumpdir% >>..\PMSvDist_2.cdf
  65. echo [SourceFiles0] >>..\PMSvDist_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 >> PMSvDist_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 PMSvDist_2.cdf %releasepoint%\%dumpdir%\PMSvDist.cdf
  79. del PMSvDist_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%\PMSvDist.CDF
  89. %IEXPRESSDIR%\iexpress /N %quiet% %releasepoint%\%dumpdir%\PMSvDist.CDF
  90. del ~cabpack.cab
  91. del ~cabpack.ddf
  92. copy %exefile% %releasepoint%
  93. copy %exefile% %_BIN_DIR%\%CPUBIN%
  94. del %exefile%
  95. if %verbose%==0 del PMSvDist_2.cdf
  96. if %verbose%==0 del PMSvDist.inf
  97. if %verbose%==0 rmdir /s /q temp
  98. rem
  99. rem build cabs
  100. rem
  101. call makecab.bat
  102. rem
  103. rem Report errors
  104. rem
  105. :error
  106. if exist obj\checkrel.out goto someerrors
  107. echo SETUP BUILD REPORT for %releasepoint% > obj\checkrel.out
  108. echo All files exist >> obj\checkrel.out
  109. type obj\checkrel2.out >> obj\checkrel.out
  110. goto noerrors
  111. :someerrors
  112. del obj\checkrel4.out
  113. rename obj\checkrel.out checkrel4.out
  114. echo SETUP BUILD REPORT for %releasepoint% > obj\checkrel.out
  115. type obj\checkrel4.out >> obj\checkrel.out
  116. wc -l obj\checkrel4.out | trans obj\\checkrel4.out "Files missing" >> obj\checkrel.out
  117. type obj\checkrel2.out >> obj\checkrel.out
  118. :noerrors
  119. type obj\checkrel.out
  120. endlocal