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.

101 lines
2.3 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM mp2up.cmd
  5. REM Makes mp2up.cat for the contents of the Uniproc directory
  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. mp2up [-l <language>]
  21. Makes mp2up.cat for the contents of the Uniproc directory
  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 only run on x86
  32. if not defined x86 goto end
  33. REM
  34. REM Set default variables
  35. REM
  36. set UniprocFiles=kernel32.dll win32k.sys ntdll.dll winsrv.dll mp2up.inf
  37. if defined CDFTMP (
  38. set TMP_SAVE=%TMP%
  39. )
  40. REM
  41. REM Only execute if a uniproc directory is present.
  42. REM
  43. if not exist %_NTPostBld%\uniproc goto end
  44. REM Copy mp2up.inf into uniproc directory
  45. if exist %_NTPostBld%\mp2up.inf (
  46. copy %_NTPostBld%\mp2up.inf %_NTPostBld%\uniproc\mp2up.inf
  47. ) else (
  48. call errmsg.cmd "%_NTPostBld%\mp2up.inf does not exist."
  49. goto end
  50. )
  51. REM Verify copy worked
  52. if NOT exist %_NTPostBld%\mp2up.inf (
  53. call errmsg.cmd "%_NTPostBld%\mp2up.inf not copied to %BINARIES%\uniproc\mp2up.inf."
  54. goto end
  55. )
  56. REM Delete old catalog, make a delta.cat and rename to mp2up.cat
  57. if exist %_NTPostBld%\uniproc\mp2up.cat del /f %_NTPostBld%\uniproc\mp2up.cat
  58. call deltacat.cmd %_NTPostBld%\uniproc
  59. del %_NTPostBld%\uniproc\delta.cdf
  60. ren %_NTPostBld%\uniproc\delta.cat mp2up.cat
  61. REM Since deltacat does not return a reliable error level
  62. REM run chktrust to verify everything worked.
  63. REM
  64. REM
  65. REM WARNING: Commenting out until chktrust is fixed.
  66. REM
  67. REM
  68. REM
  69. REM for %%a in (%UniprocFiles%) do (
  70. REM chktrust -wd -c %_NTPostBld%\uniproc\mp2up.cat -t foo %_NTPostBld%\uniproc\%%a
  71. REM if not "!ERRORLEVEL!" == "0" (
  72. REM call errmsg.cmd "%%a not signed in mp2up.cat"
  73. REM goto end
  74. REM ) else (
  75. REM call logmsg.cmd "%%a signed in mp2up.cat"
  76. REM )
  77. REM )
  78. goto end
  79. :end
  80. seterror.exe "%errors%"& goto :EOF