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.

111 lines
5.0 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM makeupgadvimg.cmd
  5. REM
  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. makeupgadvimg.cmd
  21. USAGE
  22. parseargs('?' => \&Usage);
  23. # *** NEXT FEW LINES ARE TEMPLATE ***
  24. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  25. __END__
  26. :CPCBegin
  27. set _CPCMAGIC=
  28. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  29. REM
  30. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  31. REM
  32. @echo off
  33. REM
  34. REM Set local variable's state
  35. REM
  36. set UPGADVBUILDERROR=0
  37. REM
  38. REM We only create upgadv images on x86fre builds
  39. REM
  40. if /i NOT "%_BuildArch%" == "x86" (
  41. goto :upgadv_done
  42. )
  43. if /i NOT "%_BuildType%" == "fre" (
  44. goto :upgadv_done
  45. )
  46. echo.
  47. echo ---------------------------------------
  48. echo Beginning UpgAdv image generation
  49. echo ---------------------------------------
  50. echo.
  51. REM
  52. REM Go ahead and create the UpgAdv image
  53. REM
  54. call logmsg.cmd /t "Creating the UpgAdv image..."
  55. SET UPGADV_TARGET=%_NTPOSTBLD%\upgadv
  56. call ExecuteCmd.cmd "if not exist %UPGADV_TARGET%\i386\system32 md %UPGADV_TARGET%\i386\system32"
  57. call ExecuteCmd.cmd "copy /Y %_NTPostBld%\dump\upgauto.inf %UPGADV_TARGET%\autorun.inf"
  58. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\dump\upgrade.exe %UPGADV_TARGET%"
  59. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\winnt32.exe %UPGADV_TARGET%\i386"
  60. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\winnt32.hlp %UPGADV_TARGET%\i386"
  61. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\winnt32a.dll %UPGADV_TARGET%\i386"
  62. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\winnt32u.dll %UPGADV_TARGET%\i386"
  63. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\pidgen.dll %UPGADV_TARGET%\i386"
  64. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\winntbba.dll %UPGADV_TARGET%\i386"
  65. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\winntbbu.dll %UPGADV_TARGET%\i386"
  66. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\hwdb.dll %UPGADV_TARGET%\i386"
  67. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\wsdu.dll %UPGADV_TARGET%\i386"
  68. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\wsdueng.dll %UPGADV_TARGET%\i386"
  69. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\hwcomp.dat %UPGADV_TARGET%\i386"
  70. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\txtsetup.sif %UPGADV_TARGET%\i386"
  71. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\dosnet.inf %UPGADV_TARGET%\i386"
  72. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\system32 %UPGADV_TARGET%\i386"
  73. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\setupp.ini %UPGADV_TARGET%\i386"
  74. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\intl.inf %UPGADV_TARGET%\i386"
  75. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\eula.txt %UPGADV_TARGET%\i386"
  76. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\filelist.da_ %UPGADV_TARGET%\i386"
  77. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\migisol.ex_ %UPGADV_TARGET%\i386"
  78. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\wkstamig.in_ %UPGADV_TARGET%\i386"
  79. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\drvindex.inf %UPGADV_TARGET%\i386"
  80. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\keyboard.in_ %UPGADV_TARGET%\i386"
  81. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\hivesft.inf %UPGADV_TARGET%\i386"
  82. call ExecuteCmd.cmd "xcopy /R /Q /C /D /Y %_NTPostBld%\pro\i386\system32\ntdll.dll %UPGADV_TARGET%\i386\system32"
  83. call ExecuteCmd.cmd "xcopy /R /Q /C /E /I /D /Y %_NTPostBld%\pro\i386\win9xmig %UPGADV_TARGET%\i386\win9xmig"
  84. call ExecuteCmd.cmd "xcopy /R /Q /C /E /I /D /Y %_NTPostBld%\pro\i386\drw %UPGADV_TARGET%\i386\drw"
  85. call ExecuteCmd.cmd "xcopy /R /Q /C /E /I /D /Y %_NTPostBld%\pro\i386\compdata %UPGADV_TARGET%\i386\compdata"
  86. call ExecuteCmd.cmd "xcopy /R /Q /C /E /I /D /Y %_NTPostBld%\pro\i386\win9xupg %UPGADV_TARGET%\i386\win9xupg"
  87. call ExecuteCmd.cmd "xcopy /R /Q /C /E /I /D /Y %_NTPostBld%\pro\i386\winntupg %UPGADV_TARGET%\i386\winntupg"
  88. :upgadv_error
  89. set UPGADVBUILDERROR=%errorlevel%
  90. call logmsg.cmd /t "Done with UpgAdv image generation"
  91. echo.
  92. echo ---------------------------------------
  93. echo Done with UpgAdv image generation
  94. echo ---------------------------------------
  95. echo.
  96. :upgadv_done
  97. seterror.exe "%UPGADVBUILDERROR%"