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.

94 lines
2.1 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM samsibuild.cmd - TravisN
  4. @REM Build server appliance 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. samsibuild [-l <language>] [-p]
  20. -p => called from PRS signing
  21. Build server appliance msi.
  22. USAGE
  23. parseargs('?' => \&Usage, 'p' =>\$ENV{PRS});
  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. REM
  33. REM Check the sku's for the language
  34. REM SAclient only is built for srv and higher products
  35. REM
  36. set _PER=1
  37. set _BLA=1
  38. set _SBS=1
  39. set _SRV=1
  40. set _ADS=1
  41. set _DTC=1
  42. perl %RazzleToolPath%\cksku.pm -t:per -l:%lang%
  43. if errorlevel 1 set _PER=
  44. perl %RazzleToolPath%\cksku.pm -t:bla -l:%lang%
  45. if errorlevel 1 set _BLA=
  46. perl %RazzleToolPath%\cksku.pm -t:sbs -l:%lang%
  47. if errorlevel 1 set _SBS=
  48. perl %RazzleToolPath%\cksku.pm -t:srv -l:%lang%
  49. if errorlevel 1 set _SRV=
  50. perl %RazzleToolPath%\cksku.pm -t:ads -l:%lang%
  51. if errorlevel 1 set _ADS=
  52. perl %RazzleToolPath%\cksku.pm -t:dtc -l:%lang%
  53. if errorlevel 1 set _DTC=
  54. if defined ia64 goto InvalidSku
  55. if defined amd64 goto InvalidSku
  56. if NOT defined 386 goto InvalidSku
  57. if defined _BLA goto ValidSku
  58. if defined _SBS goto ValidSku
  59. if defined _SRV goto ValidSku
  60. if defined _ADS goto ValidSku
  61. if defined _DTC goto ValidSku
  62. :InvalidSku
  63. call logmsg.cmd "samsibuild is only built on i386 server products..."
  64. goto :EOF
  65. :ValidSku
  66. REM
  67. REM Build the sakit MSI
  68. REM
  69. pushd %_NTPostBld%\sacomponents
  70. if /i "%PRS%" == "1" (
  71. call ExecuteCmd.cmd "samsigen.cmd -p"
  72. ) else (
  73. call ExecuteCmd.cmd "samsigen.cmd"
  74. )
  75. popd