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.

142 lines
4.3 KiB

  1. @echo off
  2. setlocal
  3. REM It's necessary to use the IExpress and advpack.dll from X:\nt\idw instead of %windir%\system32
  4. REM because it's the wrong version and doesn't work on alpha.
  5. set path=%_NTBINDIR%\idw;%path%
  6. if "%1"=="help" goto HELP_SECTION
  7. if "%1"=="-h" goto HELP_SECTION
  8. if "%1"=="/h" goto HELP_SECTION
  9. if "%1"=="-help" goto HELP_SECTION
  10. if "%1"=="/help" goto HELP_SECTION
  11. if "%1"=="-?" goto HELP_SECTION
  12. if "%1"=="/?" goto HELP_SECTION
  13. if "%1"=="" goto SNIFF
  14. if "%1"=="verbose" goto SNIFF
  15. if "%1"=="alllang" goto SNIFF
  16. goto SKIP_VER_SNIFF
  17. :SNIFF
  18. for /f "tokens=5" %%i in ('lsv.exe comc95.dll') do set COMCTL32_VERSION=%%i
  19. for /f "tokens=5" %%i in ('lsv.exe comcnt.dll') do set COMCTL32_VERSION_NT=%%i
  20. goto BUILD_CONTINUE
  21. :SKIP_VER_SNIFF
  22. set COMCTL32_VERSION=%1
  23. set COMCTL32_VERSION_NT=%1
  24. :BUILD_CONTINUE
  25. if not exist comc95.dll goto ERROR_DLLS_NOT_FOUND
  26. if not exist comcnt.dll goto ERROR_DLLS_NOT_FOUND
  27. if not "%COMCTL32_VERSION%"=="%COMCTL32_VERSION_NT%" goto ERROR_VERSION_MISMATCH
  28. set BUILD_OPTIONS=normal
  29. if "%1"=="verbose" set BUILD_OPTIONS=verbose
  30. if "%2"=="verbose" set BUILD_OPTIONS=verbose
  31. if "%3"=="verbose" set BUILD_OPTIONS=verbose
  32. if "%1"=="alllang" goto BUILD_ALLLANG_SECTION
  33. if "%2"=="alllang" goto BUILD_ALLLANG_SECTION
  34. if "%3"=="alllang" goto BUILD_ALLLANG_SECTION
  35. :BUILD_ENGLISH_SECTION
  36. set BLD_LANG=en
  37. echo /***************************************************************\
  38. echo Building Comctl32 Redistribution Package
  39. echo .
  40. echo Languages: English
  41. echo Version: %COMCTL32_VERSION%
  42. echo \****************************************************************/
  43. if "%BLD_LANG%"=="alllang" goto ERROR_LANG
  44. if "%BLD_LANG%"=="verbose" goto ERROR_LANG
  45. call pack.bat %BLD_LANG% %COMCTL32_VERSION% %BUILD_OPTIONS%
  46. goto END_SECTION
  47. :BUILD_ALLLANG_SECTION
  48. echo /***************************************************************\
  49. echo Building Comctl32 Redistribution Package
  50. echo .
  51. echo Languages: All
  52. echo Version: %COMCTL32_VERSION%
  53. echo \****************************************************************/
  54. if "%BLD_LANG%"=="alllang" goto ERROR_LANG
  55. if "%BLD_LANG%"=="verbose" goto ERROR_LANG
  56. for /d %%n IN (*.*) do call pack.bat %%n %COMCTL32_VERSION% %BUILD_OPTIONS%
  57. goto END_SECTION
  58. @rem Propagate the cabs to the parent
  59. REM move MSIEFTP.cab ..
  60. REM move MSIEFTP.exe ..
  61. :HELP_SECTION
  62. REM =================================================================
  63. REM ================= HELP SECTION ================
  64. REM =================================================================
  65. REM
  66. echo /****************************************************************\
  67. echo Building Comctl32 Redistribution Package Help
  68. echo .
  69. echo Usage: MKREDIST version [verbose] [alllang] [help]
  70. echo .
  71. echo verbose: This will display error dialogs if the .SED file has
  72. echo parsing errors. It will also display progress during
  73. echo the building process in a separate window.
  74. echo alllang: This means build all the language subdirectories.
  75. echo help: Display this help text.
  76. echo .
  77. echo .
  78. echo WARNING: We can not ship comctl32 redist packages for NT5
  79. echo because it requires files to be signed and distributed
  80. echo in service packs.
  81. echo \****************************************************************/
  82. goto END_SECTION
  83. :ERROR_NOVER_SECTION
  84. REM =================================================================
  85. REM ================= ERROR SECTION ================
  86. REM =================================================================
  87. REM
  88. echo No version number was specified. This is required.
  89. goto HELP_SECTION
  90. :ERROR_LANG
  91. REM =================================================================
  92. REM ================= ERROR SECTION ================
  93. REM =================================================================
  94. REM
  95. echo Internal error. Could not get the correct language.
  96. echo Language = %BLD_LANG%
  97. goto HELP_SECTION
  98. :ERROR_VERSION_MISMATCH
  99. echo ERROR: The version numbers of the Win95 and WinNT versions of comctl32.dll
  100. echo don't match. Win95=%COMCTL32_VERSION% WinNT=%COMCTL32_VERSION_NT%
  101. goto END_SECTION
  102. :ERROR_DLLS_NOT_FOUND
  103. echo ERROR: In order to build the redist package, you need to copy the Win95 comctl32.dll
  104. echo to this directory and rename it comc95.dll. You will also need to
  105. echo do the same for comcnt.dll.
  106. goto END_SECTION
  107. :END_SECTION