echo   ##########################################################
echo   #  Installation procedure for WATCOM C/C++16 Delta Pack  #
echo   ##########################################################
#
# inquire about what to install
#
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
ask dos Do you wish to install DOS executables [1454K] ?
ask os2 Do you wish to install OS/2 executables [1324K] ?
ask doslib Do you wish to install DOS libraries [1198K] ?
ask os2lib Do you wish to install OS/2 libraries [1854K] ?
ask winlib Do you wish to install Windows libraries [6440K] ?
#
# create destination directories
#
mkdir %2
mkdir %2bin
mkdir %2binb
if %os2 mkdir %2binp
mkdir %2lib286
if %doslib mkdir %2lib286\dos
if %os2lib mkdir %2lib286\os2
if %winlib mkdir %2lib286\win
mkdir %2src
mkdir %2src\startup
if %doslib mkdir %2src\startup\dos
if %os2lib mkdir %2src\startup\os2
if %winlib mkdir %2src\startup\win
mkdir %2src\win
#
# install diskette #1
#
unpack %2 %1readme.wpk
unpack %2binb\ %1wcl.wpk
if %dos if %wpp unpack %2bin\ %1wpp.dos
if %os2 if %wpp unpack %2binp\ %1wpp.os2
if %dos if %wcc unpack %2bin\ %1wcc.dos
if %dos if %wcc unpack %2bin\ %1wccp.wpk
#
# install diskette #2
#
enter %1maths.wpk disk 2, labelled "Library Disk 1"
unpack %2lib286\ %1maths.wpk
unpack %2lib286\ %1mathm.wpk
unpack %2lib286\ %1mathc.wpk
unpack %2lib286\ %1mathl.wpk
unpack %2lib286\ %1mathh.wpk
unpack %2lib286\ %1math87s.wpk
unpack %2lib286\ %1math87m.wpk
unpack %2lib286\ %1math87c.wpk
unpack %2lib286\ %1math87l.wpk
unpack %2lib286\ %1math87h.wpk
unpack %2lib286\ %1noemu87.wpk
if %doslib unpack %2lib286\dos\ %1emu87.dos
if %os2lib unpack %2lib286\os2\ %1emu87.os2
if %winlib unpack %2lib286\win\ %1emu87.win
if %doslib unpack %2lib286\dos\ %1graph.wpk
if %doslib unpack %2lib286\dos\ %1wovl.dos
if %doslib unpack %2lib286\dos\ %1clibs.dos
if %doslib unpack %2lib286\dos\ %1clibm.dos
if %doslib unpack %2lib286\dos\ %1clibc.dos
if %doslib unpack %2lib286\dos\ %1clibl.dos
if %doslib unpack %2lib286\dos\ %1clibh.dos
if %os2lib unpack %2lib286\os2\ %1clibs.os2
if %os2lib unpack %2lib286\os2\ %1clibm.os2
if %os2lib unpack %2lib286\os2\ %1clibc.os2
if %os2lib unpack %2lib286\os2\ %1clibl.os2
if %os2lib unpack %2lib286\os2\ %1clibh.os2
if %os2lib unpack %2lib286\os2\ %1dospms.os2
if %os2lib unpack %2lib286\os2\ %1dospmm.os2
if %os2lib unpack %2lib286\os2\ %1dospmc.os2
if %os2lib unpack %2lib286\os2\ %1dospml.os2
if %os2lib unpack %2lib286\os2\ %1dospmh.os2
if %doslib unpack %2lib286\dos\ %1cstart_t.wpk
if %doslib unpack %2lib286\dos\ %1dos16m.wpk
if %os2lib unpack %2lib286\os2\ %1clibdll.os2
if %os2lib unpack %2lib286\os2\ %1clibmtl.os2
if %os2lib unpack %2lib286\os2\ %1graphp.wpk
if %wpp unpack %2lib286\ %1cplx.wpk
#
# install diskette #3
#
enter %1cplx7.wpk disk 3, labelled "Library Disk 2"
if %wpp unpack %2lib286\ %1cplx7.wpk
if %winlib unpack %2lib286\win\ %1clibs.win
if %winlib unpack %2lib286\win\ %1clibm.win
if %winlib unpack %2lib286\win\ %1clibc.win
if %winlib unpack %2lib286\win\ %1clibl.win
if %winlib unpack %2lib286\win\ %1libentry.win
if %winlib if %wpp unpack %2lib286\win\ %1plib.win
if %winlib if %wpp unpack %2lib286\win\ %1plbx.win
if %winlib if %wpp unpack %2lib286\win\ %1cplx.win
if %winlib if %wpp unpack %2lib286\win\ %1cplx7.win
if %winlib unpack %2lib286\win\ %1mathc.win
if %winlib unpack %2lib286\win\ %1mathl.win
if %winlib unpack %2lib286\win\ %1math87c.win
if %winlib unpack %2lib286\win\ %1math87l.win
if %winlib unpack %2lib286\win\ %1windows.win
if %winlib unpack %2lib286\win\ %1winlibs.win
unpack %2binb\ %1wlink.wpk
if %doslib unpack %2src\startup\dos\ %1startup.dos
if %os2lib unpack %2src\startup\os2\ %1startup.os2
if %winlib unpack %2src\startup\win\ %1startup.win
#
# install diskette #4
#
enter %1plib.wpk disk 4, labelled "Library Disk 3"
if %wpp unpack %2lib286\ %1plib.wpk
if %wpp unpack %2lib286\ %1plbx.wpk
if %os2lib if %wpp unpack %2lib286\os2\ %1plibmtl.os2
if %os2lib if %wpp unpack %2lib286\os2\ %1plbxmtl.os2
if %dos unpack %2bin\ %1wsample.dos
if %os2 if %wcc unpack %2binp\ %1wcc.os2
unpack %2binb\ %1fcenable.wpk
unpack %2binb\ %1vid_dbg.wpk
#
# create newconf.sys
#
file %2newconf.sys
> files=20
#
# create newauto.bat
#
file %2newauto.bat
> path %2bin;%2binb;%2binw
> set include=%2h;%2h\win
> set watcom=%3
> rem If "doscalls.lib" is not found in c:\os2, then you must change
> rem "wlink.lnk" in %2binb
#
# create cdemo.bat
#
file %2cdemo.bat
> @echo off
> set __opath=%%path%%
> set path=%2bin;%2binb
> set __oinc=%%include%%
> set include=%2h
> set watcom=%3
> wcl /l=dos %2src\calendar.c
> calendar
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
#
# create graphics demo
#
file %2grdemo.bat
> @echo off
> set __opath=%%path%%
> set path=%2bin;%2binb
> set __oinc=%%include%%
> set include=%2h
> set watcom=%3
> wcl /l=dos %2src\grdemo.c
> grdemo.exe
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
#
# create newconf.os2 for OS/2
#
file %2newconf.os2
> SET PATH=%2BINP;%2BINB
> LIBPATH=%2BINP\DLL
> SET INCLUDE=%2H
> SET WATCOM=%3
> rem If "doscalls.lib" is not found in c:\os2, then you must change
> rem "wlsystem.lnk" in %2binb
#
# create cdemo.cmd for OS/2
#
file %2cdemo.cmd
> @echo off
> set __opath=%%path%%
> set path=%2binp;%2binb
> set __oinc=%%include%%
> set include=%2h
> set watcom=%3
> wcl /l=os2 %2src\calendar.c
> calendar
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
#
# set up Windows examples to compile in 16-bit mode
#
file %2src\win\build.mif
> WIN386=0
#
# 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=%3
> 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 %3
> set include=%%__oinc%%
> set __oinc=
> set path=%%__opath%%
> set __opath=
