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.

55 lines
1.4 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM spcab.cmd - JeremyD
  4. @REM generates SPn.cab
  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. spcab [-l <language>]
  20. Generates SPn.cab using the file list build_logs\\spdrivers.txt
  21. generated by spfilelist.cmd.
  22. USAGE
  23. parseargs('?' => \&Usage);
  24. # *** TEMPLATE CODE ***
  25. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  26. __END__
  27. @:CPCBegin
  28. @set _CPCMAGIC=
  29. @setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  30. @if not defined DEBUG echo off
  31. @REM *** CMD SCRIPT BELOW ***
  32. set FILELIST=%_NTPOSTBLD%\SP\data\drivers.txt
  33. set CABNAME=%_NTPOSTBLD%\SP\common\SP1.cab
  34. set EVENTNAME=spcab
  35. if not exist %FILELIST% (
  36. call logmsg.cmd "no driver list, skipping SP1.cab"
  37. exit /b 0
  38. )
  39. if not exist %_NTPOSTBLD%\SP\common mkdir %_NTPOSTBLD%\SP\common
  40. start /min cmd /c %RazzleToolPath%\PostBuildScripts\CabWrapper.cmd %FILELIST% %CABNAME% %EVENTNAME%
  41. perl %RazzleToolPath%\PostBuildScripts\cmdevt.pl -iwv %EVENTNAME%
  42. if not exist %CABNAME% (
  43. call errmsg.cmd "sp cab generation failed"
  44. exit /b 1
  45. )