echo   ###############################################
echo   #  Installation procedure for WATCOM C/C++32  #
echo   ###############################################
#
echo This package contains C and C++ compilers.
ask wcc - Do you want the C compiler installed ?
ask wpp - Do you want the C++ compiler installed ?
echo
echo This package contains support for the following HOST platforms:
echo       Extended DOS, OS/2 2.x, and Windows NT
ask doshost Do you want Extended DOS hosted tools installed [3578K] ?
ask os2host Do you want OS/2 2.x hosted tools installed [3032K] ?
ask nthost Do you want Windows NT hosted tools installed [2152K] ?
echo
ask dosx Will you be developing 32-bit applications for a DOS Extender [614K] ?
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 [225K] ?
if %dosx ask ecs Do you wish to install support for the Ergo DOS extender [26K] ?
if %dosx ask dos4g Do you wish to install support for the Rational DOS extender [491K] ?
if %dosx ask ads Do you wish to install support for the AutoCAD Development System [80K] ?
ask win3tgt Will you be developing 32-bit applications for Windows 3.x [4852K] ? 
set wex n
set doc n
set penw n
if %win3tgt ask wex Do you want Windows 3.x examples installed [816K] ?
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 [438K] ?
ask os2tgt Will you be developing 32-bit applications for OS/2 2.0 [892K] ?
ask nttgt Will you be developing 32-bit applications for Windows NT [916K] ?
ask nlm Will you be developing applications for Netware [1238K] ?
ask help Do you wish to install the HELP utility and help files [454K] ?
ask wprof Do you wish to install the Profiler [970K] ?
ask pen Do you wish to install PenPoint Debugger Support [30K] ?
ask clibexam Do you want examples from C Library Reference installed [676K] ?
#
# 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
if %nlm mkdir %2novh
if %nlm mkdir %2novh\arpa
if %nlm mkdir %2novh\netinet
if %nlm mkdir %2novh\sys
if %nlm mkdir %2novi
mkdir %2lib386
mkdir %2lib386\dos
if %os2tgt mkdir %2lib386\os2
if %nlm mkdir %2lib386\netware
if %nttgt mkdir %2lib386\nt
mkdir %2lib386\win
mkdir %2src
mkdir %2src\goodies
if %clibexam mkdir %2src\clibexam
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 %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 if %wpp unpack %2bin\ %1wpp386.dos
if %os2host if %wpp unpack %2binp\ %1wpp386.os2
if %os2host if %wcc unpack %2binp\dll\ %1wccopts.dlp
if %os2host if %wcc unpack %2.\ %1wcc386.prk
if %os2host if %wpp 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
if %wpp 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
if %wpp unpack %2h\ %1hpp.wpk
if %win3tgt unpack %2h\win\ %1h386.wpk
unpack %2h\sys\ %1h_sys.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 if %wcc unpack %2bin\ %1wcc386p.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
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\ %1wint32.win
if %win3tgt unpack %2binw\ %1wdebug.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
#
# 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
if %win3tgt unpack %2binw\ %1w386dll.win
if %pen unpack %2pen\ %1ppdebug.wpk
if %help unpack %2binb\ %1graphhlp.wpk
if %os2tgt unpack %2binp\help\ %1watcomc.hpk
if %doshost unpack %2bin\ %1cmdedit.wpk
unpack %2binb\ %1cmdedit.hpk
if %os2host unpack %2binp\ %1os2edit.wpk
unpack %2lib386\ %1cplx.wpk
unpack %2lib386\ %1cplx7.wpk
unpack %2src\goodies\ %1goodies.wpk
if %doshost unpack %2bin\ %1wmakel.wpk
if %win3tgt unpack %2binw\ %1wemu387.win
#
# 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 if %wcc unpack %2bin\ %1wcc386.dos
if %os2host if %wcc unpack %2binp\ %1wcc386.os2
if %nlm unpack %2novh\ %1novh.nov
if %nlm unpack %2novh\arpa\ %1novharpa.nov
if %nlm unpack %2novh\sys\ %1novhsys.nov
if %nlm unpack %2novh\netinet\ %1novhneti.nov
if %nlm unpack %2novi\ %1novi.nov
if %nlm unpack %2lib386\netware\ %1clib3s.nov
if %nlm unpack %2lib386\netware\ %1emu387.nov
#
# install diskette #7
#
enter %1wcl386.nt disk 7, labelled "NT-hosted Tools Disk 1"
if %nthost unpack %2binnt\ %1wcl386.nt
if %nthost if %wcc unpack %2binnt\ %1wcc386.nt
if %nthost if %wpp 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\ %1std_dll.nt
if %clibexam unpack %2src\clibexam\ %1clibexam.wpk
unpack %2binb\ %1wlib.wpk
unpack %2binb\ %1wstrip.wpk
if %os2host unpack %2binp\help\ %1wccopts.hpk
#
# 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
if %nthost unpack %2binnt\ %1wsample.nt
unpack %2binb\ %1towv.wpk
unpack %2lib386\ %1plbx.wpk
unpack %2lib386\ %1plbxmt.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
unpack %2binb\ %1unicode.wpk
if %win3tgt unpack %2binw\ %1drwatcom.win
if %win3tgt unpack %2binw\ %1wheapwlk.win
if %win3tgt unpack %2binw\ %1wspy.win
if %os2host unpack %2binp\dll\ %1wvidopts.dlp
if %os2host unpack %2binp\dll\ %1wmakopts.dlp
if %os2host unpack %2binp\dll\ %1wlopts.dlp
if %os2host if %wpp unpack %2binp\dll\ %1wppopts.dlp
if %os2host if %wcc unpack %2binp\help\ %1wccerrs.hpk
if %os2host if %wpp 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
unpack %2binb\ %1techinfo.wpk
ifnot %doc goto skip_win31doc
#
# install diskette #1
#
enter %1w31h.pk0 disk labelled "Windows Help Disk 1"
unpack %2.\ %1w31h.pk0
@copy %2w31h.0 %2binw\win31wh.hlp
@erase %2w31h.0
unpack %2.\ %1w31h.pk1
@append %2w31h.1 %2binw\win31wh.hlp
@erase %2w31h.1
unpack %2.\ %1w31h.pk4
#
# install diskette #2
#
enter %1w31h.pk2 disk labelled "Windows Help Disk 2"
unpack %2.\ %1w31h.pk2
@append %2w31h.2 %2binw\win31wh.hlp
@erase %2w31h.2
unpack %2.\ %1w31h.pk3
@append %2w31h.3 %2binw\win31wh.hlp
@erase %2w31h.3
@append %2w31h4.0 %2binw\win31wh.hlp
@erase %2w31h4.0
unpack %2.\ %1w31h.pk5
@append %2w31h4.1 %2binw\win31wh.hlp
@erase %2w31h4.1
skip_win31doc:
ifnot %doshost goto skdos_config
#
# create newconf.sys for DOS
#
file %2newconf.sys
> files=20
#
# create autoc386.bat
#
file %2autoc386.bat
> path %2bin;%2binb;%2binw
> set include=%2h;%2h\win
> set watcom=%2.
skdos_config:
ifnot %os2host goto skos2_config
#
# create newconf.os2 for OS/2
#
file %2newconf.os2
> SET PATH=%2BINP;%2BINB
> LIBPATH=%2BINP\DLL
> SET HELP=%2BINP\HELP
> SET BOOKSHELF=%2BINP\HELP;%%TOOLKIT%%\BOOK
> SET INCLUDE=%2H;%%TOOLKIT%%\C\OS2H
> SET WATCOM=%2.
skos2_config:
ifnot %dosx goto skdos_demo
#
# 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 /bt=dos %2src\calendar
> 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 /bt=dos %2src\grdemo
> dos4gw grdemo
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
skdos_demo:
ifnot %os2host goto skos2_demo
#
# create OS/2 2.x demo
#
file %2os2demo.cmd
> @echo off
> set __opath=%%path%%
> set path=%2binp;%2binb
> set __oinc=%%include%%
> set include=%2h;%%TOOLKIT%%\c\os2h;%%INCLUDE%%
> set watcom=%2.
> wcl386 /l=os2v2_pm /bt=os2 %2src\shapes
> shapes
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
skos2_demo:
#
file %2src\win\build.mif
> WIN386=1
ifnot %win3tgt goto skwin_demo
#
# 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=
skwin_demo:
echo
echo Installation complete.
echo
ifnot %os2tgt goto skos2_toolkit
echo In order to create applications for OS/2 you must install the
echo OS/2 Toolkit diskettes.  Insert OS/2 Toolkit Disk 1 into %1
echo and type %1install to continue installing the OS/2 Toolkit.
echo After installing the OS/2 Toolkit, set TOOLKIT environment
echo variable to point to where the OS/2 Toolkit was installed.
skos2_toolkit:
