home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l350 / 2.ddi / BIN / GETMSC.BAT < prev    next >
Encoding:
DOS Batch File  |  1993-02-18  |  5.0 KB  |  166 lines

  1. @echo off
  2. goto batch_start
  3. rem
  4. rem GETMSC.BAT
  5. rem
  6. :usage
  7. echo .
  8. echo This batch file copies the 32-bit Microsoft C compiler
  9. echo from the NT CD-ROM to the specified target directory.
  10. echo Along with the compiler, it will optionally copy the
  11. echo Microsoft sample code and the Microsoft Foundation Classes.
  12. echo .
  13. echo Usage:
  14. echo        GETMSC "cd drive" "target MSC dir" "PL tools dir" [min, sample, max]
  15. echo e.g.
  16. echo         getmsc f: c:\mstools c:\phar386 sample
  17. echo where
  18. echo         "cdrom drive"    = The driver letter for the NT CD-ROM
  19. echo         "target MSC dir" = Target directory for 32-bit MSC compiler
  20. echo         "PL tools dir"   = Directory which contains the Phar Lap 386 SDK
  21. echo         min    = install MSC compiler only
  22. echo         sample = install MSC compiler and Microsoft sample code
  23. echo         max    = install MSC compiler, Microsoft sample code,
  24. echo                  help files, and Microsoft Foundation Classes
  25. echo .
  26. echo The last parameter is optional and if omitted defaults to "min".
  27. goto done
  28. :batch_start
  29. rem
  30. rem First validate the parameters
  31. rem
  32. if "x%1" == "x" goto usage
  33. if "x%2" == "x" goto nomscdir
  34. if "x%3" == "x" goto nopldir
  35. if "x%4" == "x" goto parm4ok
  36. if "%4" == "min" goto parm4ok
  37. if "%4" == "sample" goto parm4ok
  38. if "%4" == "max" goto parm4ok
  39. goto parm4bad
  40. :parm4ok
  41. rem
  42. rem Make sure the CD ROM contains the NT CD-ROM
  43. rem
  44. if not exist %1\mstools\bin\i386\nmake.exe goto badcdrom
  45. rem
  46. rem Make sure that the target directory for the 32-bit compiler
  47. rem does not already have a compiler in it
  48. rem
  49. if exist %2\bin\nmake.exe goto badmscdir
  50. rem
  51. rem Make sure that the Phar Lap SDK directory contains REBIND.EXE
  52. rem and CFIG386.EXE
  53. rem
  54. if not exist %3\bin\rebind.exe goto badpldir
  55. if not exist %3\bin\cfig386.exe goto badpldir
  56. rem
  57. rem Copy the MSC files from the BIN directory to the target directory
  58. rem 
  59. echo Now copying BIN subdirectory
  60. mkdir %2\bin
  61. xcopy %1\mstools\bin\i386 %2\bin /s /e
  62. xcopy %1\i386\ntdll.dll %2\bin /s /e
  63. xcopy %1\i386\cmd.exe %2\bin /s /e
  64. rem
  65. rem Copy the MSC files from the H directory to the target directory
  66. rem 
  67. echo Now copying H subdirectory
  68. mkdir %2\h
  69. xcopy %1\mstools\h %2\h /s /e
  70. rem
  71. rem Copy the MSC files from the INIT directory to the target directory
  72. rem 
  73. echo Now copying INIT subdirectory
  74. mkdir %2\init
  75. xcopy %1\mstools\init %2\init /s /e
  76. rem
  77. rem Copy the MSC files from the  LIB directory to the target directory
  78. rem 
  79. echo Now copying LIB subdirectory
  80. mkdir %2\lib
  81. xcopy %1\mstools\lib\i386 %2\lib /s /e
  82. rem
  83. rem Copy the sample files if we are doing a "sample" or "max" install
  84. rem 
  85. if "%4"=="min" goto done_copy
  86. if "x%4"=="x" goto done_copy
  87. echo Now copying SAMPLES subdirectory
  88. mkdir %2\samples
  89. xcopy %1\mstools\samples %2\samples /s /e
  90. rem
  91. rem Copy the help files and foundation classes if we are doing a "max" install
  92. rem 
  93. if "%4"=="sample" goto done_copy
  94. echo Now copying HELP subdirectory
  95. mkdir %2\help
  96. xcopy %1\mstools\help %2\help /s /e
  97. echo Now copying MFC subdirectory
  98. mkdir %2\mfc
  99. xcopy %1\mstools\mfc %2\mfc /s /e
  100. echo Now copying RPC_DOS subdirectory
  101. mkdir %2\rpc_dos
  102. xcopy %1\mstools\rpc_dos %2\rpc_dos /s /e
  103. rem
  104. rem We are done copying the files.  Now we have to run
  105. rem the REBIND utility on each of the NT executables which
  106. rem we want to run under DOS.
  107. rem
  108. :done_copy
  109. command/c %3\bin\bindone %2\bin CL386 %3\bin
  110. command/c %3\bin\bindone %2\bin C13232 %3\bin silent
  111. command/c %3\bin\bindone %2\bin C1XX3232 %3\bin silent 
  112. command/c %3\bin\bindone %2\bin C23232 %3\bin silent
  113. command/c %3\bin\bindone %2\bin COFF %3\bin
  114. command/c %3\bin\bindone %2\bin CVTOMF %3\bin
  115. command/c %3\bin\bindone %2\bin CVTRES %3\bin
  116. command/c %3\bin\bindone %2\bin LIB %3\bin
  117. command/c %3\bin\bindone %2\bin LINK %3\bin
  118. command/c %3\bin\bindone %2\bin MASM386 %3\bin
  119. command/c %3\bin\bindone %2\bin MIDL %3\bin
  120. command/c %3\bin\bindone %2\bin NMAKE %3\bin
  121. %3\bin\cfig386 %2\bin\nmake.exe -ntcomspec
  122. command/c %3\bin\bindone %2\bin RC %3\bin
  123. command/c %3\bin\bindone %2\bin RCPP %3\bin
  124. rem
  125. rem All done!!
  126. rem 
  127. echo All done
  128. goto done
  129. :nomscdir
  130. echo .
  131. echo Error -- No target directory specified for MSC compiler.
  132. echo .
  133. goto done
  134. :nopldir
  135. echo .
  136. echo Error -- No directory specified for Phar Lap 386 SDK.
  137. echo .
  138. goto done
  139. :parm4bad
  140. echo .
  141. echo Error -- The specified last parameter of "%4" is invalid.
  142. echo It must be "min", "sample", or "max".
  143. echo .
  144. goto done
  145. :badcdrom
  146. echo .
  147. echo Error -- Cannot locate the 32-bit MSC compiler on the
  148. echo specified CD-ROM drive: %1.  Please make sure that the
  149. echo CD-ROM drive contains the NT SDK.
  150. echo .
  151. goto done
  152. :badmscdir
  153. echo .
  154. echo Error -- The specified target directory for the MSC compiler: "%2"
  155. echo must not contain any subdirectories.  If you have already installed
  156. echo a compiler in that directory, you must delete it.
  157. echo .
  158. goto done
  159. :badpldir
  160. echo .
  161. echo Error -- The specified Phar Lap tools directory: "%3" either does
  162. echo not exist or does not contain the Phar Lap 386DOS-Extender SDK.
  163. echo .
  164. goto done
  165. :done
  166.