;$VER: AsimCDFS Install 2.2 (16.1.94) 
;Copyright ©1993 Asimware Innovations

(onerror (makeassign "AsimCDFSInst") )

(set #autoMount 1)
(set #CDDefault_NC "CD0" )
(set #isPioneer 0)
(set #PioneerSeparate 0)
(set #supportLUN 1)

(set #wbversion (getversion "libs:version.library"))
(set #wbversion (/ #wbversion 65536) )

(set #SCSIDevice "scsi.device")
(set #SCSIUnit 4)

(set @default-dest "SYS:AsimCDFS")

(complete 0)

(if (< #wbversion 30)
   (abort "\n\nAmigaDOS 2.0 or higher is required for AsimCDFS 2.0. "
          "\n\nAn upgrade will be needed for your Amiga."
          "\n\nYou are currently running version " #wbversion ".")
)


(if (< (getdiskspace "SYS:") 66560)
   (abort "\n\nApproximately 65K of disk space is needed on your SYS: volume."
          "\n\nYou only have " (/ (getdiskspace "SYS:") 1024)  "K free.\n\n"
          "Delete or transfer some files from the SYS: volume and try again." )
)

(askdisk
   (prompt "Please insert the disk labeled \"AsimCDFS_v2_Install\".")
   (help "AsimCDFS FileSystem and other utilities will be copied "
         "from this disk into your system.")
   (dest  "AsimCDFS_v2_Install")
   (newname "AsimCDFSInst")
)

(set #theirlevel @user-level )
(user 2)

(complete 0 )
(set #IsAmiga
   (askbool
      (prompt "\n\nAre you installing AsimCDFS on a CDTV or Amiga?" )
      (default 1 )
      (choices "Amiga" "CDTV" )
      (help "\n\nIf AsimCDFS is being used in conjunction with a CDTV/A570 unit "
            "then note this with the CDTV gadget.\n\n "
            "Otherwise, you will be installing AsimCDFS on an Amiga equipped "
            "with a SCSI controller and SCSI CD-Rom drive." )
   )
)

(complete 5 )
(if (not #IsAmiga) 
   ((set #CDDefault_NC "CD1" )
   (set #SCSIDevice "cdtv.device")
   (set #SCSIUnit 0)
   )
)

(if #IsAmiga
   (set #isPioneer 
      (askbool
         (prompt "\n\n\nIs your CD-Rom drive a Pioneer DRM-60x?" )
         (default 0)
         (choices "Pioneer DRM-60x" "Other CD-Rom")
         (help "\n\nIf you are using AsimCDFS with a Pioneer DRM-60x, indicate this "
               "in your choice.\n\nThis drive is a high-performance 6-disc minichanger and "
               "is not common."
               "\n\nOtherwise select Other CD-Rom." )
      )
   )
)


(complete 10 )
(if #isPioneer
   (
   (set #PioneerSeparate
         (askbool
            (prompt "\n\nDo you wish to have 6 separate devices mounted, or would you like all 6 discs pooled into 1 device?\n\n" )
            (default 0 )
            (choices "Separate" "Pooled")
            (help "\n\nIf you wish to have access to all 6 discs simultaneously, then "
                  "select Separate, otherwise select Pooled  --  in the latter case, "
                  "you can switch between the discs with DiscChanger." )
         )
      )

   (if #PioneerSeparate
      ((set #CDDevice_NC 
            (askstring
               (prompt "\n\nWhat is the base-name for the AmigaDOS device?\n\n(The trailing colon MUST NOT be present.  See manual for explanation.)" )
               (default "CD" )
               (help "\n\nThis is the base name under which AmigaDOS will reference the "
                     "CD-Rom as.  As you are installing AsimCDFS for a Pioneer 6-disc changer "
                     ", 6 such devices named <basename>0 through <basename>5 will be mounted (ie.  CD0, CD1, ..., CD5) "
                     "\n\nThe trailing : (colon) or the 0 through 5 MUST NOT be present." )
            )
         )
      (set #CDDevice (cat #CDDevice_NC "0:")))
      )
   )
)


(if (not #PioneerSeparate)
   ((set #CDDevice_NC 
      (askstring
         (prompt "\n\nWhat is the name for the AmigaDOS device?\n\n(The trailing colon MUST NOT be present)" )
         (default #CDDefault_NC )
         (help "\n\nThis is the name under which AmigaDOS will reference the "
               "CD-Rom as.  While usually "
               #CDDefault_NC
               ", it can be any name you choose. "
               "\n\nThe trailing : (colon) MUST NOT be present." )
      )
   )

   (set #CDDevice (cat #CDDevice_NC ":") ))
)



(if #IsAmiga
   (set #useInquire
      (askbool
         (prompt "\n\nWould you like to use the SCSI Inquire utility to locate your CD-Rom drive?" )
         (default 1 )
         (help "\n\nThe SCSI Inquire utility will scan your system for suitable SCSI "
               "devices and display a listing of all units connected to the device.  "
               "Your CD-Rom drive must be powered-on and correctly connected "
               "for it to be acknowledged by this utility.  Consult the SCSI Inquire "
               "chapter for more information." )
      )
   )
)


(if #useInquire
   (
   (run "AsimCDFS_v2_Install:SCSI_Inquire")  
   
   (if (exists "ENV:SCSI_Device")
      ((set #SCSIDevice (getenv "SCSI_Device"))
      (set #SCSIUnit (+ (getenv "SCSI_Unit")))
      ))
   )
)



(complete 15 )
(if #IsAmiga
   ((set #SCSIDevice 
      (askstring
         (prompt "\n\nWhat is the name of your SCSI device?" )
         (default #SCSIDevice )
         (help "\n\nThis is the name of the device driver for your particular "
               "SCSI card.  For example, the Commodore 2091/590/Amiga3000 has "
               "a name of \"scsi.device\".\n\n"
               "If you successfully ran the SCSI Inquire utility, this question will default to the correct unit number. "
               "Otherwise, consult either the AsimCDFS User's Guide or contact the SCSI Controller's manufacturer." )
      )
   )
   
(complete 18 )
   (set #SCSIUnit 
      (asknumber
         (prompt "\n\nWhat is the SCSI Unit number of your CD-Rom drive?" )
         (default #SCSIUnit )
         (help "\n\nThis is the unit # of the CD-Rom drive.  This is usually a "
               "numerical value between 0 and 6.\n\n"
               "If you successfully ran the SCSI Inquire utility, this question will default to the correct unit number.  "
               "Otherwise, consult the CDRom drive documentation for instructions on "
               "determining the unit #." )
      )
   ))
)


(complete 35 )
(set #autoMount
   (askbool
      (prompt "\n\nWould you like the CD-Rom drive automatically mounted upon bootup?" )
      (help "\n\nIf you would like, the appropriate commands will be added to your user-startup file to automatically mount AsimCDFS.\n")
      (default 1)
   )
)


(if #autoMount
   (set #mountDirectory "devs:DOSDrivers/")
)

(if (not #autoMount)
   (set #mountDirectory "sys:storage/DOSDrivers/")
)


(set #tunesDir
   (askdir
      (prompt "Specify the directory in which the AsimCDFS support programs will be placed:" )
      (help "AsimCDFS contains a number of support programs.  This directory will specifiy where the programs will be placed.  If you need, create a separate directory for the files.")
      (default @default-dest)
      (newpath)
   )
)

(if (not (exists #tunesDir (noreq)))
   (makedir #tunesDir
      (prompt "Creating the AsimTunes directory...")
      (help "This will create the specified directory for the support programs.")
      (infos)
      )
)
(makeassign "AsimTunes" #tunesDir)




(user #theirlevel)
(complete 20 )

(complete 30 )
(protect "l:AsimCDFS" "rwed" )
(copyfiles
   (prompt "\n\nCopying AsimCDFS FileSystem to the l: directory.\n" )
   (source "AsimCDFSInst:l/AsimCDFS")
   (dest "l:")
   (confirm)
   (help "\n\nThis will copy over the AsimCDFS FileSystem program to your "
      "l: directory\n\nThis is an essential step in the installation "
      "process.\n" )
)



(complete 30 )
(protect "devs:asimcdfs.device" "rwed" )
(copyfiles
   (prompt "\n\nCopying asimcdfs.device to the devs: directory.\n" )
   (source "AsimCDFSInst:devs/asimcdfs.device")
   (dest "devs:")
   (confirm)
   (help "\n\nThis will copy over the asimcdfs.device program to your "
      "devs: directory\n\nThis is an essential step in the installation "
      "process.\n" )
)





(if (= #wbversion 37) 
   ((if #PioneerSeparate
      ((set #startupCommand1 (cat "mount " #CDDevice_NC "0: from devs:MountList." #CDDevice_NC "\n") )
      (set #startupCommand2 (cat "mount " #CDDevice_NC "1: from devs:MountList." #CDDevice_NC "\n") )
      (set #startupCommand3 (cat "mount " #CDDevice_NC "2: from devs:MountList." #CDDevice_NC "\n") )
      (set #startupCommand4 (cat "mount " #CDDevice_NC "3: from devs:MountList." #CDDevice_NC "\n") )
      (set #startupCommand5 (cat "mount " #CDDevice_NC "4: from devs:MountList." #CDDevice_NC "\n") )
      (set #startupCommand6 (cat "mount " #CDDevice_NC "5: from devs:MountList." #CDDevice_NC "\n") )
      (set #startupWait "wait sec=4\n" )
      
      (if #autoMount
         ((protect "S:User-Startup" "rwed" )
         (protect "S:Startup-Sequence" "rwed" )
         
         (startup "AsimCDFS"
            (command (cat "assign AsimTunes: " #tunesDir "\n"))
            (command #startupCommand1 )
            (command #startupCommand2 )
            (command #startupCommand3 )
            (command #startupCommand4 )
            (command #startupCommand5 )
            (command #startupCommand6 )
            (prompt "Inserting MOUNT commands into the startup-sequence")
            (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" is being inserted into your "
                  "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
                  "automatically start AsimCDFS upon bootup." )
         ))
      ))
   )

   (if (not #PioneerSeparate)
      ((set #startupCommand (cat "mount " #CDDevice " from devs:MountList." #CDDevice_NC "\n") )
      (if #autoMount
         ((protect "S:User-Startup" "rwed" )
         (protect "S:Startup-Sequence" "rwed" )
         
         (startup "AsimCDFS"
            (command (cat "assign AsimTunes: " #tunesDir "\n"))
            (command #startupCommand )
            (prompt "Inserting MOUNT command into the startup-sequence")
            (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" is being inserted into your "
                  "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
                  "automatically start AsimCDFS upon bootup." )
         ))
      ))
   )
   
   (if (not #autoMount)
      ((protect "S:User-Startup" "rwed" )
      (protect "S:Startup-Sequence" "rwed" )
      
      (startup "AsimCDFS"
         (command (cat "assign AsimTunes: " #tunesDir "\n"))
         (prompt "Inserting MOUNT command into the startup-sequence")
         (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" is being inserted into your "
               "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
               "automatically start AsimCDFS upon bootup." )
      ))
   )

   (protect (cat "devs:MountList." #CDDevice_NC) "rwed" )

   (if #isPioneer
      (textfile
         (dest (cat "devs:MountList." #CDDevice_NC) )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append #CDDevice_NC "0:\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 0" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Mount          = 1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
         (append "#\n\n")
         (append #CDDevice_NC "1:\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 1" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Mount          = 1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
         (append "#\n\n")
         (append #CDDevice_NC "2:\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 2" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Mount          = 1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
         (append "#\n\n")
         (append #CDDevice_NC "3:\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 3" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Mount          = 1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
         (append "#\n\n")
         (append #CDDevice_NC "4:\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 4" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Mount          = 1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
         (append "#\n\n")
         (append #CDDevice_NC "5:\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 5" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Mount          = 1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
         (append "#\n\n")
      )
   )



   (if (not #isPioneer)
      (textfile
         (dest (cat "devs:MountList." #CDDevice_NC) )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append #CDDevice "\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = " #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Mount          = " #autoMount "\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
         (append "#\n")
      )
   ))
)



(if (> #wbversion 37) 
   ((if (not #PioneerSeparate)
      ((textfile
         (dest (cat #mountDirectory #CDDevice_NC) )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = " #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Mount          = 1\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
      )

      (copyfiles
            (prompt "\n\nCopying Mountlist icon")
            (source "AsimCDFSInst:Devs/DOSDrivers/CD0.info")
            (dest #mountDirectory)
            (newname (cat #CDDevice_NC ".info"))
            (help "\n\nThis will copy over an icon for the mountlist file.")
            (confirm)
         )     

   ))


   (if #PioneerSeparate
      ((textfile
         (dest (cat #mountDirectory #CDDevice_NC "0") )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 0" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Mount          = 1\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
      )

      (copyfiles
            (prompt "\n\nCopying Mountlist icon")
            (source "AsimCDFSInst:Devs/DOSDrivers/CD0.info")
            (dest #mountDirectory)
            (newname (cat #CDDevice_NC "0.info"))
            (help "\n\nThis will copy over an icon for the mountlist file.")
            (confirm)
         )
      
      (textfile
         (dest (cat #mountDirectory #CDDevice_NC "1") )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 1" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Mount          = 1\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
      )

      (copyfiles
            (prompt "\n\nCopying Mountlist icon")
            (source "AsimCDFSInst:Devs/DOSDrivers/CD0.info")
            (dest #mountDirectory)
            (newname (cat #CDDevice_NC "1.info"))
            (help "\n\nThis will copy over an icon for the mountlist file.")
            (confirm)
         )

      (textfile
         (dest (cat #mountDirectory #CDDevice_NC "2") )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 2" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Mount          = 1\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
      )
      

      (copyfiles
            (prompt "\n\nCopying Mountlist icon")
            (source "AsimCDFSInst:Devs/DOSDrivers/CD0.info")
            (dest #mountDirectory)
            (newname (cat #CDDevice_NC "2.info"))
            (help "\n\nThis will copy over an icon for the mountlist file.")
            (confirm)
         )

      (textfile
         (dest (cat #mountDirectory #CDDevice_NC "3") )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 3" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Mount          = 1\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
      )
      
      (copyfiles
            (prompt "\n\nCopying Mountlist icon")
            (source "AsimCDFSInst:Devs/DOSDrivers/CD0.info")
            (dest #mountDirectory)
            (newname (cat #CDDevice_NC "3.info"))
            (help "\n\nThis will copy over an icon for the mountlist file.")
            (confirm)
         )

      (textfile
         (dest (cat #mountDirectory #CDDevice_NC "4") )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 4" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Mount          = 1\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
      )

      (copyfiles
            (prompt "\n\nCopying Mountlist icon")
            (source "AsimCDFSInst:Devs/DOSDrivers/CD0.info")
            (dest #mountDirectory)
            (newname (cat #CDDevice_NC "4.info"))
            (help "\n\nThis will copy over an icon for the mountlist file.")
            (confirm)
         )

      (textfile
         (dest (cat #mountDirectory #CDDevice_NC "5") )
         (append "/************************************************************/\n"
                 "/*  AsimCDFS MountList entry -- ©1993 Asimware Innovations  */\n"
                 "/************************************************************/\n")
         (append "   Device         = " #SCSIDevice "\n" )
         (append "   Unit           = 5" #SCSIUnit "\n" )
         (append "   Buffers        = 0\n")
         (append "   BufMemType     = 5\n" )
         (append "   Mask           = 0xffffffe\n" )
         (append "   Flags          = 0\n" )
         (append "   FileSystem     = l:AsimCDFS\n")
         (append "   DosType        = 0x662dabac\n")
         (append "   GlobVec        = -1\n")
         (append "   Reserved       = 0\n")
         (append "   LowCyl         = 0\n")
         (append "   HighCyl        = 999\n")
         (append "   Mount          = 1\n")
         (append "   Surfaces       = 1\n")
         (append "   BlocksPerTrack = 32\n")
         (append "   Priority       = 10\n")
         (append "   StackSize      = 5000\n")
      )
      (copyfiles
            (prompt "\n\nCopying Mountlist icon")
            (source "AsimCDFSInst:Devs/DOSDrivers/CD0.info")
            (dest #mountDirectory)
            (newname (cat #CDDevice_NC "5.info"))
            (help "\n\nThis will copy over an icon for the mountlist file.")
            (confirm)
         )
   ))


   (protect "S:User-Startup" "rwed" )
   (protect "S:Startup-Sequence" "rwed" )
   (startup "AsimCDFS"
      (command (cat "assign AsimTunes: " #tunesDir "\n"))
      (prompt "Inserting MOUNT command into the startup-sequence")
      (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" is being inserted into your "
            "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
            "automatically start AsimCDFS upon bootup." )
      )
))



(if #IsAmiga
   ((if #isPioneer
      ((if #PioneerSeparate
         ((copyfiles
            (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
            (source "AsimCDFSInst:Default_Prefs/Pioneer_Separate")
            (dest "ENVArc:AsimCDFS")
            (newname (cat #CDDevice_NC "0"))
            (help "\n\nThis will copy over a default preferences file.")
            (confirm)
         )
   
         (copyfiles
            (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
            (source "AsimCDFSInst:Default_Prefs/Pioneer_Separate")
            (dest "ENVArc:AsimCDFS")
            (newname (cat #CDDevice_NC "1"))
            (help "\n\nThis will copy over a default preferences file.")
            (confirm)
         )
   
         (copyfiles
            (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
            (source "AsimCDFSInst:Default_Prefs/Pioneer_Separate")
            (dest "ENVArc:AsimCDFS")
            (newname (cat #CDDevice_NC "2"))
            (help "\n\nThis will copy over a default preferences file.")
            (confirm)
         )
   
         (copyfiles
            (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
            (source "AsimCDFSInst:Default_Prefs/Pioneer_Separate")
            (dest "ENVArc:AsimCDFS")
            (newname (cat #CDDevice_NC "3"))
            (help "\n\nThis will copy over a default preferences file.")
            (confirm)
         )
   
         (copyfiles
            (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
            (source "AsimCDFSInst:Default_Prefs/Pioneer_Separate")
            (dest "ENVArc:AsimCDFS")
            (newname (cat #CDDevice_NC "4"))
            (help "\n\nThis will copy over a default preferences file.")
            (confirm)
         )
   
         (copyfiles
            (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
            (source "AsimCDFSInst:Default_Prefs/Pioneer_Separate")
            (dest "ENVArc:AsimCDFS")
            (newname (cat #CDDevice_NC "5"))
            (help "\n\nThis will copy over a default preferences file.")
            (confirm)
         ))
      )
         
      (if (not #PioneerSeparate)
         (copyfiles
            (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
            (source "AsimCDFSInst:Default_Prefs/Pioneer_Pool")
            (dest "ENVArc:AsimCDFS")
            (newname #CDDevice_NC)
            (help "\n\nThis will copy over a default preferences file.")
            (confirm)
         )
      )     
   ))
   
   
   (if (not #isPioneer)
      (copyfiles
         (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
         (source "AsimCDFSInst:Default_Prefs/Default")
         (dest "ENVArc:AsimCDFS")
         (newname #CDDevice_NC)
         (help "\n\nThis will copy over a default preferences file.")
         (confirm)
      )
   ))
)


(if (not #IsAmiga)
   (copyfiles
      (prompt "\n\nCopying default preferences file to the ENVArc:AsimCDFS directory.\n" )
      (source "AsimCDFSInst:Default_Prefs/CDTV")
      (dest "ENVArc:AsimCDFS")
      (newname #CDDevice_NC)
      (help "\n\nThis will copy over a default preferences file.")
      (confirm)
   )
)

(complete 60 )


(set #instTunes
   (askbool
      (prompt "\n\nShould the AsimTunes utility be installed?")
      (help "\n\nThis will copy over the AsimTunes utility "
            "to your AsimTunes: directory\n\nIf you do not "
            "wish the AsimTunes program to be transferred to your system, "
            "skip this step.\n" )
      (default 1)
   )
)

(if #instTunes 
   ((protect "AsimTunes:AsimTunes" "rwed" )
   (protect "AsimTunes:AsimTunes.info" "rwed" )
   (copyfiles
      (prompt "\n\nCopying AsimTunes CDAudio controller program to the "
              "AsimTunes: directory.\n" )
      (source "AsimCDFSInst:AsimTunes")
      (dest "AsimTunes:")
      (infos)
      (help "\n\nThis will copy over the AsimTunes CDAudio controller "
            "program to your AsimTunes: directory\n\nIf you do not "
            "wish the AsimTunes program to be transferred to your system, "
            "skip this step.\n" )
      (confirm)
   )
   
   (tooltype
      (dest "AsimTunes:AsimTunes" )
      (settooltype "CDROM" #CDDevice )
      (noposition)
   )
      
      
   (complete 70 )
   (protect "fonts:AsimTunes2" "rwed" )
   (protect "fonts:AsimTunes2.font" "rwed" )
   (protect "fonts:AsimTunes2/11" "rwed" )
   (protect "fonts:AsimTunes2/20" "rwed" )
   (copyfiles
      (prompt "\n\nCopying AsimTunes fonts to the FONTS: directory\n" )
      (source "AsimCDFSInst:fonts")
      (dest "fonts:" )
      (all)
      (help "\n\nThis will copy over the fonts needed for AsimTunes.\n\n"
            "They will be placed into your fonts: directory.\n\n" )
      (confirm) )
))





(complete 80 )

(set #instChanger
   (askbool
      (prompt "\n\nShould the DiscChanger utility be installed?")
      (help "\n\nThis will copy over the DiscChanger utility "
            "to your AsimTunes: directory\n\nIf you do not "
            "wish the DiscChanger program to be transferred to your system, "
            "skip this step.\n" )
      (default 1)
   )
)

(complete 85 )
(if #instChanger
   ((protect "AsimTunes:DiscChanger" "rwed" )
   (copyfiles
      (prompt "\n\nCopying the DiscChanger utility to the AsimTunes: "
              "directory.\n" )
      (source "AsimCDFSInst:DiscChanger")
      (dest "AsimTunes:")
      (infos)
      (help "\n\nThis will copy over the DiscChanger utility "
            "program to your AsimTunes: directory\n\nIf you do not "
            "wish the DiscChanger program to be transferred to your system, "
            "skip this step.\n" )
      (confirm)
   )
   
   (tooltype
      (dest "AsimTunes:DiscChanger" )
      (settooltype "CDROM" #CDDevice )
      (noposition)
   )
))





(complete 80 )

(set #instPrefs
   (askbool
      (prompt "\n\nShould the AsimCDFS_Prefs utility be installed?")
      (help "\n\nThis will copy over the AsimCDFS_Prefs utility "
            "to your AsimTunes: directory\n\nIf you do not "
            "wish the AsimCDFS_Prefs program to be transferred to your system, "
            "skip this step.\n" )
      (default 1)
   )
)

(complete 85 )
(if #instPrefs
   ((protect "AsimTunes:AsimCDFS_Prefs" "rwed" )
   (copyfiles
      (prompt "\n\nCopying the AsimCDFS_Prefs utility to the AsimTunes: "
              "directory.\n" )
      (source "AsimCDFSInst:AsimCDFS_Prefs")
      (dest "AsimTunes:")
      (infos)
      (help "\n\nThis will copy over the AsimCDFS_Prefs utility "
            "program to your AsimTunes: directory\n\nIf you do not "
            "wish the AsimCDFS_Prefs program to be transferred to your system, "
            "skip this step.\n" )
      (confirm)
   )
))




(complete 80 )

(set #instPhoto
   (askbool
      (prompt "\n\nShould the AsimPhoto utility be installed?")
      (help "\n\nThis will copy over the AsimPhoto utility "
            "to your AsimTunes: directory\n\nIf you do not "
            "wish the AsimPhoto program to be transferred to your system, "
            "skip this step.\n" )
      (default 1)
   )
)

(complete 85 )
(if #instPhoto
   ((protect "AsimTunes:AsimPhoto" "rwed" )
   (copyfiles
      (prompt "\n\nCopying the AsimPhoto utility to the AsimTunes: "
              "directory.\n" )
      (source "AsimCDFSInst:AsimPhoto")
      (dest "AsimTunes:")
      (infos)
      (help "\n\nThis will copy over the AsimPhoto utility "
            "program to your AsimTunes: directory\n\nIf you do not "
            "wish the AsimPhoto program to be transferred to your system, "
            "skip this step.\n" )
      (confirm)
   )

))





(makedir "ENVARC:AsimCDFS"
   (prompt "Making the ENVARC:AsimCDFS directory, in which various default files will be placed.")
   (help "This will create a directory in your ENVARC: directory")
   )


(makedir "ENV:AsimCDFS"
   (prompt "Making the ENV:AsimCDFS directory, in which various default files will be placed.")
   (help "This will create a directory in your ENV: directory")
   )


(copyfiles
   (prompt "\n\nCopying default icons to the ENVARC:AsimCDFS "
           "directory.\n" )
   (source "AsimCDFSInst:ENVArc/AsimCDFS")
   (dest "ENVArc:AsimCDFS")
   (infos)
   (all)
   (help "\n\nThis will copy over default icon files to the ENVArc:AsimCDFS directory.")
   (confirm)
)


(complete 100 )

(makeassign "AsimCDFSInst")
