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.

77 lines
2.1 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM wmmkdcache.cmd
  5. REM calls mkdcache
  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. wmmkdcache [-l <language>]
  22. Calls mkdcache
  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 { dcache.bin } ADD {}
  32. DEPENDENCIES
  33. close DEPEND;
  34. exit;
  35. }
  36. my $qfe;
  37. parseargs('?' => \&Usage,
  38. 'plan' => \&Dependencies,
  39. 'qfe:' => \$qfe);
  40. if ( -f "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  41. if ( !open SKIP, "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  42. errmsg("Unable to open skip list file.");
  43. die;
  44. }
  45. while (<SKIP>) {
  46. chomp;
  47. exit if lc$_ eq lc$0;
  48. }
  49. close SKIP;
  50. }
  51. # *** NEXT FEW LINES ARE TEMPLATE ***
  52. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  53. __END__
  54. :CPCBegin
  55. set _CPCMAGIC=
  56. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  57. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  58. REM ------------------------------------------------------------------
  59. REM
  60. REM Run mkdcache.exe to add the hashes of SP-filtered drivers listed
  61. REM in drmlist.txt to the dcache.bin that shipped with XP Gold.
  62. REM
  63. REM Ignore files that are in drmlist.txt but not in the _NTFILTER dir
  64. REM so that drmlist.txt doesn't need to be updated everytime a new
  65. REM driver makes it into _NTFILTER.
  66. REM
  67. REM ------------------------------------------------------------------
  68. if /i "%_BuildArch%" == "x86" call ExecuteCmd.cmd "%RazzleToolPath%\x86\mkdcache.exe %RazzleToolPath%\sp\data\drmlist.txt %_NTPOSTBLD% %_NTPOSTBLD%\dcache.bin FALSE TRUE %RazzleToolPath%\sp\data\dcache.bin.2600"