home *** CD-ROM | disk | FTP | other *** search
- echo off
- if "%1"=="4" goto Test1
- if "%1"=="5" goto Test1
- echo -------------------------------------------------------------------------
- echo - ** ERROR IN PARAMETER #1 ** Select (4 or 5) 4 = Version 4.0
- echo - 5 = Version 5.0 or 5.5
- goto error
- :Test1
- if not "%2"=="" goto Test2
- echo -------------------------------------------------------------------------
- echo - ** ERROR IN PARAMETER #2 ** You must tell this procedure where it can
- echo - locate TPC.EXE - At lease Drive: is required.
- goto error
- :Test2
- if exist %2\TPC.EXE goto Test3
- echo -------------------------------------------------------------------------
- echo - ** ERROR IN PARAMETER #2 ** Unable to locate TPC.EXE in the directory:
- echo -[%2]
- goto error
- :Test3
- if exist scredit.pas goto Test4
- echo -------------------------------------------------------------------------
- echo - ** ERROR IN PARAMETER #2 ** ScrEdit.Pas is not in current directory.
- goto error
- :Test4
- if exist validate.pas goto Test5
- echo -------------------------------------------------------------------------
- echo - ** ERROR IN PARAMETER #2 ** Validate.Pas is not in current directory.
- goto error
- :Test5
- if exist scrmouse.pas goto DoScrEdit
- echo -------------------------------------------------------------------------
- echo - ** ERROR IN PARAMETER #2 ** ScrMouse.Pas is not in current directory.
- goto error
- :error
- echo -------------------------------------------------------------------------
- echo - **** Turbo ScrEdit - Turbo Pascal "Unit" Library Build Utility. ****
- echo -
- echo - This batch file executes the Turbo Pascal command line compiler TPC.EXE
- echo - and creates the files: ScrEdit.Tpu, ScrMouse.Tpu, and Windows.Tpu.
- echo -
- echo - Format: TpuBuild Option Path-1 Path-2
- echo - ------ ------ ------
- echo -
- echo - Option: Specifies your compiler version. Select 4 or 5 (5 = 5 & 5.5)
- echo - Path-1: Drive:\Path where TPC.EXE resides.
- echo - Path-2: Drive:\Path where unit files are to be stored after they are
- echo - compiled.
- echo -
- echo - Example: TpuBuild 5 C:\TP C:\Tp\Units
- echo - -----------------------------------------------------------------------
- goto Bombed
- :DoScrEdit
- if exist windows.pas goto DoWindows
- if "%2"=="" goto C1
- if "%1"=="5" goto Comp2
- %2\tpc /B /E%3 /$B+ /$D- /$R- scredit.pas
- if "%3"=="" goto cont1
- copy *.tpu %3
- del *.tpu
- goto cont1
- :Comp2
- %2\tpc /l /M /$A- /$B+ /$D- /$E+ /$L- /$O+ /$R- /E%3 scredit.pas
- goto cont1
- :C1
- if "%1"=="5" goto Comp3
- tpc /B /E%3 /$B+ /$D- /$R- scredit.pas
- if "%3"=="" goto Cont1
- copy *.tpu %3
- del *.tpu
- goto cont1
- :Comp3
- tpc /l /M /$A- /$B+ /$D- /$E+ /$L- /$O+ /$R- /E%3 scredit.pas
- :cont1
- echo -------------------------------------------------------------------------
- echo - *** Evaluation version does not include pop up windows library ***
- goto done
- :DoWindows
- if "%2"=="" goto C2
- if "%1"=="5" goto Comp4
- %2\tpc /B /$B+ /$D- /$R- Windows.Pas /E%3
- if "%3"=="" goto C3
- copy *.tpu %3
- del *.tpu
- goto C3
- :Comp4
- %2\tpc /l /M /B /$A- /$B+ /$D- /$E+ /$L- /$O+ /$R- /E%3 Windows.pas
- goto C3
- :C2
- if "%1"=="5" goto Comp5
- %2\tpc /B /$B+ /$D- /$R- Windows.Pas
- if "%3"=="" goto C3
- copy *.tpu %3
- del *.tpu
- goto C3
- :Comp5
- %2\tpc /l /M /B /$A- /$B+ /$D- /$E+ /$L- /$O+ /$R- /E%3 Windows.pas
- :C3
- echo -
- echo -
- goto done
- :Bombed
- echo - Turbo ScrEdit Unit File Build ** FAILED ** FAILED ** FAILED ** FAILED
- echo -------------------------------------------------------------------------
- goto end
- :done
- echo -------------------------------------------------------------------------
- echo - Turbo ScrEdit interface unit files hav been created and are ready for
- echo - use.
- echo -
- if "%3" == "" goto blank
- echo - Be sure to include the directory "%3" as one of the
- goto done2
- :blank
- echo - so it includes the current directory as one of the search directories.
- :done2
- echo - directories listed in your compilers OPTION/DIRECTORY/UNIT DIRECTORIES
- echo - search list.
- echo -------------------------------------------------------------------------
- :end
- echo -