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.

104 lines
3.3 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM standalone.cmd
  5. REM make standalone cd image for the sp
  6. REM
  7. REM Copyright (c) Microsoft Corporation. All rights reserved.
  8. REM
  9. REM ------------------------------------------------------------------
  10. if defined _CPCMAGIC goto CPCBegin
  11. perl -x "%~f0" %*
  12. goto :EOF
  13. #!perl
  14. use strict;
  15. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  16. use lib $ENV{RAZZLETOOLPATH};
  17. use PbuildEnv;
  18. use ParseArgs;
  19. use Logmsg;
  20. sub Usage { print<<USAGE; exit(1) }
  21. USAGE
  22. sub Dependencies {
  23. if ( !open DEPEND, ">>$ENV{_NTPOSTBLD}\\..\\build_logs\\dependencies.txt" ) {
  24. errmsg("Unable to open dependency list file.");
  25. die;
  26. }
  27. print DEPEND<<DEPENDENCIES;
  28. \[$0\]
  29. IF {...} ADD {
  30. idw\\srvpack\\autorun.inf
  31. idw\\srvpack\\shelexec.exe
  32. idw\\srvpack\\xpsp1.cmd
  33. setuptxt\\standalone\\autorun.htm
  34. setuptxt\\standalone\\hfdeploy.htm
  35. setuptxt\\standalone\\readmesp.htm
  36. setuptxt\\standalone\\spdeploy.htm
  37. setuptxt\\winxp_logo_horiz_sm.gif
  38. }
  39. DEPENDENCIES
  40. close DEPEND;
  41. exit;
  42. }
  43. my $qfe;
  44. parseargs('?' => \&Usage,
  45. 'plan' => \&Dependencies,
  46. 'qfe:' => \$qfe);
  47. if ( -f "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  48. if ( !open SKIP, "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  49. errmsg("Unable to open skip list file.");
  50. die;
  51. }
  52. while (<SKIP>) {
  53. chomp;
  54. exit if lc$_ eq lc$0;
  55. }
  56. close SKIP;
  57. }
  58. # *** NEXT FEW LINES ARE TEMPLATE ***
  59. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  60. __END__
  61. :CPCBegin
  62. set _CPCMAGIC=
  63. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  64. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  65. set sp=sp1
  66. if not exist %_NTPOSTBLD%\spcd mkdir %_NTPOSTBLD%\spcd
  67. REM make the standalone cd image
  68. call ExecuteCmd.cmd "copy %_NTPOSTBLD%\xp%sp%.exe %_NTPOSTBLD%\spcd\xp%sp%.exe"
  69. call ExecuteCmd.cmd "compdir /enustd %_NTPOSTBLD%\slp\pro\support %_NTPOSTBLD%\spcd\support"
  70. call ExecuteCmd.cmd "compdir /enustd %_NTPOSTBLD%\slp\pro\valueadd %_NTPOSTBLD%\spcd\valueadd"
  71. call ExecuteCmd.cmd "compdir /enustd %_NTPOSTBLD%\slp\pro\dotnetfx %_NTPOSTBLD%\spcd\dotnetfx"
  72. if exist %_NTPOSTBLD%\symbolcd\upd\symbols (
  73. call ExecuteCmd.cmd "compdir /enustd %_NTPOSTBLD%\symbolcd\upd\symbols %_NTPOSTBLD%\spcd\support\symbols"
  74. )
  75. REM do these without executecmd until sure that all these files are really in the build
  76. if not exist %_NTPOSTBLD%\spcd\support\tools mkdir %_NTPOSTBLD%\spcd\support\tools
  77. if not exist %_NTPOSTBLD%\spcd\cdlaunch mkdir %_NTPOSTBLD%\spcd\CDLaunch
  78. copy %_NTPOSTBLD%\idw\srvpack\autorun.inf %_NTPOSTBLD%\spcd\autorun.inf
  79. copy %_NTPOSTBLD%\idw\srvpack\shelexec.exe %_NTPOSTBLD%\spcd\CDLaunch\shelexec.exe
  80. copy %_NTPOSTBLD%\idw\srvpack\xpsp1.cmd %_NTPOSTBLD%\spcd\xpsp1.cmd
  81. copy %_NTPOSTBLD%\setuptxt\standalone\autorun.htm %_NTPOSTBLD%\spcd\autorun.htm
  82. if "%lang%" == "fr" (
  83. copy %_NTPOSTBLD%\setuptxt\standalone\readmesp.htm %_NTPOSTBLD%\spcd\Lisezmoi.htm
  84. ) else (
  85. copy %_NTPOSTBLD%\setuptxt\standalone\readmesp.htm %_NTPOSTBLD%\spcd\readmesp.htm
  86. )
  87. copy %_NTPOSTBLD%\setuptxt\winxp_logo_horiz_sm.gif %_NTPOSTBLD%\spcd\winxp_logo_horiz_sm.gif
  88. copy %_NTPOSTBLD%\setuptxt\standalone\spdeploy.htm %_NTPOSTBLD%\spcd\support\tools\spdeploy.htm
  89. copy %_NTPOSTBLD%\setuptxt\standalone\hfdeploy.htm %_NTPOSTBLD%\spcd\support\tools\hfdeploy.htm
  90. REM otherwise if the last copy failed this will still return an error
  91. seterror 0