Source code of Windows XP (NT5)
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.

229 lines
5.9 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM tswebsetup.cmd - EltonS
  4. @REM Make an iexpress exe container (tswebsetup.exe) for all the tsc
  5. @REM client setup files. For installation from the support tools
  6. @REM section of the CD
  7. @REM
  8. @REM IMPORTANT: script must run after tsclient.cmd and msi.cmd complete
  9. @REM only runs on X86. On Win64 we cross-copy the x86 files.
  10. @REM
  11. @REM Copyright (c) Microsoft Corporation. All rights reserved.
  12. @REM
  13. @REM -----------------------------------------------------------------
  14. @if NOT defined HOST_PROCESSOR_ARCHITECTURE set HOST_PROCESSOR_ARCHITECTURE=%PROCESSOR_ARCHITECTURE%
  15. @if defined _CPCMAGIC goto CPCBegin
  16. @perl -x "%~f0" %*
  17. @goto :EOF
  18. #!perl
  19. use strict;
  20. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  21. use lib $ENV{RAZZLETOOLPATH};
  22. use PbuildEnv;
  23. use ParseArgs;
  24. use Logmsg;
  25. sub Usage { print<<USAGE; exit(1) }
  26. tswebsetup.cmd (no params)
  27. contact: nadima
  28. Make tswebsetup.exe (Terminal Services Client setup file for CD install)
  29. USAGE
  30. sub Dependencies {
  31. if ( !open DEPEND, ">>$ENV{_NTPOSTBLD}\\..\\build_logs\\dependencies.txt" ) {
  32. errmsg("Unable to open dependency list file.");
  33. die;
  34. }
  35. print DEPEND<<DEPENDENCIES;
  36. \[$0\]
  37. IF { tswebsetup.exe }
  38. ADD {
  39. tsweb-eula.txt tsweb-readme.htm tsweb-setup.inf tsweb-setup.sed tsweb1.htm msrdp.cab bluebarh.gif bluebarv.gif win2000l.gif Win2000r.gif
  40. }
  41. DEPENDENCIES
  42. close DEPEND;
  43. exit;
  44. }
  45. my $qfe;
  46. parseargs('?' => \&Usage,
  47. 'plan' => \&Dependencies,
  48. 'qfe:' => \$qfe);
  49. if ( -f "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  50. if ( !open SKIP, "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  51. errmsg("Unable to open skip list file.");
  52. die;
  53. }
  54. while (<SKIP>) {
  55. chomp;
  56. exit if lc$_ eq lc$0;
  57. }
  58. close SKIP;
  59. }
  60. # *** TEMPLATE CODE ***
  61. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  62. __END__
  63. @:CPCBegin
  64. @set _CPCMAGIC=
  65. @setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  66. @if not defined DEBUG echo off
  67. @REM *** CMD SCRIPT BELOW ***
  68. REM
  69. REM Generate tswebsetup.exe (only on i386)
  70. REM
  71. REM
  72. set _bla=1
  73. set _sbs=1
  74. set _srv=1
  75. set _ads=1
  76. set _dtc=1
  77. perl %RazzleToolPath%\cksku.pm -t:bla -l:%LANG%
  78. if errorlevel 1 set _bla=
  79. perl %RazzleToolPath%\cksku.pm -t:sbs -l:%LANG%
  80. if errorlevel 1 set _sbs=
  81. perl %RazzleToolPath%\cksku.pm -t:srv -l:%LANG%
  82. if errorlevel 1 set _srv=
  83. perl %RazzleToolPath%\cksku.pm -t:ads -l:%LANG%
  84. if errorlevel 1 set _ads=
  85. perl %RazzleToolPath%\cksku.pm -t:dtc -l:%LANG%
  86. if errorlevel 1 set _dtc=
  87. if defined _bla goto CONTINUE
  88. if defined _sbs goto CONTINUE
  89. if defined _srv goto CONTINUE
  90. if defined _ads goto CONTINUE
  91. if defined _dtc goto CONTINUE
  92. call logmsg.cmd "tswebsetup.cmd do nothing on non server product"
  93. goto :EOF
  94. :CONTINUE
  95. if not defined 386 (
  96. call logmsg.cmd "tswebsetup.cmd do nothing on non i386"
  97. goto :EOF
  98. )
  99. if exist %_NTPostBld%\tsweb (
  100. call ExecuteCmd.cmd "rmdir /q /s %_NTPostBld%\tsweb"
  101. if errorlevel 1 call errmsg.cmd "err deleting tsweb dir"& goto :EOF
  102. )
  103. REM delete tswebsetup from root of the release directory here to avoid
  104. REM causing a popup on W2K OS build machines
  105. if exist %_NTPostBld%\tswebsetup.exe call ExecuteCmd.cmd "del /f %_NTPostBld%\tswebsetup.exe"
  106. if errorlevel 1 goto :EOF
  107. mkdir %_NTPostBld%\tsweb
  108. if errorlevel 1 call errmsg.cmd "err creating .\tsweb dir"& goto :EOF
  109. echo %_NTPostBld%
  110. pushd %_NTPostBld%
  111. for %%i in (tsweb-eula.txt tsweb-readme.htm tsweb-setup.inf tsweb-setup.sed tsweb1.htm msrdp.cab bluebarh.gif bluebarv.gif win2000l.gif Win2000r.gif) do (
  112. if not exist %%i (
  113. call errmsg.cmd "File %_NTPostBld%\%%i not found."
  114. popd& goto :EOF
  115. )
  116. )
  117. REM
  118. REM This should only take a few seconds to complete
  119. REM
  120. :RunIt
  121. REM
  122. REM Create tswebsetup.exe.
  123. REM As iexpress.exe does not set errorlevel in all error cases,
  124. REM base verification on tswebsetup.exe's existence.
  125. REM
  126. REM
  127. REM copy files to temp cab dir and rename them back to their original names
  128. REM (the reverse of what mkrsys does)
  129. REM
  130. copy .\tsweb-eula.txt .\tsweb\eula.txt
  131. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  132. copy .\tsweb-readme.htm .\tsweb\readme.htm
  133. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  134. copy .\tsweb-setup.inf .\tsweb\setup.inf
  135. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  136. copy .\tsweb-setup.sed .\tsweb\setup.sed
  137. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  138. copy .\tsweb1.htm .\tsweb\default.htm
  139. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  140. copy .\msrdp.cab .\tsweb\msrdp.cab
  141. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  142. copy .\bluebarh.gif .\tsweb\bluebarh.gif
  143. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  144. copy .\bluebarv.gif .\tsweb\bluebarv.gif
  145. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  146. copy .\win2000l.gif .\tsweb\win2000l.gif
  147. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  148. copy .\Win2000r.gif .\tsweb\Win2000r.gif
  149. if errorlevel 1 call errmsg.cmd "err copying files to .\tsweb"& goto :EOF
  150. pushd .\tsweb
  151. REM
  152. REM NOW in .\tsweb
  153. REM
  154. REM
  155. REM Munge the path so we use the correct wextract.exe to build the package with...
  156. REM NOTE: We *want* to use the one we just built (and for Intl localized)!
  157. REM
  158. set _NEW_PATH_TO_PREPEND=%RazzleToolPath%\%HOST_PROCESSOR_ARCHITECTURE%\loc\%LANG%
  159. set _OLD_PATH_BEFORE_PREPENDING=%PATH%
  160. set PATH=%_NEW_PATH_TO_PREPEND%;%PATH%
  161. call ExecuteCmd.cmd "start /min /wait iexpress.exe /M /N /Q setup.sed"
  162. REM
  163. REM Return the path to what it was before...
  164. REM
  165. set PATH=%_OLD_PATH_BEFORE_PREPENDING%
  166. if not exist tswebsetup.exe (
  167. call errmsg.cmd "iexpress.exe tswebsetup.sed failed."
  168. popd & popd& goto :EOF
  169. )
  170. REM
  171. REM Copy tswebsetup.exe to "retail"
  172. REM and support tools
  173. call ExecuteCmd.cmd "copy tswebsetup.exe ..\"
  174. if errorlevel 1 popd& popd & goto :EOF
  175. call logmsg.cmd "tswebsetup.cmd completed successfully"
  176. popd & popd