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.

114 lines
3.7 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM winnt32msi.cmd - VijeshS
  4. @REM Generate the winnt32.msi for different SKUs
  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. winnt32msi
  20. Generate the winnt32.msi for different SKUs
  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 "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 = bla dtc ent sbs srv
  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. perl %RazzleToolPath%\cksku.pm -t:sbs -l:%lang%
  52. 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"