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.

129 lines
3.1 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM mqexchng.cmd
  5. REM Creates mqexchng.exe (self extracting executable)
  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. mqexchng [-l <language>]
  21. Creates mqexchng.exe (self extracting executable)
  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. if defined amd64 goto :EOF
  32. if defined ia64 goto :EOF
  33. REM
  34. REM Set the path to the mqexchng binaries to be compressed and cabb'ed.
  35. REM
  36. set mqexchng_path=%_NTPostBld%\mqexchng
  37. pushd %mqexchng_path%\dump
  38. if errorlevel 1 goto :EOF
  39. REM
  40. REM Run updateinf.exe to correct sizes for IExpress gwsetup.inf.
  41. REM
  42. call ExecuteCmd.cmd "updatinf.exe -f -i ..\gwsetup.inf -s ..\"
  43. if errorlevel 1 popd& goto :EOF
  44. if exist ..\*.fix del /f ..\*.fix
  45. if exist ..\*.bak del /f ..\*.bak
  46. REM
  47. REM Use iexpress.exe to generate the self-extracting executable;
  48. REM International builds use the localized version of wextract.exe and advpack.dll.
  49. set mqexchng.sed=%mqexchng_path%\dump\mqexchng.sed
  50. if not exist %mqexchng.sed% (
  51. call errmsg.cmd "File %mqexchng.sed% not found."
  52. popd& goto :EOF
  53. )
  54. if exist %_NTPostBld%\mqexchng.exe del /f %_NTPostBld%\mqexchng.exe
  55. REM
  56. REM Munge the path so we use the correct wextract.exe to build the package with...
  57. REM NOTE: We *want* to use the one we just built (and for Intl localized)!
  58. REM
  59. set _NEW_PATH_TO_PREPEND=%RazzleToolPath%\%PROCESSOR_ARCHITECTURE%\loc\%LANG%
  60. set _OLD_PATH_BEFORE_PREPENDING=%PATH%
  61. set PATH=%_NEW_PATH_TO_PREPEND%;%PATH%
  62. call ExecuteCmd.cmd "start /min /wait iexpress.exe /M /N /Q %mqexchng.sed%"
  63. REM
  64. REM Return the path to what it was before...
  65. REM
  66. set PATH=%_OLD_PATH_BEFORE_PREPENDING%
  67. if not exist %_NTPostBld%\mqexchng.exe (
  68. call errmsg.cmd "IExpress.exe failed on %mqexchng.sed%."
  69. popd& goto :EOF
  70. )
  71. popd
  72. REM
  73. REM Create mqexchng.cat.
  74. REM
  75. call logmsg.cmd "Creating %_NTPostBld%\mqexchng.cat"
  76. set mqexchng.lst=%mqexchng_path%\dump\mqexchng.lst
  77. if exist %mqexchng.lst% call ExecuteCmd.cmd "del /f %mqexchng.lst%"
  78. if errorlevel 1 goto :EOF
  79. for /f %%i in ('dir /a-d /b %mqexchng_path%\*') do (
  80. echo ^<hash^>%mqexchng_path%\%%i=%mqexchng_path%\%%i>> %mqexchng.lst%
  81. )
  82. pushd %RazzleToolPath%
  83. if errorlevel 1 goto :EOF
  84. call createcat.cmd -f:%mqexchng.lst% -c:mqexchng -t:%mqexchng_path%\dump -o:%mqexchng_path%\dump
  85. if errorlevel 1 popd& goto :EOF
  86. popd
  87. REM
  88. REM Copy the cat file to the root of binaries and the cdf file to the cdf directory
  89. REM
  90. call ExecuteCmd.cmd "xcopy /fd /Y %mqexchng_path%\dump\mqexchng.cdf %_NTPostBld%\cdf\"
  91. call ExecuteCmd.cmd "xcopy /fd /Y %mqexchng_path%\dump\mqexchng.cat %_NTPostBld%\"