echo   #########################################################
echo   #    Installation procedure for WATCOM FORTRAN 77/32    #
echo   #########################################################
#
# inquire about what to install
#
ask doshost Will you be using DOS as a development environment [5300K] ?
ask os2host Will you be using OS/2 as a development environment [1700K] ?
ask nthost Will you be using Windows NT as a development environment [1500K] ?
ask win3host Do you be using Windows 3.x as a development environment [3800K] ?
ask dosx Will you be developing 32-bit applications for a DOS Extender [1400K] ?
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 os2tgt Will you be developing 32-bit applications for OS/2 2.x [1200K] ?
ask nttgt Will you be developing 32-bit applications for Windows NT [1700K] ?
ask nlm Will you be developing applications for Netware [506K] ?
ask win3tgt Will you be developing 32-bit applications for Windows 3.x [1500K] ?
set doc n
set penw n
if %win3tgt ask doc Do you want Windows 3.1 on-line help installed [3928K] ?
if %win3tgt ask penw Do you want Windows for Pen support installed [100K] ?
ask debug Do you wish to install the debugger [869K] ?
ask wprof Do you wish to install the profiler [246K] ?
ask graph Do you wish to install the graphics libraries [259K] ?
ask help Do you wish to install the help files [193K] ?
#
# create destination directories
#
mkdir %2
mkdir %2bin
mkdir %2binb
if %os2host mkdir %2binp
if %os2host mkdir %2binp\dll
if %os2host mkdir %2binp\help
mkdir %2binw
if %nthost mkdir %2binnt
if %nlm mkdir %2nlm
if %nlm mkdir %2novi
mkdir %2lib386
if %dosx mkdir %2lib386\dos
if %os2tgt mkdir %2lib386\os2
if %nlm mkdir %2lib386\netware
if %nttgt mkdir %2lib386\nt
if %win3tgt mkdir %2lib386\win
mkdir %2src
mkdir %2src\fortran
mkdir %2src\fortran\ads
mkdir %2src\fortran\ads\rel12
mkdir %2src\fortran\dos
mkdir %2src\fortran\os2
mkdir %2src\fortran\win
mkdir %2src\goodies
mkdir %2src\inc
mkdir %2src\startup
mkdir %2src\startup\386
mkdir %2src\startup\ads
#
# install software on diskette #1
#
unpack %2 %1readme.wpk
unpack %2binb\ %1wfl386.wpk
if %doshost unpack %2bin\ %1wfc386.dos
if %doshost unpack %2bin\ %1wfc386p.wpk
unpack %2binb\ %1wdisasm.wpk
if %os2host unpack %2binp\ %1wfc386.os2
if %os2host unpack %2binp\dll\ %1wfcopts.dlp
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\help\ %1wfcopts.hpk
if %os2host unpack %2binp\help\ %1wfcerrs.hpk
if %os2host unpack %2binp\help\ %1wvidopts.hpk
if %os2host unpack %2binp\help\ %1wmakopts.hpk
if %os2host unpack %2binp\help\ %1wlopts.hpk
if %os2host unpack %2.\ %1wfc386.prk
unpack %2.\ %1wf77.wpk
unpack %2binb\ %1wmake.wpk
if %doshost unpack %2bin\ %1wmakel.wpk
unpack %2binb\ %1womp.wpk
unpack %2binb\ %1wtouch.wpk
unpack %2binb\ %1bpatch.wpk
unpack %2binb\ %1wlib.wpk
if %doshost unpack %2bin\ %1cmdedit.wpk
unpack %2binb\ %1cmdedit.hpk
if %os2host unpack %2binp\ %1os2edit.wpk
unpack %2binb\ %1techinfo.wpk
#
# install diskette #2
#
enter %1wresf.wpk disk 2, labelled "Library Disk"
unpack %2lib386\ %1wresf.wpk
unpack %2lib386\ %1wresfs.wpk
if %dosx unpack %2lib386\dos\ %1flib386.dos
if %dosx unpack %2lib386\dos\ %1flib387.dos
if %dosx unpack %2lib386\dos\ %1flib3s.dos
if %dosx unpack %2lib386\dos\ %1flib37s.dos
if %os2tgt unpack %2lib386\os2\ %1flib386.os2
if %os2tgt unpack %2lib386\os2\ %1flib387.os2
if %os2tgt unpack %2lib386\os2\ %1flib3s.os2
if %os2tgt unpack %2lib386\os2\ %1flib37s.os2
if %win3tgt unpack %2lib386\win\ %1flib386.win
if %win3tgt unpack %2lib386\win\ %1flib387.win
if %win3tgt unpack %2lib386\win\ %1flib3s.win
if %win3tgt unpack %2lib386\win\ %1flib37s.win
if %dosx unpack %2lib386\dos\ %1clib3r.dos
if %dosx unpack %2lib386\dos\ %1clib3s.dos
if %dosx unpack %2lib386\dos\ %1emu387.dos
if %os2tgt unpack %2lib386\os2\ %1clib3r.os2
if %os2tgt unpack %2lib386\os2\ %1clib3s.os2
if %os2tgt unpack %2lib386\os2\ %1emu387.os2
if %win3tgt unpack %2lib386\win\ %1clib3r.win
if %win3tgt unpack %2lib386\win\ %1clib3s.win
if %win3tgt unpack %2lib386\win\ %1emu387.win
#
# install diskette #3
#
enter %1wlink.dos disk 3, labelled "Linker & DOS4GW 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
unpack %2binb\ %1wstrip.wpk
if %help unpack %2binb\ %1f77hlp.wpk
unpack %2lib386\ %1math3r.wpk
unpack %2lib386\ %1math3s.wpk
unpack %2lib386\ %1math387r.wpk
unpack %2lib386\ %1math387s.wpk
unpack %2lib386\ %1noemu387.wpk
if %dosx if %graph unpack %2lib386\dos\ %1graph.dos
if %dosx if %ads unpack %2lib386\dos\ %1adsstart.wpk
if %win3tgt unpack %2lib386\win\ %1win386.wpk
if %dos4g unpack %2binb\ %1wstub.wpk
if %dos4g unpack %2bin\ %1dos4gw.wpk
if %dos4g unpack %2bin\ %1pminfo.wpk
if %dos4g unpack %2bin\ %1rminfo.wpk
if %dos4g unpack %2bin\ %1privatxm.wpk
if %win3tgt unpack %2binb\ %1wbind.wpk
unpack %2bin\ %1cfig386.wpk
if %help unpack %2binb\ %1whelp.wpk
if %graph if %help unpack %2binb\ %1graphhlp.wpk
if %dos4g unpack %2src\ %1wstubsrc.wpk
unpack %2src\fortran\ %1source.wpk
if %ads unpack %2src\fortran\ads\ %1source.ads
if %dosx unpack %2src\fortran\dos\ %1wfsrc.dos
if %graph if %dosx unpack %2src\fortran\dos\ %1wfgrsrc.dos
if %win3tgt unpack %2src\fortran\win\ %1source.win
if %ads unpack %2src\fortran\ads\rel12\ %1rel12.ads
if %os2tgt unpack %2src\fortran\os2\ %1source.os2
unpack %2src\goodies\ %1goodies.wpk
unpack %2src\startup\386\ %1startup.386
if %win3tgt unpack %2src\startup\386\ %1startup.w32
if %ads unpack %2src\startup\ads\ %1startup.ads
#
# install diskette #4
#
enter %1wvideo.dos disk 4, labelled "Debugger & Profiler Disk"
if %debug 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 %debug if %win3host unpack %2binw\ %1wvideo.win
if %debug if %win3host unpack %2binw\ %1wint32.win
if %debug if %win3host unpack %2binw\ %1wdebug.win
if %win3tgt unpack %2binw\ %1wemu387.win
if %debug if %win3host unpack %2binw\ %1vidserv.win
if %debug unpack %2bin\ %1trap.wpk
if %debug unpack %2bin\ %1trap386.wpk
if %debug if %ads unpack %2bin\ %1adshelp.wpk
if %debug if %pls unpack %2bin\ %1plshelp.wpk
if %debug if %dos4g unpack %2bin\ %1rsihelp.wpk
if %debug unpack %2bin\ %1dbglib.wpk
if %debug unpack %2bin\ %1vidserv.dos
if %debug unpack %2bin\ %1chkmouse.wpk
if %debug unpack %2bin\ %1rfx.dos
if %os2host unpack %2binp\ %1rfx.os2
if %debug unpack %2binb\ %1vid_dbg.386
if %debug unpack %2binb\ %1vid_prs.wpk
if %debug 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 %win3host unpack %2binw\ %1wsamplew.win
if %wprof if %os2tgt unpack %2binp\ %1wsampos2.wpk
if %wprof if %os2tgt unpack %2binp\ %1wsmpos22.os2
if %wprof if %dos4g unpack %2bin\ %1wsamprsi.wpk
#
# install diskette #5
#
enter %1win31mwh.wpk disk 5, labelled "Windows SDK Disk"
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\ %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 %2binb\ %1wrc.wpk
if %win3tgt unpack %2binb\ %1mrbc.wpk
if %win3tgt unpack %2bin\ %1markmidi.wpk
if %win3tgt unpack %2binb\ %1hc30.wpk
if %win3tgt unpack %2binb\ %1hc31.wpk
if %penw unpack %2binw\ %1beditde.wpk
if %penw unpack %2binw\ %1heditde.wpk
if %win3tgt unpack %2binw\ %1filedll.win
ifnot %doc goto skip_w31h
#
# install diskette #6
#
enter %1w31h.pk0 disk 6, labelled "Windows SDK 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 #7
#
enter %1w31h.pk2 disk 7, labelled "Windows SDK 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_w31h:
#
# install diskette #8
#
enter %1wfl386.nt disk 8, labelled "NT-Hosted Tools Disk 1"
if %nthost unpack %2binnt\ %1wfl386.nt
if %nthost unpack %2binnt\ %1wfc386.nt
if %nthost unpack %2binnt\ %1wlib.nt
if %nthost unpack %2binnt\ %1wtouch.nt
if %nthost unpack %2binnt\ %1wdisasm.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 %nthost unpack %2binnt\ %1wrc.nt
if %nttgt unpack %2lib386\nt\ %1flib.nt
if %nttgt unpack %2lib386\nt\ %1flib7.nt
if %nttgt unpack %2lib386\nt\ %1flibs.nt
if %nttgt unpack %2lib386\nt\ %1flib7s.nt
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
#
# install diskette #9
#
enter %1wlink.nt disk 9, labelled "NT-Hosted Tools Disk 2"
if %nthost unpack %2binnt\ %1wlink.nt
if %nthost unpack %2binnt\ %1wmake.nt
if %nthost unpack %2binnt\ %1wsample.nt
if %wprof unpack %2bin\ %1wprof.dos
if %wprof unpack %2binb\ %1wprofhlp.wpk
if %win3tgt unpack %2binw\ %1drwatcom.win
if %win3tgt unpack %2binw\ %1wheapwlk.win
if %win3tgt unpack %2binw\ %1wspy.win
if %win3tgt unpack %2binw\ %1commdlg.lng
if %win3tgt unpack %2binw\ %1win386.win
if %win3tgt unpack %2binw\ %1w386dll.win
if %win3tgt unpack %2binw\ %1ole.wpk
if %nlm unpack %2nlm\ %1novserv.nlp
if %nlm unpack %2nlm\ %1parserv.nlp
if %nlm unpack %2nlm\ %1serserv.nlp
if %nlm unpack %2nlm\ %1wsample.nlp
if %nlm unpack %2novi\ %1novi.nov
if %nlm unpack %2lib386\netware\ %1clib3s.nov
if %nlm unpack %2lib386\netware\ %1flibs.net
if %nlm unpack %2lib386\netware\ %1flib7s.net
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:
ifnot %doshost goto skdos_config
#
# create F32CONF.SYS for DOS CONFIG.SYS
#
file %2f32conf.sys
> files=20
#
# create F32AUTO.BAT for DOS AUTOEXEC.BAT
#
file %2f32auto.bat
> path %2bin;%2binb;%2binw
> set finclude=%2src\fortran\dos;%2src\fortran
> set watcom=%2.
skdos_config:
ifnot %os2host goto skos2_config
#
# create F32CONF.OS2 for OS/2 CONFIG.SYS
#
file %2f32conf.os2
> SET PATH=%2BINP;%2BINB
> LIBPATH=%2BINP\DLL
> SET HELP=%2BINP\HELP
> SET BOOKSHELF=%2BINP\HELP;%%TOOLKIT%%\BOOK
> SET FINCLUDE=%2SRC\FORTRAN\OS2;%2SRC\FORTRAN
> SET WATCOM=%2.
skos2_config:
ifnot %nthost goto sknt_config
#
# create F32CONF.NT for Windows NT
#
file %2f32conf.nt
> SET PATH=%2BINNT;%2BINB
> SET FINCLUDE=%2SRC\FORTRAN
> SET WATCOM=%2.
sknt_config:
ifnot %dosx goto skdos_demo
#
# create DOS demo
#
file %2f32dos.bat
> @echo off
> set __opath=%%path%%
> set __oinc=%%finclude%%
> set __owatcom=%%watcom%%
> path %2bin;%2binb
> set watcom=%2.
> set finclude=%2src\fortran\dos
> wfl386 /l=dos4g %2src\fortran\dos\calendar
> dos4gw calendar
> set watcom=%%__owatcom%%
> set finclude=%%__oinc%%
> set path=%%__opath%%
> set __owatcom=
> set __oinc=
> set __opath=
#
# create DOS graphics demo
#
file %2f32dosgr.bat
> @echo off
> set __opath=%%path%%
> set __oinc=%%finclude%%
> set __owatcom=%%watcom%%
> path %2bin;%2binb
> set watcom=%2.
> set finclude=%2src\fortran\dos
> wfl386 /l=dos4g %2src\fortran\dos\grdemo2
> dos4gw grdemo2
> mode co80
> set watcom=%%__owatcom%%
> set finclude=%%__oinc%%
> set path=%%__opath%%
> set __owatcom=
> set __oinc=
> set __opath=
skdos_demo:
ifnot %os2tgt goto skos2_demo
#
# create OS/2 demo
#
file %2f32os2.cmd
> @echo off
> set __opath=%%path%%
> set __oinc=%%finclude%%
> set __owatcom=%%watcom%%
> path %2binp;%2binb
> set finclude=%2src\fortran\os2
> set watcom=%2.
> wfc386 %2src\fortran\os2\fshapes
> wlink sys os2v2_pm f fshapes
> fshapes
> set watcom=%%__owatcom%%
> set finclude=%%__oinc%%
> set path=%%__opath%%
> set __owatcom=
> set __oinc=
> set __opath=
skos2_demo:
ifnot %win3tgt goto skwin_demo
#
# create Windows demo
#
file %2f32win.bat
> @echo off
> set __opath=%%path%%
> set __oinc=%%finclude%%
> set __owatcom=%%watcom%%
> path %2bin;%2binb;%2binw
> set finclude=%2src\fortran\win
> set watcom=%2.
> wfl386 /l=win386 %2src\fortran\win\ellipse /fpc
> wbind -n ellipse
> echo To run the demo, start Windows, select "File" from
> echo the program manager, and select the RUN option to run
> echo "%2ellipse.exe".
> set watcom=%%__owatcom%%
> set finclude=%%__oinc%%
> set path=%%__opath%%
> set __owatcom=
> set __oinc=
> set __opath=
skwin_demo:
ifnot %nttgt goto sknt_demo
#
# create Windows NT demo
#
file %2f32nt.bat
> @echo off
> set __opath=%%path%%
> set __oinc=%%finclude%%
> set __owatcom=%%watcom%%
> path %2binnt;%2binb
> set finclude=%2src\fortran
> set watcom=%2.
> wfl386 /l=nt_win %2src\fortran\sieve /bw /fpc
> sieve
> set watcom=%%__owatcom%%
> set finclude=%%__oinc%%
> set path=%%__opath%%
> set __owatcom=
> set __oinc=
> set __opath=
sknt_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 the TOOLKIT environment
echo variable to point to where the OS/2 Toolkit was installed.
skos2_toolkit:
