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.

121 lines
2.8 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM mmssetup.cmd - lidaten
  4. @REM This will call iexpress to generate a self-extracting CAB,
  5. @REM mmssetup.cab
  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. Mmssetup.cmd
  21. Runs iexpress to generate a self-extracting setup (mmssetup.cab) for MSN-messenger.
  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. @REM
  33. @REM x86 only!
  34. @REM
  35. if not defined 386 (
  36. call logmsg.cmd "Mmssetup.cmd does nothing on non i386."
  37. goto :EOF
  38. )
  39. rd /q /s %_NTPostBld%\mmssetup\dump >nul 2>&1
  40. pushd %_NTPostBld%\mmssetup
  41. mkdir dump >nul 2>&1
  42. for %%i in (
  43. type.wav
  44. online.wav
  45. newemail.wav
  46. newalert.wav
  47. msmsgsin.exe
  48. msmsgs.man
  49. msmsgs.exe
  50. msgslang.dll
  51. msgsc.dll
  52. mailtmpl.txt
  53. lvback.gif
  54. blogo.gif
  55. mmssetup.sed
  56. ) do (
  57. copy /y %_NTPostBld%\mmssetup\%%i %_NTPostBld%\mmssetup\dump\%%i
  58. if errorlevel 1 (
  59. call errmsg.cmd "File %_NTPostBld%\mmssetup\%%i not found."
  60. popd& goto :EOF
  61. )
  62. )
  63. @REM
  64. @REM Sign the binaries
  65. @REM
  66. call deltacat.cmd %_NTPostBld%\mmssetup\dump
  67. if not exist %_NTPostBld%\mmssetup\dump\delta.cat (
  68. call errmsg.cmd "File %_NTPostBld%\mmssetup\dump\delta.cat does not found. Deltacat failed."
  69. popd& goto :EOF
  70. )
  71. @REM
  72. @REM Ren delta.cat to msmsgs.cat
  73. @REM
  74. ren %_NTPostBld%\mmssetup\dump\delta.cat msmsgs.cat
  75. if errorlevel 1 goto :EOF
  76. move /Y %_NTPostBld%\mmssetup\dump\msmsgs.cat %_NTPostBld%\msmsgs.cat
  77. if errorlevel 1 (
  78. call errmsg.cmd "Unable to move %_NTPostBld%\mmssetup\dump\msmsgs.cat to %_NTPostBld%\msmsgs.cat."
  79. popd& goto :EOF
  80. )
  81. pushd %_NTPostBld%\mmssetup\dump
  82. call ExecuteCmd.cmd "start /wait iexpress.exe /N mmssetup.sed"
  83. if not exist mmssetup.cab (
  84. call errmsg.cmd "iexpress.exe mmssetup.sed failed."
  85. popd& goto :EOF
  86. )
  87. @REM
  88. @REM Copy mmssetup.cab to %_NTPostBld%
  89. @REM
  90. copy /y %_NTPostBld%\mmssetup\dump\mmssetup.cab %_NTPostBld%\mmssetup.cab
  91. if errorlevel 1 (
  92. call errmsg.cmd "unable to copy %_NTPostBld%\mmssetup\dump\mmssetup.cab to %_NTPostBld%\mmssetup.cab
  93. popd& goto :EOF
  94. )
  95. call logmsg.cmd "Mmssetup.cmd completed successfully."
  96. popd