home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
099
/
STRPP300.ZIP
/
STRNG.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-04-11
|
3KB
|
109 lines
@echo off
cls
echo
if %1==-u goto uninstall
:install
echo String++ Installation
echo ---------------------------------
if %1!==! goto syntax
if not exist %1\*.* goto badpath1
if not exist %1\classlib\*.* goto badpath1
echo
echo This will install String++ in the
echo Borland Container Class Library.
echo
echo Backup files will be named *.BCC
echo in the classlib directories.
echo
echo Press Ctrl-Break to abort or
pause
echo
echo Renaming classlib\include\strng.h...
ren %1\classlib\include\strng.h %1\classlib\include\strng.bcc
echo Renaming classlib\source\strng.cpp...
ren %1\classlib\source\strng.cpp %1\classlib\source\strng.bcc
echo Copying classlib\lib\tclassl.lib...
copy %1\classlib\lib\tclassl.lib %1\classlib\lib\tclassl.bcc
echo
echo Copying header and source files...
copy strng.h %1\classlib\include
copy regexp.h %1\classlib\include
copy parsestr.h %1\classlib\include
copy filestr.h %1\classlib\include
copy strng.cpp %1\classlib\source
copy str.cpp %1\classlib\source
copy regexp.cpp %1\classlib\source
copy parsestr.cpp %1\classlib\source
copy filestr.cpp %1\classlib\source
echo
echo Modifying %1\classlib\lib\tclassl.lib...
%1\bin\tlib %1\classlib\lib\tclassl.lib -strng
%1\bin\tlib %1\classlib\lib\tclassl.lib +strng.lib
del %1\classlib\lib\tclassl.bak
echo
echo Done.
goto end
:uninstall
echo String++ Uninstall
echo -------------------------------------
if %2!==! goto syntax
if not exist %2\*.* goto badpath2
echo
echo This will UNINSTALL String++ from
echo the Borland Container Class Library.
echo
echo Press Ctrl-Break to abort or
pause
echo
echo Restoring header and source files...
if exist %2\classlib\include\strng.bcc copy %2\classlib\include\strng.bcc %2\classlib\include\strng.h
if exist %2\classlib\include\strng.bcc del %2\classlib\include\strng.bcc
if exist %2\classlib\include\filestr.h del %2\classlib\include\filestr.h
if exist %2\classlib\include\parsestr.h del %2\classlib\include\parsestr.h
if exist %2\classlib\include\regexp.h del %2\classlib\include\regexp.h
if exist %2\classlib\source\strng.bcc copy %2\classlib\source\strng.bcc %2\classlib\source\strng.cpp
if exist %2\classlib\source\strng.bcc del %2\classlib\source\strng.bcc
if exist %2\classlib\source\str.cpp del %2\classlib\source\str.cpp
if exist %2\classlib\source\filestr.cpp del %2\classlib\source\filestr.cpp
if exist %2\classlib\source\parsestr.cpp del %2\classlib\source\parsestr.cpp
if exist %2\classlib\source\regexp.cpp del %2\classlib\source\regexp.cpp
echo
echo Restoring %2\classlib\lib\tclassl.lib...
if exist %2\classlib\lib\tclassl.bcc copy %2\classlib\lib\tclassl.bcc %2\classlib\lib\tclassl.lib
if exist %2\classlib\lib\tclassl.bcc del %2\classlib\lib\tclassl.bcc
goto end
:syntax
echo
echo Syntax error:
echo To install String++ to the Bor-
echo land Container Class Library type
echo
echo %0 pathname
echo
echo where pathname is the name of the
echo Borland C++ directory
echo
echo To uninstall String++ from the
echo BCCL type
echo
echo %0 -u pathname
echo
echo Examples:
echo %0 d:\bc
echo %0 -u d:\bc
goto end
:badpath1
echo
echo Invalid path %1
goto end
:badpath2
echo
echo Invalid path %2
:end