home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / EDITORES / TSCREDD2.ZIP / SCRDISK4.EXE / TPUBUILD.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-05-05  |  4.0 KB  |  121 lines

  1. echo off
  2. if "%1"=="4" goto Test1
  3. if "%1"=="5" goto Test1
  4. echo -------------------------------------------------------------------------
  5. echo - ** ERROR IN PARAMETER #1 ** Select (4 or 5)   4 = Version 4.0
  6. echo -                                               5 = Version 5.0 or 5.5
  7. goto error
  8. :Test1
  9. if not "%2"=="" goto Test2
  10. echo -------------------------------------------------------------------------
  11. echo - ** ERROR IN PARAMETER #2 ** You must tell this procedure where it can
  12. echo - locate TPC.EXE - At lease Drive: is required.
  13. goto error
  14. :Test2
  15. if exist %2\TPC.EXE  goto Test3
  16. echo -------------------------------------------------------------------------
  17. echo - ** ERROR IN PARAMETER #2 ** Unable to locate TPC.EXE in the directory:
  18. echo -[%2]
  19. goto error
  20. :Test3
  21. if exist scredit.pas goto Test4
  22. echo -------------------------------------------------------------------------
  23. echo - ** ERROR IN PARAMETER #2 ** ScrEdit.Pas is not in current directory.
  24. goto error
  25. :Test4
  26. if exist validate.pas goto Test5
  27. echo -------------------------------------------------------------------------
  28. echo - ** ERROR IN PARAMETER #2 ** Validate.Pas is not in current directory.
  29. goto error
  30. :Test5
  31. if exist scrmouse.pas goto DoScrEdit
  32. echo -------------------------------------------------------------------------
  33. echo - ** ERROR IN PARAMETER #2 ** ScrMouse.Pas is not in current directory.
  34. goto error
  35. :error
  36. echo -------------------------------------------------------------------------
  37. echo - ****  Turbo ScrEdit - Turbo Pascal "Unit" Library Build Utility.   ****
  38. echo -
  39. echo - This batch file executes the Turbo Pascal command line compiler TPC.EXE
  40. echo - and creates the files: ScrEdit.Tpu, ScrMouse.Tpu, and Windows.Tpu.
  41. echo -
  42. echo - Format: TpuBuild Option Path-1 Path-2
  43. echo -                  ------ ------ ------
  44. echo -
  45. echo - Option: Specifies your compiler version. Select 4 or 5 (5 = 5 & 5.5)
  46. echo - Path-1: Drive:\Path where TPC.EXE resides.
  47. echo - Path-2: Drive:\Path where unit files are to be stored after they are
  48. echo -         compiled.
  49. echo -
  50. echo -     Example: TpuBuild 5 C:\TP C:\Tp\Units
  51. echo - -----------------------------------------------------------------------
  52. goto Bombed
  53. :DoScrEdit
  54. if exist windows.pas goto DoWindows
  55. if "%2"=="" goto C1
  56. if "%1"=="5" goto Comp2
  57. %2\tpc /B /E%3 /$B+ /$D- /$R- scredit.pas
  58. if "%3"=="" goto cont1
  59. copy *.tpu %3
  60. del  *.tpu
  61. goto cont1
  62. :Comp2
  63. %2\tpc /l /M /$A- /$B+ /$D- /$E+ /$L- /$O+ /$R- /E%3 scredit.pas
  64. goto cont1
  65. :C1
  66. if "%1"=="5" goto Comp3
  67. tpc /B /E%3 /$B+ /$D- /$R- scredit.pas
  68. if "%3"=="" goto Cont1
  69. copy *.tpu %3
  70. del  *.tpu
  71. goto cont1
  72. :Comp3
  73. tpc /l /M /$A- /$B+ /$D- /$E+ /$L- /$O+ /$R- /E%3 scredit.pas
  74. :cont1
  75. echo -------------------------------------------------------------------------
  76. echo - ***   Evaluation version does not include pop up windows library    ***
  77. goto done
  78. :DoWindows
  79. if "%2"=="" goto C2
  80. if "%1"=="5" goto Comp4
  81. %2\tpc /B /$B+ /$D- /$R- Windows.Pas /E%3
  82. if "%3"=="" goto C3
  83. copy *.tpu %3
  84. del  *.tpu
  85. goto C3
  86. :Comp4
  87. %2\tpc /l /M /B /$A- /$B+ /$D- /$E+ /$L- /$O+ /$R- /E%3 Windows.pas
  88. goto C3
  89. :C2
  90. if "%1"=="5" goto Comp5
  91. %2\tpc /B /$B+ /$D- /$R- Windows.Pas
  92. if "%3"=="" goto C3
  93. copy *.tpu %3
  94. del  *.tpu
  95. goto C3
  96. :Comp5
  97. %2\tpc /l /M /B /$A- /$B+ /$D- /$E+ /$L- /$O+ /$R- /E%3 Windows.pas
  98. :C3
  99. echo -
  100. echo -
  101. goto done
  102. :Bombed
  103. echo -  Turbo ScrEdit Unit File Build ** FAILED ** FAILED ** FAILED ** FAILED
  104. echo -------------------------------------------------------------------------
  105. goto end
  106. :done
  107. echo -------------------------------------------------------------------------
  108. echo - Turbo ScrEdit interface unit files hav been created and are ready for
  109. echo - use.
  110. echo -
  111. if  "%3" == "" goto  blank
  112. echo - Be sure to include the directory "%3" as one of the
  113. goto done2
  114. :blank
  115. echo - so it includes the current directory as one of the search directories.
  116. :done2
  117. echo - directories listed in your compilers OPTION/DIRECTORY/UNIT DIRECTORIES
  118. echo - search list.
  119. echo -------------------------------------------------------------------------
  120. :end
  121. echo -