home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 4
/
BUGCD1997_05.BIN
/
aplic
/
clip4win
/
clip4win.exe
/
C4W30E.HUF
/
BIN
/
C4WBUILD.BAT
next >
Wrap
DOS Batch File
|
1995-07-24
|
2KB
|
120 lines
@echo off
if %1x == x goto usage
if %1 == @ echo on
if %1 == @ shift
set _d_=
if %C4WLINKER%x == BLINKERx goto compile
:guess
if exist %1.rmk goto ownrmk
:compile
clipper %1 /n /w
if errorlevel 1 goto comerr
if exist clip4win.def set _d_=clip4win
if exist oo.def set _d_=oo
if exist %1.def set _d_=%1
if %C4WLINKER%x == BLINKERx goto blinker
if exist %1.bli goto blinker
if exist %1.msl goto link
if %BLINKER%x == x goto link
:blinker
if exist %1.bli goto blinker1
if exist %1.lnk goto blinker2
blinker fi %1 lib %2wbrowset,c4wclass,topclass,clip4win deffile %_d_%.def
if errorlevel 1 goto linkerr
goto blinker3
:blinker1
blinker @%1.bli
if errorlevel 1 goto linkerr
goto blinker3
:blinker2
blinker @%1.lnk
if errorlevel 1 goto linkerr
goto blinker3
:blinker3
if exist %1.res goto res
if exist %1.rc goto rc
goto exit
:link
if exist %1.msl goto link1
if exist %1.lnk goto link2
if %_d_%x == x goto deferr
link /se:900 %1,,nul,%2wbrowset+c4wclass+topclass+clip4win,%_d_%.def
if errorlevel 1 goto linkerr
goto link3
:link1
link @%1.msl
if errorlevel 1 goto linkerr
goto link3
:link2
link @%1.lnk
if errorlevel 1 goto linkerr
goto link3
:link3
if exist %1.res goto res
if exist %1.rc goto rc
goto exit
:rc
rc -r %1
if errorlevel 1 goto rcerr
:res
rc -k %1
if errorlevel 1 goto reserr
goto exit
:ownrmk
rmake %1 /dC4WLINKER:%C4WLINKER% /dBLINKER:%BLINKER% /dC4WRC:%C4WRC%
goto exit
:comerr
echo Compile failed!
echo If you need help, run C4WBUILD with no parameters.
goto exit
:deferr
echo Link not attempted - no .DEF file found!
echo If you need help, run C4WBUILD with no parameters.
goto exit
:linkerr
echo Link failed - maybe you need to specify libs?
echo For help, run C4WBUILD with no parameters.
goto exit
:rcerr
echo RC -R %1 failed!
goto exit
:reserr
echo RC -K %1 failed!
goto exit
:usage
echo Syntax: C4WBUILD name [libs] Just name, not name.PRG
echo ......
echo If libs are specified for BLINKER, separate and end them with ","
echo Example:
echo ....... C4WBUILD YOURFILE OTABT,
echo .......
echo If libs are specified for MS LINK, separate and end them with "+"
echo Example:
echo ....... C4WBUILD YOURFILE OTABT+
goto exit
:exit
set _d_=