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.

100 lines
2.8 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM cd2.cmd
  5. REM Move CD2 files under pro, make procd1 and procd2
  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. cd2 [-l <language>]
  22. Move CD2 files under pro, make procd1 and procd2
  23. USAGE
  24. sub Dependencies {
  25. if ( !open DEPEND, ">>$ENV{_NTPOSTBLD}\\..\\build_logs\\dependencies.txt" ) {
  26. errmsg("Unable to open dependency list file.");
  27. die;
  28. }
  29. print DEPEND<<DEPENDENCIES;
  30. \[$0\]
  31. IF {...} ADD {
  32. tabletpc.cab
  33. mediactr.cab
  34. netfxocm\\netfx.cab
  35. setuptxt\\cd2\\readmecd2.txt
  36. }
  37. DEPENDENCIES
  38. close DEPEND;
  39. exit;
  40. }
  41. my $qfe;
  42. parseargs('?' => \&Usage,
  43. 'plan' => \&Dependencies,
  44. 'qfe:' => \$qfe);
  45. if ( -f "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  46. if ( !open SKIP, "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  47. errmsg("Unable to open skip list file.");
  48. die;
  49. }
  50. while (<SKIP>) {
  51. chomp;
  52. exit if lc$_ eq lc$0;
  53. }
  54. close SKIP;
  55. }
  56. # *** NEXT FEW LINES ARE TEMPLATE ***
  57. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  58. __END__
  59. :CPCBegin
  60. set _CPCMAGIC=
  61. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  62. if exist %_NTPostBld%\tabletpc.cab (
  63. if not exist %_NTPostBld%\slp\pro\cmpnents\tabletpc\i386 (
  64. call executecmd.cmd "md %_NTPostBld%\slp\pro\cmpnents\tabletpc\i386"
  65. )
  66. call executecmd.cmd "copy %_NTPostBld%\tabletpc.cab %_NTPostBld%\slp\pro\cmpnents\tabletpc\i386"
  67. )
  68. if exist %_NTPostBld%\mediactr.cab (
  69. if not exist %_NTPostBld%\slp\pro\cmpnents\mediactr\i386 (
  70. call executecmd.cmd "md %_NTPostBld%\slp\pro\cmpnents\mediactr\i386"
  71. )
  72. call executecmd.cmd "copy %_NTPostBld%\mediactr.cab %_NTPostBld%\slp\pro\cmpnents\mediactr\i386"
  73. )
  74. if exist %_NTPostBld%\netfxocm\netfx.cab (
  75. if not exist %_NTPostBld%\slp\pro\cmpnents\netfx\i386 (
  76. call executecmd.cmd "md %_NTPostBld%\slp\pro\cmpnents\netfx\i386"
  77. )
  78. call executecmd.cmd "copy %_NTPostBld%\netfxocm\netfx.cab %_NTPostBld%\slp\pro\cmpnents\netfx\i386"
  79. )
  80. REM make procd1 and procd2 on official builds
  81. if defined OFFICIAL_BUILD_MACHINE (
  82. call executecmd.cmd "compdir /eklnust %_NTPostBld%\slp\pro %_NTPostBld%\slp\procd1"
  83. call executecmd.cmd "rd /s/q %_NTPostBld%\slp\procd1\cmpnents"
  84. call executecmd.cmd "compdir /eklnust %_NTPostBld%\slp\pro\cmpnents %_NTPostBld%\slp\procd2\cmpnents"
  85. call executecmd.cmd "copy %_NTPostBld%\setuptxt\cd2\readmecd2.txt %_NTPostBld%\slp\procd2\readme.txt"
  86. )