home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Science Adventure 2 with Isaac Asimov
/
SCIENCEV2.IMG
/
sci2
/
install.scr
< prev
next >
Wrap
Text File
|
1994-03-15
|
5KB
|
237 lines
rem Set default language
set LANG eng
set _text inst%LANG%.txl
err_handler %_text%\errhand.txt
rem ----------------- select language/quit --------------------
:pick_language
textbox 1 1 80 24 blue
color back cyan
getOpt -help
if %_err% = 0
type %_text%\insthlp.txt 3 2 77 15 -border -nocenter
waitkey
goto exit_unsaved
endif
rem only one language, so don't show menu
rem type %_text%\install.txt 2 2 77 6 -border
rem textbox 1 9 80 13 blue
menu %_text%\startup.mnu 15 11 50 7 %_text%\startup.tit %_text%\updown.leg -default 0 -lookupOnly
set LANG %_1%
set yes %_2%
set no %_3%
set shortTitle %_4%
set title "%_5%"
switch %_1%
case quit:
goto exit_unsaved
case escape:
goto exit_unsaved
case default:
endswitch
set _text inst%LANG%.txl
type %_text%\install.txt 3 2 76 6 -border
color text yellow
echo 5 6 70 1 -center "%title%"
color text white
rem --------- If on slow cpu, switch to alternate product --------
set _needCpu 486
getCpuType
set _gotCpu %_1%
set _version 1
if %_gotCpu% < %_needCpu%
set _version 0
endif
color back blue
type %_text%\cpuid.txt 11 19 60 5
color back cyan
menu %_text%\cpuid.mnu 17 11 48 6 %_text%\cpuid.tit %_text%\updown.leg -default %_version%
switch %_1%
case slow:
set _links ka386.lnk
case fast:
set _links ka.lnk
case escape:
goto exit_unsaved
endswitch
textbox 1 9 80 16 blue
rem -------------- Text vs. Graphics Install ---------
rem Don't switch into graphics if -T is given
getOpt -T
switch %_err%
case 0:
rem -T given, no graphics
textbox 1 1 80 25 blue
color back cyan
type %_text%\install.txt 3 2 76 6 -border
rem color back blue
set _options "-T"
case 1:
rem -T not given, use graphics
graphics
if %_err% > 0
beep
type %_text%\novga.txt 2 2 77 10 -border
waitkey
textbox 1 1 80 25 blue
endif
endswitch
getOpt -N:
switch %_err%
case 0:
rem -N given, add it to options
set _next %_1%
case 1:
rem -N not given
set _next 9999
endswitch
pict install.img 1 3
rem --------- Ask user Where to install it ------------
promptdir C:\%shortTitle% 13 17 58 8 %_text%\whichdrv.tit %_text%\whichdrv.txt -center
textbox 1 17 80 9 blue
if %_1% eq escape
goto exit_unsaved
endif
setdestdir %_1%
rem textbox 1 9 80 16 blue
getVga
if %_err% = 1
type %_text%\novga.txt 2 13 77 10 -border
waitkey
textbox 1 12 80 13 blue
endif
set _needDisk 8.73
set _needCDisk 17.46
getdiskfree
set _gotDisk %_1%
detect_compressedDisk
set _compressed %_1%
switch %_compressed%
case 0:
if %_gotDisk% < %_needDisk%
beep
type %_text%\diskfree.txt 17 17 50 8 -border
waitkey_noesc
goto exit_unsaved
endif
case 1:
if %_gotDisk% < %_needCDisk%
beep
type %_text%\diskfre2.txt 17 17 50 8 -border
waitkey_noesc
goto exit_unsaved
endif
endswitch
set needMem 520
getmemfree
set _gotMem %_1%
if %_gotMem% < %needMem%
type %_text%\memfree.txt 17 19 50 6 -border
waitkey
textbox 1 17 80 8 blue
endif
mkdirdest
if %_err% != 0
beep
type %_text%\noaccess.txt 17 19 50 6 -border
waitkey_noesc
goto exit_unsaved
endif
ifcanwrite can_write
type %_text%\noaccess.txt 17 19 50 6 -border
waitkey_noesc
goto exit_unsaved
:can_write
rem following is for ereg demo
random 100
if %_1% > 11
goto modem_done
endif
detect_modem
set _no_modem %_err%
if %_no_modem% = 0
rem enable ereg by creating dummy file
copy ereg.on
goto modem_done
endif
if %_no_modem% != 0
:modem_question
beep 2
type %_text%\modem.txt 17 17 50 8 %_text%\modem.tit %_text%\yesno.leg
waitkey_noesc
switch %_1%
case %yes%:
copy ereg.on
case default:
goto modem_question
case %no%:
endswitch
textbox 1 15 80 10 blue
endif
:modem_done
unset _no_modem
type %_text%\copying.txt 17 19 50 6 -border
copy %_text%
set _text %hdroot%\%_text%
saveconfig
copy nofiles.txt
copy readme.bat
copy readme.doc
copy %shortTitle%.ico %shortTitle%.ico
copy %shortTitle%.pif %shortTitle%.pif
rem Copy files needed for sound test
copy ka.ad
copy knowledg.voc
copy sbtest.com
copy kalogo.adl
copy kalogo.rld
copy install.exe setup.exe
copy setup.scr
rem copy iinstall.pal
rem copy iinstall.fnt
copy kawin.txt
copy kawin.exe
rem Copy files needed for real product
copy ka.bml
copy ka.com
copy ka.db
copy ka.inl
copy ka.lch
copy %_links% ka.lnk
copy ka.ndx
copy ka.not
copy ka.skp
copy ka.str
copy ka.txt
copy kav.pgm
copy mouse.com
copy moustest.exe
copy small.fnt
copy standard.fnt
copy tiny.fnt
copy vgacapt.exe
copy whichvga.com
copy zrun45.exe
type %_text%\copying2.txt 17 19 50 6 -border
copy args %hdroot% -dir -expand
copy cache %hdroot% -dir
copy drzoom.cml
copy ka1.ndx
copy ka1.txt
copy vrsd.386
rem Make batch file so shell install can loop.
getDriveLetter %CDroot%
set CDdrive %_1%
getDriveLetter %HDroot%
set HDdrive %_1%
rem The sub-install.bat uses _next to pass along the next menu item.
copy %_text%\install.bat install.bat -expand
rem Done copying.
:install_done
type %_text%\finish.txt 17 19 50 6 -border
beep
waitkey
chain .\setup
:exit_unsaved
textbox 1 1 80 25 black
quit