/****************************************************************************
 *                                                                          *
 *                           VLSI Technology, Inc.                          *
 *                          Copyright (C) 1997-1999                         *
 *                            All Rights Reserved                           *
 *                             VLSI Confidential                            *
 *                                                                          *
 ****************************************************************************/

/****************************************************************************
 *                                                                          *
 *   WARNING: DO NOT ALTER THIS FILE!                                       *
 *                                                                          *
 *   FILE:                                                                  *
 *      INSTALL.DAT                                                         *
 *                                                                          *
 *   DESCRIPTION:                                                           *
 *      This file will modify the AUTOEXEC.BAT file                         *
 *      on the boot drive (which is identified as the drive pointed         *
 *      to by the COMSPEC environment variable).                            *
 *                                                                          *
 ****************************************************************************/


@DefineProject
   @Name     = "ThunderBird PCI Audio Software"
   @Version  = "5.22"
   @Group    = "A"
   @SubDir   = "\\"
   @OutDrive = C
   @Requires @HardDisk
@EndProject


@DefineVars
   @Dir @TBirdDir = "\\TBIRD"
@EndVars


@If (@Spawn("CHECKAUD.EXE /QUIET") == 255)
    @Display







                 A ThunderBird PCI Audio PCB is NOT INSTALLED!


                    Please turn off the computer and plug a

                   ThunderBird PCI Audio PCB into a PCI slot.


                               Run install again.






                                     @Pause
                                     @Exit
    @EndDisplay
@EndIf 


@If (@Spawn("CHECKAUD.EXE /QUIET /DEVICEID==0x0300") == 0)
    @Display







                  A non-ThunderBird PCI Audio PCB is installed!


                     Please turn off the computer and plug a

                    ThunderBird PCI Audio PCB into a PCI slot.


                               Run install again.






                                     @Pause
                                     @Exit
    @EndDisplay
@EndIf


@Display








         This program will make a copy of the original AUTOEXEC.BAT and

         copy needed files to your hard disk. You will be asked for the

         output drive and directory. 








                                     @Pause
@EndDisplay


@GetOutDrive
              Which drive would you like to install the files to?
@EndOutDrive


@If (@Removable)
    @Display






                 You CAN NOT install the files to a floppy drive!






                                     @Pause
         @Abort
    @EndDisplay
@EndIf

/*
 *@GetSubdir @TBirdDir
 *   In which directory would you like to install the initialization files?
 *   @Prompt = "Directory [Enter]?"
 *@EndSubdir
 */

/*
 *   The following lines will be placed into any pre-existing 
 *   AUTOEXEC.BAT file on the boot disk in the boot drive.  If no
 *   AUTOEXEC.BAT file already exists, then one will be created.
 *                      
 *   Each of the two AUTOEXEC.BAT related commands, @Path and 
 *   @Verbatim, is aware of the structure of an AUTOEXEC.BAT file.
 *
 *   The @Path command examines each node of any existing PATH= 
 *   commands (or its synonym SET PATH=) and places each of the 
 *   nodes specified in the @Path command of the INSTALL.DAT file
 *   only if the node does not already exist on the PATH= search 
 *   list of the AUTOEXEC.BAT file.
 *
 *   The @Verbatim command instructs INSTALL to place the quoted 
 *   string into the AUTOEXEC.BAT file, if the string is not 
 *   already there.
 */


@If (@Spawn("CHECKAUD.EXE /QUIET /DEVICEID=0x0304 /REVISION=0x19") == 0) /* VT21702 Detected */
   @Write("C:\\TBRDINIT.BAT", "wt", "@@ECHO OFF\n")
   @Write("C:\\TBRDINIT.BAT", "at", "IF [%TBRDPATH%]==[] SET TBRDPATH=@OutDrive:@TBirdDir\\\n")
   @Write("C:\\TBRDINIT.BAT", "at", "IF EXIST %TBRDPATH%TBIRD.BAT CALL %TBRDPATH%TBIRD.BAT\n")

   @SetAutoexec
      @Overwrite
      @Path       = "%PATH%;@OutDrive:@TBirdDir;"
      @SetReplace ("TBRDPATH", "@OutDrive:@TBirdDir\\")
      @Verbatim   = "IF EXIST C:\\TBRDINIT.BAT CALL C:\\TBRDINIT.BAT"  
   @EndAutoexec

   @DefineDisk
      @Label = "Disk 1 of 1"
      @File BELLS.WAV    @Size   56418 @Out @TBirdDir\*.*

      @File CHECKAUD.EXE @Size  108856 @Out @TBirdDir\*.*
      @File CHKAUDMA.EXE @Size   99664 @Out @TBirdDir\*.*

      @File LOADHHWT.COM @Size   15617 @Out @TBirdDir\*.*

      @File PEEKWAVE.EXE @Size  138708 @Out @TBirdDir\*.*

      @File SB_INIT.EXE  @Size  127684 @Out @TBirdDir\*.*
      @File SOFTIRQ.COM  @Size    3283 @Out @TBirdDir\*.*
      @File SOFTLAM.COM  @Size    6562 @Out @TBirdDir\*.*

      @File TBIRD.BAT    @Size    8165 @Out @TBirdDir\*.*
      @File TBIRD128.DLS @Size 6021122 @Out @TBirdDir\*.*
      @File TBIRD128.PCH @Size    4370 @Out @TBirdDir\*.*
      @File TBIRDCTL.EXE @Size   81396 @Out @TBirdDir\*.*
   @EndDisk
@EndIf 

    
@If (@Spawn("CHECKAUD.EXE /QUIET /DEVICEID=0x0304 /REVISION=0x38") == 0) /* VT21852 Detected */
   @Write("C:\\TBRDINIT.BAT", "wt", "@@ECHO OFF\n")
   @Write("C:\\TBRDINIT.BAT", "at", "IF [%TBRDPATH%]==[] SET TBRDPATH=@OutDrive:@TBirdDir\\\n")
   @Write("C:\\TBRDINIT.BAT", "at", "IF EXIST %TBRDPATH%TBIRD.BAT CALL %TBRDPATH%TBIRD.BAT\n")

   @SetAutoexec
      @Overwrite
      @Path       = "%PATH%;@OutDrive:@TBirdDir;"
      @SetReplace ("TBRDPATH", "@OutDrive:@TBirdDir\\")
      @Verbatim   = "IF EXIST C:\\TBRDINIT.BAT CALL C:\\TBRDINIT.BAT"  
   @EndAutoexec

   @DefineDisk
      @Label = "Disk 1 of 1"
      @File BELLS.WAV    @Size   56418 @Out @TBirdDir\*.*

      @File CHECKAUD.EXE @Size  108856 @Out @TBirdDir\*.*
      @File CHKAUDMA.EXE @Size   99664 @Out @TBirdDir\*.*

      @File LOADHHWT.COM @Size   15617 @Out @TBirdDir\*.*

      @File PEEKWAVE.EXE @Size  138708 @Out @TBirdDir\*.*

      @File SB_INIT.EXE  @Size  127684 @Out @TBirdDir\*.*
      @File SOFTIRQ.COM  @Size    3283 @Out @TBirdDir\*.*
      @File SOFTLAM.COM  @Size    6562 @Out @TBirdDir\*.*

      @File TBIRD.BAT    @Size    8165 @Out @TBirdDir\*.*
      @File TBIRD128.DLS @Size 6021122 @Out @TBirdDir\*.*
      @File TBIRD128.PCH @Size    4370 @Out @TBirdDir\*.*
      @File TBIRDCTL.EXE @Size   81396 @Out @TBirdDir\*.*
   @EndDisk
@EndIf 

    
@If (@Spawn("CHECKAUD.EXE /QUIET /DEVICEID=0x0307 /REVISION=0x00") == 0) /* VT22045 Detected */
   @Write("C:\\TBRDINIT.BAT", "wt", "@@ECHO OFF\n")
   @Write("C:\\TBRDINIT.BAT", "at", "IF [%TBRDPATH%]==[] SET TBRDPATH=@OutDrive:@TBirdDir\\\n")
   @Write("C:\\TBRDINIT.BAT", "at", "IF EXIST %TBRDPATH%TBIRD.BAT CALL %TBRDPATH%TBIRD.BAT\n")

   @SetAutoexec
      @Overwrite
      @Path       = "%PATH%;@OutDrive:@TBirdDir;"
      @SetReplace ("TBRDPATH", "@OutDrive:@TBirdDir\\")
      @Verbatim   = "IF EXIST C:\\TBRDINIT.BAT CALL C:\\TBRDINIT.BAT"  
   @EndAutoexec

   @DefineDisk
      @Label = "Disk 1 of 1"
      @File BELLS.WAV    @Size   56418 @Out @TBirdDir\*.*

      @File CHECKAUD.EXE @Size  108856 @Out @TBirdDir\*.*
      @File CHKAUDMA.EXE @Size   99664 @Out @TBirdDir\*.*

      @File LOADHHWT.COM @Size   15617 @Out @TBirdDir\*.*

      @File PEEKWAVE.EXE @Size  138708 @Out @TBirdDir\*.*

      @File SB_INIT.EXE  @Size  127684 @Out @TBirdDir\*.*
      @File SOFTIRQ.COM  @Size    3283 @Out @TBirdDir\*.*
      @File SOFTLAM.COM  @Size    6562 @Out @TBirdDir\*.*

      @File TBIRD.BAT    @Size    8165 @Out @TBirdDir\*.*
      @File TBIRD128.DLS @Size 6021122 @Out @TBirdDir\*.*
      @File TBIRD128.PCH @Size    4370 @Out @TBirdDir\*.*
      @File TBIRDCTL.EXE @Size   81396 @Out @TBirdDir\*.*
   @EndDisk
@EndIf 

    
@Finish
  @Reboot("Install will now reboot your computer, please remove the floppy disk.", 1)
@EndFinish


/****************************************************************************
 *                                                                          *
 * $Archive$
 * $Revision$
 * $Modtime$
 * $Log$
 *                                                                          *
 ****************************************************************************/
