home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPEED
/
SPEED16_09.iso
/
speed
/
setup.old
< prev
next >
Wrap
Text File
|
1994-02-24
|
13KB
|
475 lines
rem we are already in the destination directory,
rem and ka.cnf points to the drive and directory we were installed from
indestdir
rem Make drive letter variables for the benefit of batch files launched by kav
getDriveLetter %CDroot%
set CDdrive %_1%
getDriveLetter %HDroot%
set HDdrive %_1%
rem set default values for a few things
preset AutoMovie on
preset mouseSensitivity 50
preset ExtraMemory Automatic
preset musicVolume 70
preset Printing Detect
preset PrinterPort LPT1
preset digitizedSound on
preset music on
rem Ogilvy & Mather want pc speaker sound as an option in zoomscape
preset zoomUseRealSound on
rem set default tsr lines for product.bat
set _tsr "rem no special tsrs needed"
set _tsr2 "rem no special tsr cleanup needed"
rem Specify where all the text files used in setup live.
set _text %hdroot%\inst%LANG%.txl
rem
err_handler %_text%\errhand.txt
rem
textbox 1 1 80 25 blue
color back cyan
getOpt -help
if %_err% = 0
type %_text%\setuphlp.txt 3 2 77 15 -border -nocenter
waitkey
goto exit_unsaved
endif
type %_text%\setup.txt 3 2 77 6 -border
color text yellow
echo 6 6 70 1 -center "%title%"
color text white
rem ----------------- select card --------------------
:card
textbox 1 9 80 17 blue
menu %_text%\sound.mnu 19 11 44 6 %_text%\sound.tit %_text%\updown.leg
set soundDriver %_1%
set musicDriver "%_2%"
set musicType "%_3%"
set soundDevice "%_4%"
set _soundDevice2 "%_5%"
if "%soundDevice%" eq -
set soundDevice "%_soundDevice2%"
endif
unset _dma
unset _irq
unset _ioPort
textbox 1 9 80 16 blue
rem set i/o port, etc.
set _musicIoPort "%_ioPort%"
switch %soundDriver%
case escape:
goto exit_unsaved
case sbdig.drv:
detect_soundBlaster
set _musicIoPort "%_ioPort%"
case sbpdig.drv:
detect_soundBlaster
set _musicIoPort "%_ioPort%"
case sb16dig.drv:
detect_soundBlaster
if %musicType% eq adl
set _musicIoPort "%_ioPort%"
endif
case pasdig.drv:
rem proaudio spectrum 16
rem detect settings from config.sys
detect_spectrum
set _sb_dma %_2%
rem if using 16 bit dma, punt and drop back to soundblaster emulation
set _musicIoPort "%_ioPort%"
if %_dma% > 4
set soundDriver sbdig.drv
rem soundblaster emulation is normally dma channel 1
rem but use values detect_spectrum read from config.sys
detect_soundBlaster
set _dma %_sb_dma%
set _musicIoPort 388
endif
case default:
rem explicit defaults
endswitch
setSoundPort "%_ioPort%" "%_irq%" "%_dma%" "%_drq%"
setMusicPort "%_musicIoPort%"
if "%soundDevice%" eq none
set digitizedSound off
set music off
endif
if "%soundDriver%" eq .none
set digitizedSound off
endif
if "%musicDriver%" eq .none
set music off
endif
rem clear dma if it's set to the default
if "%_dma%" = -1
unset _dma
endif
color back white
color text black
textbox 1 25 80 1
type %_text%\settings.txt 1 25 80 1
color back cyan
color text white
rem ----------------- prepend driver path -----------------
set _nakedSoundDriver %soundDriver%
appendSlash _cdroots %cdroot%
switch %soundDriver%
rem these three are pseudo drivers and dont really exist
case .none:
case .internal:
case sb16dig.drv:
rem all others are real
case default:
set soundDriver %_CDroots%drivers\%soundDriver%
exist %soundDriver%
if %_1% eq 0
rem driver does not exist
beep
type %_text%\sounderr.txt 10 10 60 9 -Border
waitkey
unset _soundDevice2
goto card
endif
endswitch
switch %musicDriver%
rem these three are pseudo drivers and dont really exist
case .none:
rem all others are real
case default:
set musicDriver %_CDroots%drivers\%musicDriver%
exist %musicDriver%
if %_1% eq 0
rem driver does not exist
beep
type %_text%\sounderr.txt 10 10 60 9 -Border
waitkey
unset _soundDevice2
goto card
endif
endswitch
rem ----------------- note any tsr's needed for this card -------------
switch %_nakedSoundDriver%
case gravisdg.drv:
rem gravis ultrasound
set _tsr "ultrasnd.exe -c -m100 -d %HDroot%"
set _tsr2 "ultrasnd.exe -f"
if %CDroot% ne %HDroot%
copy ultramid.ini
copy ultrasnd.exe
endif
case default:
endswitch
rem ----------------- auto music & sound -----------------
rem Automatically play music and sound unless ? option is given on
rem command line
getOpt ?
if %_err% = 0
goto loop
endif
rem getenv's argument is case sensitive; usually always uppercase,
rem but windir is lowercase. That way you can't set it from commandline!
getenv windir
if "%_1%" ne ""
rem by golly they're in windows;
rem don't use the PC Speaker because the driver isn't installed yet
switch %soundDevice%
case PCspeaker:
goto autoMusicTest
case default:
endswitch
endif
if %digitizedSound% ne off
color back blue
color text yellow blink
type %_text%\psound.txt 20 20 40 1
color text white
type %_text%\playing.txt 5 21 70 4
rem show them which menu item would have gotten them here, more or less.
color back cyan
menu %_text%\main.mnu 19 10 44 9 %_text%\main.tit %_text%\updown.leg -default 0 -showOnly
sound knowledg.voc
endif
:autoMusicTest
if %musicType% ne none
color back blue
color text yellow blink
type %_text%\pmusic.txt 20 20 40 1
color text white
type %_text%\playing.txt 5 21 70 4
rem show them which menu item would have gotten them here, more or less.
color back cyan
menu %_text%\main.mnu 19 10 44 9 %_text%\main.tit %_text%\updown.leg -default 1 -showOnly
music kalogo.%musicType%
endif
rem default after automatic test is to save and exit
set _mainDef 4
textbox 5 20 70 5 blue
goto loop_noclear
:loop
rem ----------------- select function --------------------
textbox 1 9 80 16 blue
:loop_noclear
color back white
color text black
textbox 1 25 80 1
type %_text%\settings.txt 1 25 80 1
color back cyan
color text white
menu %_text%\main.mnu 19 10 44 9 %_text%\main.tit %_text%\updown.leg -default %_mainDef%
set _mainDef 0
switch %_1%
case exit:
goto exit
case escape:
goto card
case card:
goto card
case music:
if %musicType% ne none
color back blue
color text yellow blink
type %_text%\pmusic.txt 20 20 40 1
color text white
type %_text%\playing.txt 5 21 70 4
music kalogo.%musicType%
endif
case sound:
if %soundDriver% ne .none
color back blue
color text yellow blink
type %_text%\psound.txt 20 20 40 1
color text white
type %_text%\playing.txt 5 21 70 4
sound knowledg.voc
endif
case settings:
goto settings
endswitch
goto loop
rem
rem ----------------- select i/o adr --------------------
:settings
textbox 1 9 80 16 blue
menu %_text%\io.mnu 19 11 44 12 %_text%\io.tit %_text%\updown.leg
textbox 1 9 80 16 blue
if %_1% eq escape
goto loop
endif
set _ioPort %_1%
color back white
color text black
textbox 1 25 80 1
type %_text%\settings.txt 1 25 80 1
color back cyan
color text white
rem
rem ----------------- select IRQ --------------------
textbox 1 9 80 16 blue
menu %_text%\irq.mnu 19 11 44 12 %_text%\irq.tit %_text%\updown.leg
textbox 1 9 80 16 blue
if %_1% eq escape
goto loop
endif
set _irq %_1%
color back white
color text black
textbox 1 25 80 1
type %_text%\settings.txt 1 25 80 1
color back cyan
color text white
rem
rem ----------------- select DMA --------------------
textbox 1 9 80 16 blue
menu %_text%\dma.mnu 19 11 44 10 %_text%\dma.tit %_text%\updown.leg
textbox 1 9 80 16 blue
if %_1% eq escape
goto loop
endif
set _dma %_1%
rem Do we need to handle the PAS16-as-SB kluge again here? How could we tell?
set _musicIoPort "%_ioPort%"
rem ----- select done ----
rem copy temporary settings (_ioPort, etc.) into real settings (SoundDevParams, etc).
setSoundPort "%_ioPort%" "%_irq%" "%_dma%" "%_drq%"
setMusicPort "%_musicIoPort%"
goto loop
rem
:exit
rem ---------- set up sound files ---------
saveconfig
rem this section will change for each product!
rem copy the music archive for each zoomscape and kav.
exist ka.%musicType%
if %_1% = 0
goto no_music_archive
endif
if %musicType% ne none
textbox 1 9 80 17 blue
color back blue
color text yellow
type %_text%\copying4.txt 1 15 80 1
color back cyan
color text white
copy ka.%musicType% ka.mus
endif
:no_music_archive
rem ---------- copy driver files -----------
copy %_text%\product.bat %shortTitle%.bat -expand
rem ---------- select how much to install -----------
rem feeble attempt to make setup script sense whether subset archives exist.
rem caution: cdrom burner refuses to create empty directories
existdir %cdroot%\cachex1
if %_1% = 0
goto cache_done
endif
:cache
textbox 1 9 80 17 blue
beep 2
type %_text%\cache.txt 6 18 68 6 -border
menu %_text%\cache.mnu 19 10 44 6 %_text%\cache.tit %_text%\updown.leg
textbox 1 9 80 17 blue
set _choice %_1%
set _needDisk "%_2%"
if %_choice% eq escape
goto loop
endif
rem delete old copy of cache files, if any. assume there are two caches.
copy cache1 %hdroot% -dir -uncopy
copy cache2 %hdroot% -dir -uncopy
getdiskfree
set _gotDisk %_1%
if %_gotDisk% < %_needDisk%
beep
type %_text%\diskfre2.txt 10 15 60 8 -border
waitkey_noesc
switch %_1%
case escape:
goto exit_unsaved
case default:
endswitch
goto cache
endif
color back blue
color text yellow
type %_text%\copying3.txt 17 19 50 6
color back cyan
color text white
rem copy chosen set of quick access files
copy cache%_choice% %hdroot% -dir
copy cachex%_choice% %hdroot% -dir -expand
:cache_done
color back cyan
rem ---------- check and modify config.sys ------------
detect_files
set _nfiles %_1%
set _cfiles %_2%
rem _nfiles is how many files could actually be opened when pictext.exe started
rem _cfiles is the argument to FILES= in CONFIG.SYS
rem _nfiles is often less than _cfiles
set _needfiles 17
set _setfiles 20
if %_nfiles% >= %_needfiles%
goto files_done
endif
rem they don't have enough file handles. Is it because of CONFIG.SYS?
if %_cfiles% >= %_setfiles%
rem nope. Don't offer to change CONFIG.SYS.
textbox 1 9 80 17 blue
beep 1
type %_text%\files2.txt 7 11 70 13 -border
waitkey
goto files_done
endif
rem Their CONFIG.SYS needs changing.
:addfiles
textbox 1 9 80 17 blue
beep 2
type %_text%\files.txt 10 11 63 13 %_text%\files.tit %_text%\yesno.leg
waitkey_noesc
switch %_1%
case %yes%:
set_files %_setfiles%
beep
type %_text%\didfiles.txt 10 11 63 13 -border
waitkey_noesc
case %no%:
rem do nothing
case escape:
rem do nothing
case default:
goto addfiles
endswitch
textbox 1 9 80 17 blue
:files_done
rem ---------- check windows, set up icons, dma, and realsound driver ---------
set _winWarning anykey.txt
detect_windows_dir
set _windir %_1%
if %_windir% eq "none"
goto no_windows
endif
:do_windows
textbox 1 9 80 17 blue
beep 2
type %_text%\windows.txt 9 11 65 8 %_text%\windows.tit %_text%\yesno.leg
waitkey_noesc
switch %_1%
case %yes%:
rem copy files needed by windows code
copy kagroup.exe %_windir%\kagroup.exe
exist %_windir%\kagroup.inf
if %_1% = 0
copy %_text%\kagroup.hdr %_windir%\kagroup.inf -expand
endif
copy %_text%\kagroup.inf %_windir%\kagroup.inf -expand -append
rem when setting up windows, only load device driver if needed
rem perhaps this should be part of menu file rather than special
rem case code.
if "%soundDevice%" eq "PCSpeaker"
appendSlash _hdroots %hdroot%
setup_windows %_windir% %_HDRoots%vrsd.386
endif
if "%soundDevice%" ne "PCSpeaker"
setup_windows %_windir%
endif
textbox 1 9 80 17 blue
beep
type %_text%\windone.txt 10 11 63 11 -border
set _winWarning windone2.txt
waitkey
case %no%:
rem do nothing
case escape:
rem do nothing
case default:
goto do_windows
endswitch
:no_windows
color back black
color text white
textbox 1 1 80 25 black
type %_text%\done.txt 1 1 80 15
if "%soundDevice%" eq "Digispeech Portable Sound Plus"
type %_text%\bmaster.txt 1 16 80 4
endif
getenv windir
if "%_1%" ne ""
beep
type %_text%\%_winWarning% 1 21 80 4
rem pause if their window might go away...
waitkey
set _waited 1
endif
rem Since this product's install is invoked by a shell, and
rem Larry wants it to loop, pause so the final message doesn't
rem get obliterated. Should only do this if invoked by install.
if "%_waited%" ne 1
type %_text%\anykey.txt 1 21 80 4
waitkey
endif
goto final_exit
:exit_unsaved
textbox 1 1 80 25 black
:final_exit
___ENDSCRIPT___
u