echo   ###############################################
echo   #  Installation procedure for WATCOM C/C++32  #
echo   ###############################################
#
ask doshost Will you be using DOS as a development environment [1800K] ?
ask os2host Will you be using OS/2 as a development environment [499K] ?
ask nthost Will you be using Windows NT as a development environment [1500K] ?
ask dosx Will you be developing 32-bit applications for a DOS Extender [503K] ?
set pls n
set ecs n
set dos4g n
set ads n
if %dosx ask pls Do you wish to install support for the Phar Lap DOS extender [171K] ?
if %dosx ask ecs Do you wish to install support for the Ergo DOS extender [18K] ?
if %dosx ask dos4g Do you wish to install support for the Rational DOS extender [417K] ?
if %dosx ask ads Do you wish to install support for the AutoCAD Development System [71K] ?
ask win3tgt Will you be developing 32-bit applications for Windows 3.x [2087K] ? 
set wex n
set doc n
set penw n
if %win3tgt ask wex Do you want Windows 3.x examples installed [644K] ?
if %win3tgt ask doc Do you want Windows 3.x on-line help installed [3928K] ?
if %win3tgt ask penw Do you want Windows for Pen support installed [100K] ?
ask os2tgt Will you be developing 32-bit applications for OS/2 2.0 [2300K] ?
ask nttgt Will you be developing 32-bit applications for Windows NT [300K] ?
ask help Do you wish to install the HELP utility and help files [460K] ?
ask nlm Do you wish to install debugger support for NLMs [135K] ?
ask wprof Do you wish to install the Profiler [550K] ?
ask pen Do you wish to install PenPoint Debugger Support [28K] ?
#
# create directories
#
mkdir %2
mkdir %2bin
mkdir %2binb
mkdir %2binp
mkdir %2binp\dll
mkdir %2binp\help
mkdir %2binw
if %nthost mkdir %2binnt
if %nlm mkdir %2nlm
mkdir %2lib386
mkdir %2lib386\dos
if %os2tgt mkdir %2lib386\os2
if %nttgt mkdir %2lib386\nt
mkdir %2lib386\win
mkdir %2src
mkdir %2src\goodies
if %win3tgt mkdir %2src\inc
mkdir %2src\startup
mkdir %2src\startup\386
if %ads mkdir %2src\startup\ads
mkdir %2src\dll
mkdir %2src\win
if %wex mkdir %2src\win\alarm
if %wex mkdir %2src\win\chart
if %wex mkdir %2src\win\datactl
if %wex mkdir %2src\win\edit
if %wex mkdir %2src\win\filedll
if %wex mkdir %2src\win\generic
if %wex mkdir %2src\win\helpex
if %wex mkdir %2src\win\iconview
if %wex mkdir %2src\win\life
if %wex mkdir %2src\win\shootgal
if %wex mkdir %2src\win\watzee
mkdir %2h
mkdir %2h\sys
if %os2tgt mkdir %2h\os2
if %win3tgt mkdir %2h\win
if %nttgt mkdir %2h\nt
if %pen mkdir %2pen
#
# install diskette #1
#
unpack %2 %1readme.wpk
unpack %2binb\ %1wcl386.wpk
if %doshost unpack %2bin\ %1wpp386.dos
if %os2host unpack %2binp\ %1wpp386.os2
if %os2host unpack %2binp\dll\ %1wccopts.dlp
if %os2host unpack %2binp\help\ %1wccopts.hpk
if %os2host unpack %2.\ %1wcc386.prk
if %os2host unpack %2.\ %1wpp386.prk
unpack %2binb\ %1wmake.wpk
unpack %2binb\ %1womp.wpk
unpack %2binb\ %1wdisasm.wpk
if %doshost unpack %2bin\ %1cfig386.wpk
unpack %2src\ %1src386.wpk
unpack %2src\ %1cppsrc.wpk
if %dos4g unpack %2src\ %1wstubsrc.wpk
unpack %2src\startup\ %1startup.wpk
unpack %2src\startup\386\ %1startup.386
if %win3tgt unpack %2src\startup\386\ %1startup.w32
if %ads unpack %2src\startup\ads\ %1startup.ads
unpack %2h\ %1h.wpk
unpack %2h\ %1hpp.wpk
unpack %2h\ %1h386.wpk
unpack %2h\sys\ %1h_sys.wpk
if %doshost unpack %2bin\ %1cmdedit.wpk
unpack %2binb\ %1cmdedit.hpk
if %os2host unpack %2binp\ %1os2edit.wpk
#
# install diskette #2
#
enter %1wlink.dos disk 2, labelled "Linker & Library Disk"
if %doshost unpack %2bin\ %1wlink.dos
if %doshost unpack %2bin\ %1wlinkp.wpk
if %doshost unpack %2bin\ %1wlinklnk.dos
if %os2host unpack %2binp\ %1wlink.os2
if %os2host unpack %2binp\ %1wlinklnk.os2
unpack %2binb\ %1wlsystem.wpk
unpack %2binb\ %1ms2wlink.wpk
if %doshost unpack %2bin\ %1wcc386p.wpk
unpack %2binb\ %1wstrip.wpk
if %dosx unpack %2lib386\dos\ %1clib3r.dos
if %dosx unpack %2lib386\dos\ %1clib3s.dos
if %dosx unpack %2lib386\dos\ %1emu387.dos
if %dosx unpack %2lib386\dos\ %1graph.dos
if %ads unpack %2lib386\dos\ %1adsstart.wpk
if %os2tgt unpack %2lib386\os2\ %1clib3r.os2
if %os2tgt unpack %2lib386\os2\ %1clib3s.os2
if %os2tgt unpack %2lib386\os2\ %1emu387.os2
unpack %2lib386\ %1math3r.wpk
unpack %2lib386\ %1math387r.wpk
unpack %2lib386\ %1math3s.wpk
unpack %2lib386\ %1math387s.wpk
unpack %2lib386\ %1noemu387.wpk
unpack %2lib386\ %1plib.wpk
unpack %2lib386\ %1plibmt.wpk
unpack %2lib386\ %1cplx.wpk
unpack %2lib386\ %1cplx7.wpk
if %win3tgt unpack %2binw\ %1filedll.win
if %win3tgt unpack %2lib386\win\ %1clib3r.win
if %win3tgt unpack %2lib386\win\ %1clib3s.win
if %win3tgt unpack %2lib386\win\ %1emu387.win
if %win3tgt unpack %2lib386\win\ %1win386.wpk
#
# install diskette #3
#
enter %1wvideo.dos disk 3, labelled "Debugger & Profiler Disk"
if %doshost unpack %2bin\ %1wvideo.dos
if %os2host unpack %2binp\ %1wvideo.os2
if %os2host unpack %2binp\ %1vidserv.os2
if %os2host unpack %2binp\dll\ %1vid_dll.wpk
if %os2host unpack %2binp\dll\ %1os2edit.dlp
if %win3tgt unpack %2binw\ %1wvideo.win
if %win3tgt unpack %2binw\ %1wdebug.win
if %win3tgt unpack %2binw\ %1wemu387.win
if %win3tgt unpack %2binw\ %1vidserv.win
if %doshost unpack %2bin\ %1trap.wpk
if %doshost unpack %2bin\ %1trap386.wpk
if %doshost if %ads unpack %2bin\ %1adshelp.wpk
if %doshost if %pls unpack %2bin\ %1plshelp.wpk
if %doshost if %dos4g unpack %2bin\ %1rsihelp.wpk
if %doshost if %pls unpack %2bin\ %1dbglib.wpk
if %doshost unpack %2bin\ %1vidserv.dos
if %doshost unpack %2bin\ %1rfx.dos
if %os2host unpack %2binp\ %1rfx.os2
unpack %2binb\ %1vid_dbg.386
unpack %2binb\ %1vid_prs.wpk
unpack %2binb\ %1vid_help.wpk
if %wprof unpack %2binb\ %1wprof.wpk
if %wprof if %ecs unpack %2bin\ %1wsampecs.wpk
if %wprof if %pls unpack %2bin\ %1wsamppls.wpk
if %wprof if %dos4g unpack %2bin\ %1wsamprsi.wpk
if %wprof if %win3tgt unpack %2binw\ %1wsamplew.win
if %wprof if %os2tgt unpack %2binp\ %1wsampos2.wpk
if %wprof if %os2tgt unpack %2binp\ %1wsmpos22.os2
if %wprof unpack %2binb\ %1wprofhlp.wpk
unpack %2binb\ %1bpatch.wpk
#
# install diskette #4
#
enter %1win31mwh.wpk disk 4, labelled "Windows SDK Disk 1"
if %doc unpack %2binw\ %1win31mwh.wpk
if %win3tgt unpack %2binw\ %1shed.wpk
if %win3tgt unpack %2binw\ %1shell.wpk
if %penw unpack %2binw\ %1penapiwh.wpk
if %win3tgt unpack %2binw\ %1mcistrwh.wpk
if %win3tgt unpack %2src\inc\ %1src_inc.wpk
if %win3tgt unpack %2binw\ %1winhelp.wpk
if %win3tgt unpack %2binw\ %1regload.wpk
if %win3tgt unpack %2binw\ %1vtd.wpk
if %penw unpack %2binw\ %1penwin.wpk
if %win3tgt unpack %2binw\ %1ddeml.wpk
if %win3tgt unpack %2binw\ %1dib.wpk
if %win3tgt unpack %2binw\ %1lzexpand.wpk
if %win3tgt unpack %2binw\ %1ole.wpk
if %win3tgt unpack %2binw\ %1stress.wpk
if %win3tgt unpack %2binw\ %1toolhelp.wpk
if %win3tgt unpack %2binw\ %1ver.wpk
if %penw unpack %2binw\ %1msmouse.wpk
if %penw unpack %2binw\ %1penwini.wpk
if %penw unpack %2binw\ %1vgap.wpk
if %penw unpack %2binw\ %1yesmouse.wpk
if %win3tgt unpack %2h\win\ %1win31hdr.wpk
if %win3tgt unpack %2h\win\ %1win3xhdr.wpk
if %win3tgt unpack %2binb\ %1wrc.wpk
if %win3tgt unpack %2binb\ %1mrbc.wpk
if %win3tgt unpack %2bin\ %1markmidi.wpk
if %win3tgt unpack %2binw\ %1win386.win
unpack %2binb\ %1techinfo.wpk
#
# install diskette #5
#
enter %1hc30.wpk disk 5, labelled "Windows SDK Disk 2"
if %win3tgt unpack %2binb\ %1hc30.wpk
if %win3tgt unpack %2binb\ %1hc31.wpk
if %win3tgt unpack %2binw\ %1commdlg.lng
ifnot %win3tgt goto skip_commdlg
@copy %2binw\commdlg.por %2binw\commdlg.dan
@spawn %2binb\bpatch -p -b %2binw\cdlg_dan.dif -f %2binw\commdlg.dan
@erase %2binw\cdlg_dan.dif
@copy %2binw\commdlg.por %2binw\commdlg.dll
@spawn %2binb\bpatch -p -b %2binw\cdlg_dll.dif -f %2binw\commdlg.dll
@erase %2binw\cdlg_dll.dif
@copy %2binw\commdlg.por %2binw\commdlg.dut
@spawn %2binb\bpatch -p -b %2binw\cdlg_dut.dif -f %2binw\commdlg.dut
@erase %2binw\cdlg_dut.dif
@copy %2binw\commdlg.por %2binw\commdlg.fin
@spawn %2binb\bpatch -p -b %2binw\cdlg_fin.dif -f %2binw\commdlg.fin
@erase %2binw\cdlg_fin.dif
@copy %2binw\commdlg.por %2binw\commdlg.frn
@spawn %2binb\bpatch -p -b %2binw\cdlg_frn.dif -f %2binw\commdlg.frn
@erase %2binw\cdlg_frn.dif
@copy %2binw\commdlg.por %2binw\commdlg.ger
@spawn %2binb\bpatch -p -b %2binw\cdlg_ger.dif -f %2binw\commdlg.ger
@erase %2binw\cdlg_ger.dif
@copy %2binw\commdlg.por %2binw\commdlg.itn
@spawn %2binb\bpatch -p -b %2binw\cdlg_itn.dif -f %2binw\commdlg.itn
@erase %2binw\cdlg_itn.dif
@copy %2binw\commdlg.por %2binw\commdlg.nor
@spawn %2binb\bpatch -p -b %2binw\cdlg_nor.dif -f %2binw\commdlg.nor
@erase %2binw\cdlg_nor.dif
@copy %2binw\commdlg.por %2binw\commdlg.spa
@spawn %2binb\bpatch -p -b %2binw\cdlg_spa.dif -f %2binw\commdlg.spa
@erase %2binw\cdlg_spa.dif
@copy %2binw\commdlg.por %2binw\commdlg.swe
@spawn %2binb\bpatch -p -b %2binw\cdlg_swe.dif -f %2binw\commdlg.swe
@erase %2binw\cdlg_swe.dif
skip_commdlg:
if %penw unpack %2binw\ %1beditde.wpk
if %penw unpack %2binw\ %1heditde.wpk
if %win3tgt unpack %2binb\ %1wbind.wpk
if %doshost if %dos4g unpack %2bin\ %1privatxm.wpk
if %doshost unpack %2bin\ %1chkmouse.wpk
if %wex unpack %2src\win\ %1build.wex
if %wex unpack %2src\win\alarm\ %1alarm.wex
if %wex unpack %2src\win\chart\ %1chart.wex
if %wex unpack %2src\win\datactl\ %1datactl.wex
if %wex unpack %2src\win\edit\ %1edit.wex
if %wex unpack %2src\win\filedll\ %1filedll.wex
if %wex unpack %2src\win\generic\ %1generic.wex
if %wex unpack %2src\win\helpex\ %1helpex.wex
if %wex unpack %2src\win\iconview\ %1iconview.wex
if %wex unpack %2src\win\life\ %1life.wex
if %wex unpack %2src\win\shootgal\ %1shootgal.wex
if %wex unpack %2src\win\watzee\ %1watzee.wex
unpack %2src\dll\ %1dll.sdk
if %nlm unpack %2nlm\ %1novserv.nlp
if %nlm unpack %2nlm\ %1parserv.nlp
if %nlm unpack %2nlm\ %1serserv.nlp
if %nlm unpack %2nlm\ %1wsample.nlp
unpack %2binb\ %1wtouch.wpk
unpack %2binb\ %1wlib.wpk
if %win3tgt unpack %2binw\ %1w386dll.win
if %pen unpack %2pen\ %1ppdebug.wpk
if %help unpack %2binb\ %1graphhlp.wpk
if %os2tgt unpack %2h\os2\ %1os2hdr.wpk
if %os2tgt unpack %2binp\help\ %1watcomc.hpk
unpack %2src\goodies\ %1goodies.wpk
#
# install diskette #6
#
enter %1dos4gw.wpk disk 6, labelled "DOS/4GW Disk"
if %doshost if %dos4g unpack %2bin\ %1dos4gw.wpk
if %doshost if %dos4g unpack %2bin\ %1pminfo.wpk
if %doshost if %dos4g unpack %2bin\ %1rminfo.wpk
if %dos4g unpack %2binb\ %1wstub.wpk
if %wprof unpack %2bin\ %1wprof.dos
if %doshost unpack %2bin\ %1wcc386.dos
if %os2host unpack %2binp\ %1wcc386.os2
if %os2tgt unpack %2lib386\os2\ %1os2386.os2
#
# install diskette #7
#
enter %1wcl386.nt disk 7, labelled "NT-hosted Tools Disk 1"
if %nthost unpack %2binnt\ %1wcl386.nt
if %nthost unpack %2binnt\ %1wcc386.nt
if %nthost unpack %2binnt\ %1wpp386.nt
if %nthost unpack %2binnt\ %1wmake.nt
if %nthost unpack %2binnt\ %1wlib.nt
if %nthost unpack %2binnt\ %1wtouch.nt
if %nthost unpack %2binnt\ %1wdisasm.nt
if %nthost unpack %2binnt\ %1wlink.nt
if %nthost unpack %2binnt\ %1wlinklnk.nt
if %nthost unpack %2binnt\ %1wstrip.nt
if %nthost unpack %2binnt\ %1wvideo.nt
if %nthost unpack %2binnt\ %1wvideow.nt
if %nthost unpack %2binnt\ %1std_dll.nt
#
# install diskette #8
#
enter %1wrc.nt disk 8, labelled "NT-hosted Tools Disk 2"
if %nthost unpack %2binnt\ %1wrc.nt
if %nthost unpack %2binnt\ %1towv.nt
unpack %2binb\ %1towv.wpk
if %nttgt unpack %2lib386\nt\ %1clib3r.nt
if %nttgt unpack %2lib386\nt\ %1clib3s.nt
if %nttgt unpack %2lib386\nt\ %1emu387.nt
if %nttgt unpack %2lib386\nt\ %1ntlib.nt
if %nttgt unpack %2h\nt\ %1nt_h.wpk
if %help unpack %2binb\ %1whelp.wpk
if %help unpack %2binb\ %1watcomc.wpk
if %os2host unpack %2binp\dll\ %1wvidopts.dlp
if %os2host unpack %2binp\dll\ %1wmakopts.dlp
if %os2host unpack %2binp\dll\ %1wlopts.dlp
if %os2host unpack %2binp\dll\ %1wppopts.dlp
if %os2host unpack %2binp\help\ %1wccerrs.hpk
if %os2host unpack %2binp\help\ %1wpperrs.hpk
if %os2host unpack %2binp\help\ %1wvidopts.hpk
if %os2host unpack %2binp\help\ %1wmakopts.hpk
if %os2host unpack %2binp\help\ %1wlopts.hpk
#
# create newconf.sys for DOS
#
file %2newconf.sys
> files=20
#
# create newconf.os2 for OS/2
#
file %2newconf.os2
> SET PATH=%2BINP;%2BINB
> LIBPATH=%2BINP\DLL
> SET HELP=%2BINP\HELP
> SET BOOKSHELF=%2BINP\HELP
> SET INCLUDE=%2H;%2H\OS2
> SET WATCOM=%2.
#
# create autoc386.bat
#
file %2autoc386.bat
> path %2bin;%2binb;%2binw
> set include=%2h;%2h\win;%2h\os2
> set watcom=%2.
#
# create cdemo32.bat
#
file %2cdemo32.bat
> @echo off
> set __opath=%%path%%
> set path=%2bin;%2binb
> set __oinc=%%include%%
> set include=%2h
> set watcom=%2.
> wcl386 /l=dos4g %2src\calendar.cpp
> dos4gw calendar
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
#
# create graphics demo
#
file %2grdemo32.bat
> @echo off
> set __opath=%%path%%
> set path=%2bin;%2binb
> set __oinc=%%include%%
> set include=%2h
> set watcom=%2.
> wcl386 /l=dos4g %2src\grdemo.cpp
> dos4gw grdemo
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
#
# create OS/2 2.0 demo
#
file %2os2demo.cmd
> @echo off
> set __opath=%%path%%
> set path=%2binp;%2binb
> set __oinc=%%include%%
> set include=%2h;%2h\os2;%%INCLUDE%%
> set watcom=%2.
> wcl386 /l=os2v2_pm %2src\shapes.cpp
> shapes
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
#
file %2src\win\build.mif
> WIN386=1
#
# create Windows demo
#
file %2windemo.bat
> @echo off
> set __opath=%%path%%
> set path=%2bin;%2binb;%2binw
> set __oinc=%%include%%
> set include=%2h;%2h\win
> set watcom=%2.
> cd %2src\win\life
> wmake
> if errorlevel 1 goto errorexit
> ..\iswin
> if errorlevel 1 goto win
> set path=%%__opath%%
> win life
> goto exit
> :win
> echo Return to windows with ALT-ESCAPE.
> echo Select "File" from the program manager, and select
> echo the RUN option to run life
> goto exit
> :errorexit
> echo make did not work!
> :exit
> cd %2.
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
