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.

83 lines
2.3 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM copyremoteboot.cmd - AndrewR
  4. @REM copies x86 remote boot client files to 64 bit servers
  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. sub Usage { print<<USAGE; exit(1) }
  19. copyremoteboot [-l <language>]
  20. Copies x86 remote boot client files to 64 bit servers
  21. USAGE
  22. parseargs('?' => \&Usage);
  23. # *** TEMPLATE CODE ***
  24. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  25. __END__
  26. @:CPCBegin
  27. @set _CPCMAGIC=
  28. @setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  29. @if not defined DEBUG echo off
  30. @REM *** 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 _NTWowBinsTree
  37. if defined _NTWowBinsTree (
  38. set RBSourceDir=%_NTWowBinsTree%
  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