//**************************************************************************
//                           I N S T A L L
//                     ProAgio  and  PC Mouse 3D/6D
//-------------------------------------------------------------------------
// This installs the ProAgio 3D/6D driver for AutoCAD R10, R11, and R12
// The user may either add the needed variables to the autoexec or the batch
// file itself.
//-------------------------------------------------------------------------
// Revision History:
// 21-Jul-1992 CLW *** Version 1.00
// 26-Oct-1992 WGG     Script editing changes; add Mouse Systems copyright
// 23-Aug-1994 WGG     Text changes; directory name change
//**************************************************************************

@defineproject
    @name       = "Ami Mouse 97 Mouse"
    @version    = "1.00"
    @outdrive   = c
    @subdir     = "\\msc3dadi"
@endproject

//-------------------------------------------------------------------------
// Starting screen
//-------------------------------------------------------------------------
@display
    @cls
    @windmsg(4,23,"@name","","Version @Version  Aug. 23, 1994")










    You will be asked various questions about the installation of
    @name on your system.  This program will make the needed
    changes, as requested by the user.

    You may abort the installation at any time by hitting ESC

    @pause
@enddisplay

//-------------------------------------------------------------------------
// Which release(s) of AutoCAD to install
//-------------------------------------------------------------------------
@getoption
    @cls
    @checkbox
    @writeat("Select AutoCAD Release(s)",30,,100)










    For each Release selected, this install will ask for the location of
    the program.

    Use <SPACE> to toggle options, and <UP> and <DOWN> to select line.
    Use 'Y' to set all options to YES.
    @option 20 = "Release 10"
    @option 21 = "Release 11"
    @option 22 = "Release 12"
@endoption

@if (20 [! @option && 21 [! @option && 22 [! @option)
    @display
        @cls
















        @windmsg(7,79,"--- E R R O R ! ---",
                 "This program is designed to install the driver for",
                 "AutoCAD R10, 11, and 12!")
    @pause
    @enddisplay
    @abort
@endif

//-------------------------------------------------------------------------
// Locate AutoCAD Release(s)
//-------------------------------------------------------------------------
@if (20 [= @option)
     @display
     @windmsg(2,14,"--- I M P O R T A N T ---")






     To use the driver with AutoCAD Release 10, first load the DOS
     mouse driver, then configure AutoCAD to use the Microsoft bus
     mouse.

     @pause
     @enddisplay
@endif
@definevars
    @drive @acad11drive = c
    @dir @acad11dir = "\\acad"
@endvars
@if (21 [= @option)

    @getoutdrive @acad11drive
    @cls
    @suppress A
    @suppress B
    @writeat("Please specify the drive where AutoCAD Release 11 is located.",
      30,18,100)
    @endoutdrive
    @getsubdir @acad11dir
        @cls
        @writeat("Please specify the directory where AutoCAD Release 11 is located.",
          30,8,100)





    @endsubdir
    @if (!(@exists "@acad11drive:@acad11dir\\ACAD.EXE"))
        @getoption
            @cls
            @windmsg(10,79,"--- W A R N I N G ! ---",
                 "ACAD.EXE was not found in the directory:",
                 "@acad11drive:@acad11dir")
            @option 10000 = "Quit installation!"
            @option 10001 = "Continue"
        @endoption
        @if (10000 [= @option)  @abort  @endif
    @endif
@endif

@definevars
    @if (21 [= @option)
        @drive @acad12drive = @acad11drive
    @else
        @drive @acad12drive = c
    @endif
    @dir @acad12dir = "\\acad"
@endvars
@if (22 [= @option)

    @getoutdrive @acad12drive
    @cls
    @suppress A
    @suppress B
    @writeat("Please specify the drive where AutoCAD Release 12 is located.",
              30,18,100)
    @endoutdrive
    @getsubdir @acad12dir
        @cls
        @writeat("Please specify the directory where AutoCAD Release 12 is located.",
         30,8,100)





    @endsubdir
    @if (!(@exists "@acad12drive:@acad12dir\\ACAD.EXE"))
        @getoption
            @cls
            @windmsg(10,79,"--- W A R N I N G ! ---",
                     "ACAD.EXE was not found in the directory:",
                     "@acad12drive:@acad12dir")
            @option 10000 = "Quit installation!"
            @option 10001 = "Continue"
        @endoption
        @if (10000 [= @option)  @abort  @endif
    @endif
@endif

//-------------------------------------------------------------------------
@definevars
    @drive @a11bdrive = @acad11drive
    @dir @a11bdir = "\\"
    @qstring @a11bname = "ACAD386.BAT"
    @drive @a12bdrive = @acad12drive
    @dir @a12bdir = "\\"
    @qstring @a12bname = "ACADR12.BAT"
@endvars
@if (21 [= @option)
    @getoutdrive @a11bdrive
        @cls
        @suppress A
        @suppress B
        @writeat("Use the <UP> <DOWN> arrow keys to move and <ENTER> to select.",,20,100)
        @writeat("Please specify the drive where the AutoCAD R11 batch is located.",30,18,100)
    @endoutdrive
    @getsubdir @a11bdir
        @cls
        @writeat("Please specify the directory where the AutoCAD R11 batch is located.",30,8,100)
        @writeat("Type the pathname and press <ENTER>.  <ESC> once to clear, twice to abort.",,20,100)
        @localwindow(13,1)
    @endsubdir
    @getstring @a11bname
        @cls
        @writeat("Please specify the name of the AutoCAD R11 batch.",30,8,100)
    @endstring
@endif
@if (22 [= @option)
    @getoutdrive @a12bdrive
        @cls
        @suppress A
        @suppress B
        @writeat("Use the <UP> <DOWN> arrow keys to move and <ENTER> to select.",,20,100)
        @writeat("Please specify the drive where the AutoCAD R12 batch is located.",30,18,100)
    @endoutdrive
    @getsubdir @a12bdir
        @cls
        @writeat("Please specify the directory where the AutoCAD R12 batch is located.",30,8,100)
        @writeat("Type the pathname and press <ENTER>.  <ESC> once to clear, twice to abort.",,20,100)
        @localwindow(13,1)
    @endsubdir
    @getstring @a12bname
        @cls
        @writeat("Please specify the name of the AutoCAD R12 batch.",30,8,100)
    @endstring
@endif

//-------------------------------------------------------------------------
// Does the user want the changes to disk, a new file, or edited
//-------------------------------------------------------------------------
@if (21 [= @option || 22 [= @option)
@getoption
    @cls
    @writeat("Configuration changes",30,,100)
    @option 400 = "Display required commands to screen only"
    @option 401 = "Put a prototype into a .NEW file"
    @option 402 = "Modify batches directly, making a backup"
@endoption

@if (21 [= @option)
@setbatch
    @file "@a11bdrive:@a11bdir\\@a11bname"
    @if (400 [= @option)
        @screenproto
    @elseif (401 [= @option)
        @diskproto
    @elseif (402 [= @option)
        @askoverwrite
    @endif
    @setreplacE("DGPADIHOOK","3DNUL.FIL")
    @setreplace("DGPADI","@acad11drive:@acad11dir\\DGMSC3D.EXP")
@endbatch
@endif
@if (22 [= @option)
@setbatch
    @file "@a12bdrive:@a12bdir\\@a12bname"
    @if (400 [= @option)
        @screenproto
    @elseif (401 [= @option)
        @diskproto
    @elseif (402 [= @option)
        @askoverwrite
    @endif
    @setreplace("DGPADIHOOK","3DNUL.FIL")
@endbatch
@endif
@endif

@definedisk
  @label = "Distribution Disk"
  @beginlib MSC3D.RED
      @if (21 [= @option)
          @file DGMSC3D.EXP @askoverwrite @out @acad11drive:@acad11dir\\*.*
          @file 3DTEST.EXP @out @acad11drive:@acad11dir\\*.*
          @file 3DTEST.DOC @out @acad11drive:@acad11dir\\*.*
      @endif
      @if (22 [= @option)
          @file DGMSC3D.EXP @askoverwrite @out @acad12drive:@acad12dir\\DRV\\*.*
          @file 3DTEST.DOC @out @acad12drive:@acad12dir\\*.*
          @file 3DTEST.EXP @out @acad12drive:@acad12dir\\*.*
      @endif
  @endlib
@enddisk

@finish

@if (21 [= @option || 22 [= @option)
    The ADI driver for PC Mouse 3D/6D has been installed. @endif
    Be sure that the mouse itself has been properly installed
    and tested with your system and configure AutoCAD when you
    are ready to begin using @name.

    R12 users: use the -r command-line switch when starting AutoCAD
    after installing PC Mouse 3D/6D to bring up the configuration menu.




                                     Copyright 1992 Mouse Systems Corporation



    @chdrive @startupdrive
    @chdir "@startupdir"
    @pause
@endfinish
