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.

47 lines
1.2 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM opkmsi.cmd - swamip
  4. @REM Generate the opk.msi
  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. opkmsi
  20. Update the opk.msi with a new package and product code
  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. call logmsg.cmd /t "Updating the Packagecode and Productcode for opk.msi..."
  32. call ExecuteCmd "cscript.exe opkmsi.vbs %_NTPostBld%\opk\opk.msi"
  33. REM
  34. REM Call Msifiler.exe to update file size and versions
  35. REM
  36. call logmsg.cmd /t "Fixing the file size and version info for the opk.msi..."
  37. call ExecuteCmd.cmd "msifiler -d %_NTPostBld%\opk\opk.msi"