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.

185 lines
3.8 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM tsclient.cmd - NadimA, MadanA
  4. @REM Build terminal server client bits every build
  5. @REM
  6. @REM Copyright (c) Microsoft Corporation. All rights reserved.
  7. @REM
  8. @REM -----------------------------------------------------------------
  9. @if defined _CPCMAGIC goto CPCBegin
  10. @perl -x "%~f0" %*
  11. @goto :EOF
  12. #!perl
  13. use strict;
  14. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  15. use lib $ENV{RAZZLETOOLPATH};
  16. use PbuildEnv;
  17. use ParseArgs;
  18. use Logmsg;
  19. sub Usage { print<<USAGE; exit(1) }
  20. tsclient [-l <language>]
  21. Build terminal server client bits.
  22. USAGE
  23. sub Dependencies {
  24. if ( !open DEPEND, ">>$ENV{_NTPOSTBLD}\\..\\build_logs\\dependencies.txt" ) {
  25. errmsg("Unable to open dependency list file.");
  26. die;
  27. }
  28. print DEPEND<<DEPENDENCIES;
  29. \[$0\]
  30. IF {
  31. msrdpcli.exe
  32. msrdpcli.msi
  33. mstsc.exe
  34. mstscax.dll
  35. mstsmhst.dll
  36. mstsmmc.dll
  37. tsmmc.msc
  38. tscupgrd.exe
  39. msrdp.cab
  40. tsweb1.htm
  41. mstsweb.cat
  42. tscmsi01.w32
  43. tscmsi02.w32
  44. tscmsi03.w32
  45. instmsia.exe
  46. instmsiw.exe
  47. }
  48. ADD {
  49. tsclient\\...
  50. msrdp.ocx
  51. mstsc.chm
  52. }
  53. DEPENDENCIES
  54. close DEPEND;
  55. exit;
  56. }
  57. my $qfe;
  58. parseargs('?' => \&Usage,
  59. 'plan' => \&Dependencies,
  60. 'qfe:' => \$qfe);
  61. if ( -f "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  62. if ( !open SKIP, "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  63. errmsg("Unable to open skip list file.");
  64. die;
  65. }
  66. while (<SKIP>) {
  67. chomp;
  68. exit if lc$_ eq lc$0;
  69. }
  70. close SKIP;
  71. }
  72. # *** TEMPLATE CODE ***
  73. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  74. __END__
  75. @:CPCBegin
  76. @set _CPCMAGIC=
  77. @setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  78. @if not defined DEBUG echo off
  79. @REM *** CMD SCRIPT BELOW ***
  80. REM
  81. REM Check the sku's for the language
  82. REM TSclient only is built for srv and higher products
  83. REM
  84. set _PER=1
  85. set _BLA=1
  86. set _SBS=1
  87. set _SRV=1
  88. set _ADS=1
  89. set _DTC=1
  90. perl %RazzleToolPath%\cksku.pm -t:per -l:%lang%
  91. if errorlevel 1 set _PER=
  92. perl %RazzleToolPath%\cksku.pm -t:bla -l:%lang%
  93. if errorlevel 1 set _BLA=
  94. perl %RazzleToolPath%\cksku.pm -t:sbs -l:%lang%
  95. if errorlevel 1 set _SBS=
  96. perl %RazzleToolPath%\cksku.pm -t:srv -l:%lang%
  97. if errorlevel 1 set _SRV=
  98. perl %RazzleToolPath%\cksku.pm -t:ads -l:%lang%
  99. if errorlevel 1 set _ADS=
  100. perl %RazzleToolPath%\cksku.pm -t:dtc -l:%lang%
  101. if errorlevel 1 set _DTC=
  102. :ValidSku
  103. REM
  104. REM Invoke the web building script
  105. REM
  106. if defined ia64 pushd %_NTPOSTBLD%\tsclient\win32\ia64
  107. if defined amd64 pushd %_NTPOSTBLD%\tsclient\win32\amd64
  108. if defined 386 pushd %_NTPOSTBLD%\tsclient\win32\i386
  109. call ExecuteCmd.cmd "tscwebgen.cmd"
  110. popd
  111. REM
  112. REM Only do this for X86 builds for now. Win64 will come later
  113. REM repropagation will have to come into play for that
  114. REM
  115. if defined ia64 goto :TS64
  116. if defined amd64 goto :TS64
  117. if NOT defined 386 goto :EOF
  118. REM
  119. REM Build the tsclient MSI data cab
  120. REM
  121. pushd %_NTPOSTBLD%\tsclient\win32\i386
  122. call ExecuteCmd.cmd "tscmsigen.cmd"
  123. popd
  124. :TS64
  125. REM
  126. REM Propagate the TS Client files to the root of binaries.
  127. REM This is done via a makefile binplace to tsclient\congeal.
  128. REM
  129. call logmsg.cmd "Copying/renaming TS Client files and copying the root of binaries."
  130. set makefile_path=%_NTPOSTBLD%\tsclient\congeal
  131. if not exist %makefile_path%\mkrsys (
  132. call errmsg.cmd "Unable to find %makefile_path%\mkrsys."
  133. goto :EOF
  134. )
  135. set tscbin=%_NTPOSTBLD%\tsclient
  136. REM
  137. REM Run nmake on the tsclient\congeal makefile.
  138. REM
  139. pushd %makefile_path%
  140. if errorlevel 1 (
  141. call errmsg.cmd "Unable to change directory to %makefile_path%."
  142. goto :EOF
  143. )
  144. REM
  145. REM No 16 bit TS Client for FE languages.
  146. REM
  147. set NO_WIN16_TSCLIENT=
  148. perl %RazzleToolPath%\cklang.pm -l:%lang% -c:@FE
  149. if %errorlevel% EQU 0 set NO_WIN16_TSCLIENT=1
  150. call ExecuteCmd.cmd "nmake /nologo /f %makefile_path%\mkrsys tscbin=%tscbin%"
  151. popd