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.

83 lines
2.2 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM copyremoteboot.cmd
  5. REM copies x86 remote boot client files to 64 bit servers
  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. sub Usage { print<<USAGE; exit(1) }
  20. copyremoteboot [-l <language>]
  21. Copies x86 remote boot client files to 64 bit servers
  22. USAGE
  23. parseargs('?' => \&Usage);
  24. # *** NEXT FEW LINES ARE TEMPLATE ***
  25. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  26. __END__
  27. :CPCBegin
  28. set _CPCMAGIC=
  29. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  30. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  31. REM Bail if you're not an ia64 machine
  32. if not defined ia64 goto end
  33. REM First find the latest build from which to copy the binaries
  34. REM this will be set in build_logs\CPLocation.txt
  35. REM If you want to get your own x86 bits instead of those from
  36. REM your VBL, you have to set _NTRemoteBootTREE
  37. if defined _NTRemoteBootTREE (
  38. set RBSourceDir=%_NTRemoteBootTREE%
  39. goto :GotSourceDir
  40. )
  41. REM
  42. REM check for CPLocation.txt, if not there call CPLocation.cmd
  43. REM
  44. set CPFile=%_NTPOSTBLD%\build_logs\CPLocation.txt
  45. if not exist %CPFile% (
  46. call logmsg.cmd "No %CPFile%, running CPLocation.cmd ..."
  47. call %RazzleToolPath%\PostBuildScripts\CPLocation.cmd -l:%lang%
  48. if not exist %CPFile% (
  49. call errmsg.cmd "Still no %CPFile%, exiting ..."
  50. goto :End
  51. )
  52. )
  53. for /f "delims=" %%a in ('type %CPFile%') do set CPLocation=%%a
  54. if not exist %CPLocation% (
  55. call errmsg.cmd "Copy Location %CPLocation% does not exist ..."
  56. goto :End
  57. )
  58. call logmsg.cmd "Copying from %CPLocation% ..."
  59. set RBSourceDir=%CPLocation%
  60. :GotSourceDir
  61. call logmsg.cmd "Using %RBSourceDir% as source directory for remote boot files ..."
  62. REM Now perform the copy
  63. for /f "tokens=1,2 delims=," %%a in (%RazzleToolPath%\PostBuildScripts\CopyRemoteBoot.txt) do (
  64. call ExecuteCmd.cmd "copy %RBSourceDir%\%%a %_NTPOSTBLD%\%%b"
  65. )
  66. goto end
  67. :end
  68. seterror.exe "%errors%"& goto :EOF