home *** CD-ROM | disk | FTP | other *** search
- 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 18 1
- 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%
- getVga
- if %_err% = 1
- type %_text%\novga.txt 2 13 77 10 -border
- waitkey
- textbox 1 12 80 13 blue
- endif
- set _needDisk 3
- getdiskfree
- set _gotDisk %_1%
- if %_gotDisk% < %_needDisk%
- type %_text%\diskfree.txt 17 17 50 8 -border
- waitkey_noesc
- goto exit_unsaved
- endif
- 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
- 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
- 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 zrun.exe
- type %_text%\copying2.txt 17 19 50 6 -border
- mkdir dinogame
- copy dinogame\dg.zsl dg.zsl
- copy dinogame\dg.xml dg.xml
- copy dinogame\dg.iml dg.iml
- copy dinogame\dg.evl dg.evl
- copy dinogame\fixed.pal fixed.pal
- copy dinogame\ground.pal ground.pal
- copy dinogame\sky.pal sky.pal
- copy dinogame\black2.pal black2.pal
- copy dinogame\zrunfile zrunfile -expand
- copy dinogame\ka.ad ka.ad
- copy sb16dig.drv
- rem Make batch file so shell install can loop.
- getDriveLetter %CDroot%
- set CDdrive %_1%
- getDriveLetter %HDroot%
- set HDdrive %_1%
- 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
-