home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HomeWare 14
/
HOMEWARE14.bin
/
prog
/
bc4pat_4.arj
/
INSTALL.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-02-15
|
2KB
|
105 lines
@echo off
@rem Save off env's, if already used
if not "%bc4patch%" == "" set oldbc4patch=%bc4patch%
set bc4patch=
@rem Argument checking
if "%0" == "INSTALL" goto Chkusage
if "%0" == "install" goto Chkusage
goto RunFromFloppy
:Chkusage
if "%1" == "" goto Usage
if "%2" == "" goto Usage
if "%2" == "/B" goto Usage
if "%2" == "/b" goto Usage
if not "%3" == "" goto backup
:chkexist
if exist %1\patch.exe goto Warning
@rem Copy patch files
:Copyrtp
@echo.
@echo Copying patch files into %1...
copy patch.exe %1
copy patch.exe %2
copy cddr.com %1
copy bc4p01.rtp %1
copy bc4p02.rtp %1
copy bc4p03.rtp %1
copy ta4p01.rtp %1
copy bc4p04.rtp %2
@rem Running patch
cddr %1
@echo.
@echo Running patch . . .
patch bc4p01.rtp %bc4patch%
@echo Running patch . . .
patch bc4p02.rtp %bc4patch%
@echo Running patch . . .
patch bc4p03.rtp %bc4patch%
@echo Running patch . . .
patch ta4p01.rtp %bc4patch%
@echo Cleaning up . . .
del patch.exe
del bc4p01.rtp
del bc4p02.rtp
del bc4p03.rtp
del ta4p01.rtp
cddr %2
del %1\cddr.com
@echo Running patch . . .
patch bc4p04.rtp %bc4patch%
@echo Cleaning up . . .
del patch.exe
del bc4p04.rtp
@echo.
@echo Patch completed.
@echo.
goto End
:backup
if "%3" == "/b" set bc4patch=-backup
if "%3" == "/B" set bc4patch=-backup
if "%bc4patch%"=="" goto Usage
goto chkexist
:Warning
@echo %1\patch.exe already exists. If you do not wish to
@echo overwrite it, then press Ctrl-Break to exit.
pause
goto Copyrtp
:RunFromFloppy
@echo.
@echo You must run install.bat from the floppy disk drive. For example,
@echo.
@echo a:
@echo install c:\bc4 c:\windows
@echo.
goto Usage
:Usage
@echo.
@echo Borland C++ 4.0 Patch Install
@echo.
@echo install base_dir windows_dir [/b]
@echo.
@echo where the base_dir is the base directory where BC4 is
@echo installed, windows_dir is the directory where Windows
@echo is installed and (the optional) /b specifies to backup the
@echo original file versions. For example,
@echo.
@echo install c:\bc4 c:\windows /b
@echo.
goto End
:End
set bc4patch=
if not "%oldbc4patch%" == "" set bc4patch=%oldbc4patch%