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.

114 lines
3.5 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM <<template_script.cmd>>
  5. REM <<purpose of this script>>
  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. winnt32msi
  21. Generate the winnt32.msi for different SKUs
  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. call logmsg.cmd /t "Starting winnt32msi.cmd"
  32. if not exist %_NTPostBld%\congeal_scripts\setupmsi (
  33. call errmsg.cmd "Missing %_NTPostBld%\congeal_scripts\setupmsi directory"
  34. popd & goto :EOF
  35. )
  36. pushd %_NTPostBld%\congeal_scripts\setupmsi
  37. if not exist %_NTPostBld%\congeal_scripts\setupmsi\winnt32.msi (
  38. call errmsg.cmd "Missing %_NTPostBld%\congeal_scripts\setupmsi\winnt32.msi"
  39. popd & goto :EOF
  40. )
  41. REM
  42. REM Examine the congeal_scripts\setupmsi directory and launch tagmsi for all flavors
  43. REM
  44. set prods=
  45. perl %RazzleToolPath%\cksku.pm -t:pro -l:%lang%
  46. if %errorlevel% EQU 0 (set prods=%prods% pro)
  47. perl %RazzleToolPath%\cksku.pm -t:per -l:%lang%
  48. if %errorlevel% EQU 0 (set prods=%prods% per)
  49. perl %RazzleToolPath%\cksku.pm -t:bla -l:%lang%
  50. if %errorlevel% EQU 0 (set prods=%prods% bla)
  51. REM perl %RazzleToolPath%\cksku.pm -t:sbs -l:%lang%
  52. REM if %errorlevel% EQU 0 (set prods=%prods% sbs)
  53. perl %RazzleToolPath%\cksku.pm -t:srv -l:%lang%
  54. if %errorlevel% EQU 0 (set prods=%prods% srv)
  55. perl %RazzleToolPath%\cksku.pm -t:ads -l:%lang%
  56. if %errorlevel% EQU 0 (set prods=%prods% ent)
  57. perl %RazzleToolPath%\cksku.pm -t:dtc -l:%lang%
  58. if %errorlevel% EQU 0 (set prods=%prods% dtc)
  59. set msidir=%_NTPostBld%\congeal_scripts\setupmsi
  60. set scriptdir=%sdxroot%\tools\postbuildscripts
  61. for %%i in (%prods%) do (
  62. if not exist %_NTPostBld%\congeal_scripts\setupmsi\%%iinfo.txt (
  63. call errmsg.cmd "Missing %%iinfo.txt"
  64. popd & goto :EOF
  65. )
  66. call ExecuteCmd.cmd "if not exist %_NTPostBld%\%%iinf md %_NTPostBld%\%%iinf"
  67. if "%%i" == "pro" (
  68. call %sdxroot%\tools\postbuildscripts\tagmsi.cmd %msidir%\winnt32.msi %scriptdir% %_NTPostBld%\winnt32.msi %msidir%\%%iinfo.txt %lang%
  69. if errorlevel 1 (
  70. call errmsg.cmd "%sdxroot%\tools\postbuildscripts\tagmsi.cmd %msidir%\winnt32.msi %scriptdir% %_NTPostBld%\winnt32.msi %msidir%\%%iinfo.txt %lang% failed"
  71. popd & goto :EOF
  72. )
  73. ) else (
  74. call %sdxroot%\tools\postbuildscripts\tagmsi.cmd %msidir%\winnt32.msi %scriptdir% %_NTPostBld%\%%iinf\winnt32.msi %msidir%\%%iinfo.txt %lang%
  75. echo %errorlevel%
  76. if errorlevel 1 (
  77. call errmsg.cmd "%sdxroot%\tools\postbuildscripts\tagmsi.cmd %msidir%\winnt32.msi %scriptdir% %_NTPostBld%\%%iinf\winnt32.msi %msidir%\%%iinfo.txt %lang% failed"
  78. popd & goto :EOF
  79. )
  80. )
  81. if errorlevel 1 (
  82. call errmsg.cmd "%sdxroot%\tools\postbuildscripts\tagmsi.cmd %msidir%\winnt32.msi %scriptdir% %_NTPostBld%\%%iinf\winnt32.msi %msidir%\%%iinfo.txt %lang% failed"
  83. popd & goto :EOF
  84. )
  85. )
  86. call logmsg.cmd /t "Successfully completed winnt32msi.cmd"