home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Patch / Programs / UPDIDFX2.LHA / UpdateIDEfix / EB / COMMON / Install next >
Encoding:
Text File  |  1995-11-19  |  28.7 KB  |  1,057 lines

  1. ;$VER: IDEfix Install 46.3 (03.11.95)
  2. ;Copyright ©1993/1994/1995 Elaborate Bytes, Oliver Kastl
  3.  
  4. ( set #ControlDefault 1 )
  5.  
  6. (onerror
  7.     (makeassign "CacheCDFSInst" (safe))
  8.     (makeassign "CacheCDFS" (safe))
  9. )
  10.  
  11. (set #autoMount 1)
  12. (set #CDDevice_NC "CD0" )
  13. (set #instEjectCD 1)
  14. (set #ReplaceOld 1 )
  15. (set #DeleteOld 1 )
  16.  
  17. (set #wbversion (getversion "libs:version.library"))
  18. (set #wbversion (/ #wbversion 65536) )
  19.  
  20. (complete 0)
  21.  
  22. (if (< #wbversion 37)
  23.     (abort "\n\nAmigaDOS 2.04 or higher is required for CacheCDFS! "
  24.              "\n\nAn upgrade will be needed for your Amiga." )
  25. )
  26.  
  27.  
  28. (if (< (getdiskspace "SYS:") 61440)
  29.     (abort "\n\nApproximately 60K of disk space is needed on your SYS: volume."
  30.              "\n\nYou only have " (/ (getdiskspace "SYS:") 1024)    "K free.\n\n"
  31.              "Delete or transfer some files from the SYS: volume and try again." )
  32. )
  33.  
  34. (makeassign "CacheCDFSInst" "" ( safe) )
  35.  
  36.  
  37. (set #theirlevel @user-level )
  38.  
  39. (set #Match ( run "CacheCDFSInst:CheckIDEfix" ( safe ) ) )
  40.  
  41. (user 2)
  42.  
  43. (if ( run "run <NIL: >NIL: CacheCDFSInst:C/Register CacheCDFSInst:C/IDEfix 80 0 IDE-fix" ( safe ) )
  44.     (
  45.     (abort)
  46.     )
  47. )
  48.  
  49. (message "\nWelcome to IDE-fix, CacheCDFS2, CD32-Emulator and PlayCD!"
  50.             "\n\nThis package is the complete solution for all your IDE and CD-ROM problems! " 
  51.          "\n\n"
  52.          "IDEfix allows you to use 4 harddisks and SyQuest drives with your IDE port, "
  53.          "ATAPI controls IDE CD-Roms, "
  54.          "CacheCDFS, PlayCD and CD32-Emulator power any IDE or SCSI-II CD-Rom!"
  55.          "\n\nEnjoy it! " )
  56.  
  57.  
  58. (set #DefaultDir (tackon @default-dest "IDEfix"))
  59.  
  60. (set #CDFSDir
  61.     (askdir
  62.         (prompt "\n\nSpecify the directory in which the support programs will be placed:" )
  63.         (help "\n\nIDE-fix and CacheCDFS contain a number of support programs. "
  64.         "This directory will specifiy where the programs will be placed. "
  65.         "If you need, create a separate directory for the files.")
  66.         (default #DefaultDir)
  67.         (newpath)
  68.     )
  69. )
  70.  
  71. (user #theirlevel)
  72.  
  73. (if (NOT (exists #CDFSDir ))
  74.     (
  75.     (makedir #CDFSDir
  76.         (safe)
  77.         (infos)
  78.     )
  79.     )
  80. )
  81.  
  82.  
  83. (set @default-dest #CDFSDir)
  84.  
  85.  
  86. (makeassign "CacheCDFS" #CDFSDir (safe))
  87.  
  88. (if (= #Match 0)
  89.     (
  90.     (copylib
  91.         (prompt "This will copy the IDEfix program to your C: directory.")
  92.         (help "This will copy the IDEfix program to your C: directory.")
  93.         (source "CacheCDFSInst:C/IDEfix")
  94.         (confirm)
  95.         (dest "C:")
  96.     )
  97.     (copylib
  98.         (prompt "This will copy the LoadIDE program to your C: directory.")
  99.         (help "This will copy the LoadIDE program to your C: directory.")
  100.         (source "CacheCDFSInst:C/LoadIDE")
  101.         (confirm)
  102.         (dest "C:")
  103.     )
  104.  
  105.     (copylib
  106.         (prompt "This will copy the MountIDE program to your C: directory.")
  107.         (help "This will copy the MountIDE program to your C: directory.")
  108.         (source "CacheCDFSInst:C/MountIDE")
  109.         (confirm)
  110.         (dest "C:")
  111.     )
  112.  
  113.     (copylib
  114.         (prompt "This will copy the Ship program to your C: directory.")
  115.         (help "This will copy the Ship program to your C: directory.")
  116.         (source "CacheCDFSInst:C/Ship")
  117.         (confirm)
  118.         (dest "C:")
  119.     )
  120.  
  121.     (copylib
  122.         (prompt "This will copy the AutoPark program to your C: directory.")
  123.         (help "This will copy the AutoPark program to your C: directory.")
  124.         (source "CacheCDFSInst:C/AutoPark")
  125.         (confirm)
  126.         (dest "C:")
  127.     )
  128.  
  129.  
  130.     (copyfiles
  131.         (prompt "This will copy Icons for the Ship, Autopark and MountIDE programs "
  132.             "to your Harddisk. You can copy these Icons wherever you like, e.g. in your "
  133.             "SYS:WBStartUp drawer.")
  134.         (help "This will copy Icons for the Ship, Autopark and MountIDE programs "
  135.             "to your Harddisk. You can copy these Icons wherever you like, e.g. in your "
  136.             "SYS:WBStartUp drawer.")
  137.         (source "CacheCDFSInst:Harddisk")
  138.         (infos)
  139.         (all)
  140.         (confirm)
  141.         (dest "CacheCDFS:Harddisk")
  142.     )
  143.     
  144.  
  145.     (user 2)
  146.  
  147.     (message "IDEfix, LoadIDE, MountIDE, AutoPark and Ship are installed in your C: "
  148.              "directory. You must start IDEfix manually, as this program "
  149.              "will NOT alter your startup-sequence! "
  150.              "\n\nEnter \"IDEfix\" or \"LoadIDE reset\" behind SetPatch in your startup-sequence "
  151.              "to use IDEfix! "
  152.              "\n\nUse \"Ship <unit>\" from the CLI to park your harddisk!"
  153.              "\nUse \"MountIDE force\" from the CLI to mount additional SyQuest cartridges!"
  154.              "\n\nClick PROCEED to install CacheCDFS and/or ATAPI. Click ABORT to quit.")
  155.  
  156.     )
  157. )
  158.  
  159. (user 2)
  160.  
  161. (message "\n\nNow the FindCD program will be launched to find "
  162.          "the Device and Unit of your CD-Rom..."
  163.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  164.          "\n\nChoose the device and unit and click \"USE\"!"
  165.          "\n\nIf FindCD hangs: Reboot, start the installation again and "
  166.          "click CANCEL within FindCD!")
  167.  
  168. (working "\n\nLaunching the FindCD program to find "
  169.          "the Device and Unit of your CD-Rom..."
  170.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  171.          "\n\nChoose the device and unit and click \"USE\"!"
  172.          "\n\nIf FindCD hangs: Reboot, start the installation again and "
  173.          "click CANCEL within FindCD!")
  174.  
  175. (set #Product ( run "CacheCDFSInst:FindCD PATH=CacheCDFSInst:Devs add" ( safe ) ) )
  176.  
  177.  
  178. (if ( NOT (= #Product 0) )
  179.     (
  180.     (set #CDROM_Device
  181.         (askstring
  182.             (prompt "\n\nWhat is the name for the exec device driver? " )
  183.             (default "scsi.device" )
  184.             (help "\n\nThis is the name of the device driver to use. "
  185.                     "The name is different for different configurations. "
  186.                     "\n\nConsult the manual of your SCSI/CD-Rom host adapter "
  187.                     "if you don't know the name!" )
  188.         )
  189.     )
  190.  
  191.     (set #CDROM_Unit
  192.         (asknumber
  193.             (prompt "\n\nWhat is the Unit number of your CD-Rom drive?" )
  194.             (default 5 )
  195.             (help "\n\nThis is the unit # of the CD-Rom drive.  This is usually a "
  196.                     "numerical value between 0 and 7." )
  197.         )
  198.     )
  199.     )
  200. )
  201.  
  202. (if (= #Product 0 )
  203.     (
  204.     ( set #CDROM_Device (getenv "CDROM_Device" ))
  205.     ( set #CDROM_Unit (+ (getenv "CDROM_Unit" )))
  206.     )
  207. )
  208.  
  209. ( set #SourcePath (tackon "CacheCDFSInst:devs" #CDROM_Device))
  210.  
  211. (user #theirlevel)
  212.  
  213. (if (exists #SourcePath )
  214.     (
  215.     (copylib
  216.         (prompt "This will copy the " #CDROM_Device " to your DEVS: directory.")
  217.         (help "This will copy the " #CDROM_Device " to your DEVS: directory.")
  218.         (source #SourcePath)
  219.         (confirm)
  220.         (dest "DEVS:")
  221.     )
  222.     )
  223. )
  224.  
  225.  
  226. (set #DevFlags 0)
  227.  
  228. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(tandemat#?|#?atapi#?)" ( safe ) ) )
  229.  
  230. (if (= #Match 0)
  231.     (
  232.     (copylib
  233.         (prompt "This will copy the SetAtapiSpeed program to your C: directory.")
  234.         (help "This will copy the SetAtapiSpeed program to your C: directory.")
  235.         (source "CacheCDFSInst:C/SetAtapiSpeed")
  236.         (confirm)
  237.         (dest "C:")
  238.     )
  239.     (set #DevFlags 1)
  240.     )
  241. )
  242.  
  243. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(tandem#?|#?atapi#?|oktagon#?)" ( safe ) ) )
  244.  
  245. (if (= #Match 0)
  246.     ((set #ControlDefault 2))
  247. )
  248.  
  249. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(scsi.#?|???.scsi.#?)" ( safe ) ) )
  250.  
  251. (if (= #Match 0)
  252.     ((set #ControlDefault 5))
  253. )
  254.  
  255. (if (= #CDROM_Device "gvpscsi.device")
  256.     ((set #ControlDefault 8))
  257. )
  258.  
  259.  
  260. (complete 20 )
  261.  
  262. (user 2)
  263.  
  264. (set #ControlMask 
  265.     (askoptions
  266.         (prompt "FileSystem -> Controller Configuration")
  267.         (choices "Use SCSI Direct" 
  268.                     "Use Diskchange Interrupt"
  269.                     "Use 24 Bit-DMA"
  270.                     "Use Motor off" )
  271.         (help    "Here You may define the behaviour of the CacheCDFS accessing the " 
  272.               #CDROM_Device ". If you are "
  273.                 "not sure what option is correct, leave the default settings as they "
  274.                 "are. They should work in most cases.\n"
  275.                 "These options may later be altered using the CDFSprefs program. "
  276.                 "However, wrong settings may lead to crashes if you mount the "
  277.                 "FileSystem!\n"
  278.                 "IF YOU HAVE A TANDEMCD / CD1200: YOU MUST DISABLE \"USE SCSI DIRECT\"!\n\n"
  279.  
  280.                 "\"Use SCSI Direct\"\n"
  281.                 "Choose this option if the SCSI controller using "
  282.                 #CDROM_Device " cannot handle DoIO reads with 2048 bytes sectorsize "
  283.                 "correctly (e.g. ALFII, controllers from Progressive Peripherals, Emplant).\n"
  284.                 "Do NOT choose this option if your controller is a modern, well designed "
  285.                 "SCSI controller (ALFIII, Oktagon, A2091, A3000, A4091) or if it is "
  286.                 "NO SCSI controller at all (TandemCD)!\n\n"
  287.  
  288.                 "\"Use Diskchange Interrupt\"\n"
  289.                 "Choose this option if the controller using "
  290.                 #CDROM_Device " does properly handle TD_ADDCHANGEINT and TD_REMCHANGEINT. "
  291.                 "All modern controllers should do this (ALFIII, Oktagon, TandemCD, "
  292.                 "GVP Series-II)\n"
  293.                 "Do NOT choose this option if your controller has problems with diskchange "
  294.                 "Interrupts (old ROM versions of A2091, A3000, A4091, controllers from "
  295.                 "Progressive Peripherals, Emplant)\n\n"
  296.  
  297.                 "\"Use 24 Bit-DMA\"\n"
  298.                 "Choose this option if the SCSI or CD controller using "
  299.                 #CDROM_Device " is a 24-Bit (Zorro II) DMA device "
  300.                 "(e.g. A2091 from Commodore).\n"
  301.                 "Do NOT choose this option if your controller is a 32-Bit "
  302.                 "(Zorro III) device (e.g. FastLane, A3000, A4091), or a non-DMA controller "
  303.                 "like the majority of controllers (e.g. ALFII/III, Oktagon, "
  304.                 "TandemCD, Golem, IVS TrumpCard, Supra) as it will lead to "
  305.                 "decreased performance!\n\n"
  306.  
  307.                 "\"Use Motor off\"\n"
  308.                 "Choose this option if the SCSI controller using "
  309.                 #CDROM_Device " is a GVP controller with \"Faaast\" roms.\n"
  310.                 "Do NOT choose this option if your controller is anything else."
  311.             )
  312.         (default #ControlDefault)
  313.     )
  314. )
  315.  
  316. (set #BufMemType  "1 /* MEMF_PUBLIC */\n" )
  317. (set #BufMemInt  1 )
  318.  
  319. (if (IN #ControlMask 2)
  320.     (
  321.     (set #BufMemType  "513 /* MEMF_PUBLIC|MEMF_24BITDMA */\n")
  322.     (set #BufMemInt  513 )
  323.     )
  324. )
  325.  
  326. (set #Control "\"MD=0 LC=1 DC=8 L LV AL LFC=1")
  327.  
  328.  
  329. (if (IN #ControlMask 0)
  330.     (
  331.     (set #Control (cat #Control " S"))
  332.     )
  333. )
  334.  
  335. (if (NOT (IN #ControlMask 1))
  336.     (
  337.     (set #Control (cat #Control " NC"))
  338.     )
  339. )
  340.  
  341. (if (IN #ControlMask 3)
  342.     (
  343.     (set #Control (cat #Control " M"))
  344.     )
  345. )
  346.  
  347.  
  348. (set #Control (cat #Control "\"\n"))
  349.  
  350.  
  351. (set #autoMount
  352.     (askbool
  353.         (prompt "\n\nWould you like the CD-Rom drive automatically mounted upon bootup?\n\n"
  354.                 "NOTE: If you are unsure if your controller will work correctly with "
  355.                 "the controller settings, you should select \"NO\"!" )
  356.         (help "\n\nIf you would like, the appropriate commands will be added to your user-startup file to automatically mount CacheCDFS.")
  357.         (default 1)
  358.     )
  359. )
  360.  
  361.  
  362. (if #autoMount
  363.     (set #mountDirectory "DEVS:DOSDrivers")
  364. )
  365.  
  366. (if (not #autoMount)
  367.     (set #mountDirectory "SYS:Storage/DOSDrivers")
  368. )
  369.  
  370. (set #CDDevice_NC
  371.     (askstring
  372.         (prompt "\n\nWhat is the name for the AmigaDOS device?\n\n"
  373.         "(The trailing colon MUST NOT be present)" 
  374.         )
  375.         (default #CDDevice_NC )
  376.         (help "\n\nThis is the name under which AmigaDOS will reference the "
  377.                 "CD-Rom as.  While usually "
  378.                 #CDDevice_NC
  379.                 ", it can be any name you choose. "
  380.                 "\n\nThe trailing : (colon) MUST NOT be present." )
  381.     )
  382. )
  383.  
  384.  
  385. (set #CDDevice (cat #CDDevice_NC ":") )
  386.  
  387.  
  388. (user #theirlevel)
  389.  
  390. (if (exists "CacheCDFSInst:C/Mount")
  391.     (
  392.     (copylib
  393.         (source "CacheCDFSInst:C/Mount")
  394.         (dest "C:")
  395.     ))
  396. )
  397.  
  398. (protect "l:CacheCDFS" "rwed" )
  399. (copylib
  400.     (prompt "\n\nCopying CDROM FileSystem to the l: directory.\n" )
  401.     (source "CacheCDFSInst:l/CacheCDFS")
  402.     (dest "l:")
  403.     (confirm)
  404.     (help "\n\nThis will copy over the CDROM FileSystem program to your "
  405.         "l: directory\n\nThis is an essential step in the installation "
  406.         "process." )
  407. )
  408.  
  409.  
  410. (if (exists "L:TandemCacheCDFS" )
  411.     (
  412.     ((set #DeleteOld
  413.         (askbool
  414.         (prompt "\n\n\"L:TandemCacheCDFS\" is present from an earlier installation."
  415.                 "\n\nDelete \"L:TandemCacheCDFS\" ?" )
  416.         (help "\n\nClick \"YES\" if \"L:TandemCacheCDFS\" should be "
  417.               "deleted and \"NO\" if not!")
  418.         (default 1)
  419.         )
  420.     ))
  421.  
  422.     (if #DeleteOld
  423.     ((protect "L:TandemCacheCDFS" "rwed" )
  424.     (delete "L:TandemCacheCDFS" )
  425.     ))
  426. ))
  427.  
  428. (if (exists "L:DemoCacheCDFS" )
  429.     (
  430.     ((set #DeleteOld
  431.         (askbool
  432.         (prompt "\n\n\"L:DemoCacheCDFS\" is present from an earlier installation."
  433.                 "\n\nDelete \"L:DemoCacheCDFS\" ?" )
  434.         (help "\n\nClick \"YES\" if \"L:DemoCacheCDFS\" should be "
  435.               "deleted and \"NO\" if not!")
  436.         (default 1)
  437.         )
  438.     ))
  439.  
  440.     (if #DeleteOld
  441.     ((protect "L:DemoCacheCDFS" "rwed" )
  442.     (delete "L:DemoCacheCDFS" )
  443.     ))
  444. ))
  445.  
  446. (complete 30 )
  447.  
  448.  
  449. (if (< #wbversion 38)
  450.     ((set #startupCommand (cat "mount " #CDDevice " from devs:MountList." #CDDevice_NC "\n") )
  451.     (if #autoMount
  452.         ((protect "S:User-Sequence" "srwed" )
  453.  
  454.         (startup "CacheCDFS"
  455.             (command #startupCommand )
  456.             (prompt "\n\nInserting MOUNT command into the startup-sequence")
  457.             (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" is being inserted into your "
  458.                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
  459.                     "automatically start CacheCDFS upon bootup." )
  460.         ))
  461.     )
  462.     (if (not #autoMount)
  463.         ((protect "S:User-Sequence" "srwed" )
  464.  
  465.         (startup "CacheCDFS"
  466.             (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  467.             (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  468.                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file because you didn't "
  469.                     "want to automatically start CacheCDFS upon bootup." )
  470.         ))
  471.     )
  472.  
  473.     (if (exists (cat "devs:MountList." #CDDevice_NC ) )
  474.         ((set #ReplaceOld
  475.             (askbool
  476.             (prompt "\n\nDEVS:MountList." #CDDevice_NC" already exists!\n\n"
  477.                     "Do you want to replace it?" )
  478.             (help "\n\nClick \"YES\" if DEVS:MountList."#CDDevice_NC" should be "
  479.                   "replaced and \"NO\" if not!")
  480.             (default 1)
  481.             )
  482.         ))
  483.     )
  484.  
  485.     (if #ReplaceOld
  486.  
  487.     ((protect (cat "devs:MountList." #CDDevice_NC) "rwed" )
  488.  
  489.     (textfile
  490.         (dest (cat "devs:MountList." #CDDevice_NC) )
  491.         (append "/***************************************************************/\n"
  492.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  493.                   "/***************************************************************/\n")
  494.         (append #CDDevice "\n")
  495.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  496.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  497.         (append "    Unit           = "#CDROM_Unit" /* exec device unit */\n" )
  498.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  499.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  500.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  501.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  502.         (append "    MaxTransfer    = 0x100000 /* Maximum amount of bytes for direct read */\n")
  503.         (append "    Reserved       = 0 /* Unused */\n")
  504.         (append "    Interleave     = 0 /* Unused */\n")
  505.         (append "    LowCyl         = 0 /* Unused */\n")
  506.         (append "    HighCyl        = 0 /* Unused */\n")
  507.         (append "    Surfaces       = 1 /* Unused */\n")
  508.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  509.         (append "    BufMemType     = " #BufMemType )
  510.         (append "    GlobVec        = -1 /* Do not change! */\n")
  511.         (append "    Mount          = 1 /* Mount it immediately */\n")
  512.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  513.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  514.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  515.         (append "    Control        = "#Control)
  516.         (append "   /* The Control field is for special adjustments */\n")
  517.         (append "   /* L/S convert all file names to lowercase */\n")
  518.         (append "   /* LV/S convert volume names to lowercase */\n")
  519.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  520.         (append "   /* LFC/N start converting at this character */\n")
  521.         (append "   /* LC/N/A number of blocks per cache line */\n")
  522.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  523.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  524.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  525.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  526.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  527.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  528.         (append "#\n")
  529.     )
  530.     (protect (cat "devs:MountList." #CDDevice_NC) "-e" )
  531.     )
  532.     )
  533. ))
  534.  
  535.  
  536.  
  537. (if (> #wbversion 37)
  538.     (
  539.     (if (exists "CacheCDFSInst:C/SetPatch")
  540.         (
  541.         (copylib
  542.                 (source "CacheCDFSInst:C/SetPatch")
  543.                 (dest "C:")
  544.         ))
  545.     )
  546.  
  547.     (if (exists (tackon #mountDirectory #CDDevice_NC ) )
  548.         ((set #ReplaceOld
  549.             (askbool
  550.             (prompt "\n\n" (tackon #mountDirectory #CDDevice_NC) " already exists!\n\n"
  551.                     "Do you want to replace it?" )
  552.             (help "\n\nClick \"YES\" if " (tackon #mountDirectory #CDDevice_NC) " should be "
  553.                   "replaced and \"NO\" if not!")
  554.             (default 1)
  555.             )
  556.         ))
  557.     )
  558.  
  559.     (if #ReplaceOld
  560.  
  561.     ((protect (tackon #mountDirectory #CDDevice_NC) "rwed" )
  562.  
  563.     (textfile
  564.         (dest (tackon #mountDirectory #CDDevice_NC) )
  565.         (append "/***************************************************************/\n"
  566.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  567.                   "/***************************************************************/\n")
  568.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  569.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  570.         (append "    Unit           = "#CDROM_Unit" /* exec device unit */\n" )
  571.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  572.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  573.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  574.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  575.         (append "    MaxTransfer    = 0x100000 /* Maximum amount of bytes for direct read */\n")
  576.         (append "    Reserved       = 0 /* Unused */\n")
  577.         (append "    Interleave     = 0 /* Unused */\n")
  578.         (append "    LowCyl         = 0 /* Unused */\n")
  579.         (append "    HighCyl        = 0 /* Unused */\n")
  580.         (append "    Surfaces       = 1 /* Unused */\n")
  581.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  582.         (append "    BufMemType     = " #BufMemType )
  583.         (append "    GlobVec        = -1 /* Do not change! */\n")
  584.         (append "    Mount          = 1 /* Mount it immediately */\n")
  585.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  586.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  587.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  588.         (append "    Control        = "#Control)
  589.         (append "   /* The Control field is for special adjustments */\n")
  590.         (append "   /* L/S convert all file/volume names to lowercase */\n")
  591.         (append "   /* LV/S convert volume names to lowercase */\n")
  592.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  593.         (append "   /* LFC/N start converting at this character */\n")
  594.         (append "   /* LC/N/A number of blocks per cache line */\n")
  595.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  596.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  597.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  598.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  599.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  600.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  601.     )
  602.  
  603.     (protect (tackon #mountDirectory #CDDevice_NC) "-e" )
  604.  
  605.     (copyfiles
  606.             (prompt "\n\nCopying Mountlist icon")
  607.             (source "CacheCDFSInst:Devs/DOSDrivers/CD0.info")
  608.             (dest #mountDirectory)
  609.             (newname (cat #CDDevice_NC ".info"))
  610.             (help "\n\nThis will copy over an icon for the mountlist file.")
  611.             (confirm)
  612.  
  613.     ))
  614.     )
  615.  
  616.     (protect "S:User-Sequence" "srwed" )
  617.     (startup "CacheCDFS"
  618.         (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  619.         (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  620.                 "\"S:Startup-Sequence\" or \"S:User-Startup\" file if it is present from "
  621.                 "an earlier installation." )
  622.         )
  623.  
  624.     (if ( exists ( cat "devs:MountList." #CDDevice_NC ) )
  625.  
  626.         ((protect (cat "devs:MountList." #CDDevice_NC) "rwed " )
  627.         (delete (cat "devs:MountList." #CDDevice_NC)
  628.             (prompt "\n\nDeleting file \"DEVS:MOUNTLIST." #CDDevice_NC "\"" )
  629.             (help "\n\nThe file \"DEVS:MOUNTLIST." #CDDevice_NC "\" will be deleted "
  630.                     "if it is present from an earlier installation." )
  631.             (confirm)
  632.             )
  633.         ))
  634.     )
  635. )
  636.  
  637.  
  638. (complete 40 )
  639.  
  640. (set #instCDFSprefs
  641.     (askbool
  642.         (prompt "\n\nShould the CDFSprefs utility be installed?")
  643.         (help "\n\nThis will copy over the CDFSprefs utility "
  644.                 "to your SYS:Prefs directory\n\nIf you do not "
  645.                 "wish the CDFSprefs program to be transferred to your system, "
  646.                 "skip this step.\n" )
  647.         (default 1)
  648.     )
  649. )
  650.  
  651. (if #instCDFSprefs
  652.     ((protect "CacheCDFS:CDFSprefs" "rwed" )
  653.     (protect "CacheCDFS:CDFSprefs.info" "rwed" )
  654.     (copylib
  655.         (prompt "\n\nCopying the CDFSprefs program to the "
  656.                   "SYS:Prefs directory." )
  657.         (source "CacheCDFSInst:CDFSprefs")
  658.         (dest "SYS:Prefs")
  659.         (infos)
  660.         (help "\n\nThis will copy over the CDFSprefs "
  661.                 "program to your SYS:Prefs directory\n\nIf you do not "
  662.                 "wish the CDFSprefs program to be transferred to your system, "
  663.                 "skip this step." )
  664.         (confirm)
  665.     )
  666.  
  667.     (tooltype
  668.         (dest "SYS:Prefs/CDFSprefs" )
  669.         (noposition)
  670.     )
  671. ))
  672.  
  673. (complete 60 )
  674.  
  675. (set #instKillDev
  676.     (askbool
  677.         (prompt "\n\nShould the KillDev utility be installed?")
  678.         (help "\n\nThis will copy over the KillDev utility "
  679.                 "to your CacheCDFS directory\n\nIf you do not "
  680.                 "wish the KillDev program to be transferred to your system, "
  681.                 "skip this step." )
  682.         (default 1)
  683.     )
  684. )
  685.  
  686. (if #instKillDev
  687.     ((protect "CacheCDFS:KillDev" "rwed" )
  688.     (protect "CacheCDFS:KillDev.info" "rwed" )
  689.     (copylib
  690.         (prompt "\n\nCopying the KillDev program to the "
  691.                   "CacheCDFS: directory.\n" )
  692.         (source "CacheCDFSInst:KillDev")
  693.         (dest "CacheCDFS:")
  694.         (infos)
  695.         (help "\n\nThis will copy over the KillDev "
  696.                 "program to your CacheCDFS: directory\n\nIf you do not "
  697.                 "wish the KillDev program to be transferred to your system, "
  698.                 "skip this step." )
  699.         (confirm)
  700.     )
  701.  
  702.     (tooltype
  703.         (dest "CacheCDFS:KillDev" )
  704.         (settooltype "DOSDEV" #CDDevice )
  705.         (noposition)
  706.     )
  707. ))
  708.  
  709. (set #instFindCD
  710.     (askbool
  711.         (prompt "\n\nShould the FindCD utility be installed?")
  712.         (help "\n\nThis will copy over the FindCD utility "
  713.                 "to your CacheCDFS directory\n\nIf you do not "
  714.                 "wish the FindCD program to be transferred to your system, "
  715.                 "skip this step." )
  716.         (default 1)
  717.     )
  718. )
  719.  
  720. (if #instFindCD
  721.     ((protect "CacheCDFS:FindCD" "rwed" )
  722.     (protect "CacheCDFS:FindCD.info" "rwed" )
  723.     (copylib
  724.         (prompt "\n\nCopying the FindCD program to the "
  725.                   "CacheCDFS: directory.\n" )
  726.         (source "CacheCDFSInst:FindCD")
  727.         (dest "CacheCDFS:")
  728.         (infos)
  729.         (help "\n\nThis will copy over the FindCD "
  730.                 "program to your CacheCDFS: directory\n\nIf you do not "
  731.                 "wish the FindCD program to be transferred to your system, "
  732.                 "skip this step." )
  733.         (confirm)
  734.     )
  735.  
  736.     (tooltype
  737.         (dest "CacheCDFS:FindCD" )
  738.         (noposition)
  739.     )
  740.  
  741. ))
  742.  
  743. (complete 70 )
  744.  
  745.  
  746. (if #instEjectCD
  747.     (
  748.     (set #instEjectCD
  749.     (askbool
  750.         (prompt "\n\nShould the EjectCD utility be installed?")
  751.         (help "\n\nThis will copy over the EjectCD utility "
  752.                 "to your CDFS directory\n\nIf you do not "
  753.                 "wish the EjectCD program to be transferred to your system, "
  754.                 "skip this step.\n" )
  755.         (default 1)
  756.     )
  757.     ))
  758. )
  759.  
  760. (if #instEjectCD
  761.     ((protect "CacheCDFS:EjectCD" "rwed" )
  762.     (protect "CacheCDFS:EjectCD.info" "rwed" )
  763.     (copylib
  764.         (prompt "\n\nCopying EjectCD program to the "
  765.                   "CacheCDFS: directory.\n" )
  766.         (source "CacheCDFSInst:EjectCD")
  767.         (dest "CacheCDFS:")
  768.         (help "\n\nThis will copy over the EjectCD utility "
  769.                 "to your CacheCDFS directory\n\nIf you do not "
  770.                 "wish the EjectCD program to be transferred to your system, "
  771.                 "skip this step.\n" )
  772.         (infos)
  773.         (confirm)
  774.     )
  775.  
  776.     (tooltype
  777.         (dest "CacheCDFS:EjectCD" )
  778.         (settooltype "DEVICE" #CDROM_Device )
  779.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  780.         (noposition)
  781.     )
  782. ))
  783.  
  784. (set #instPlayCD 0)
  785.  
  786. (if (exists "CacheCDFSInst:PlayCD.lha")
  787.  
  788. ((set #instPlayCD
  789.     (askbool
  790.         (prompt "\n\nShould the PlayCD Audio Player be installed?")
  791.         (help "\n\nThis will copy over the PlayCD drawer "
  792.                 "to your CacheCDFS directory\n\nIf you do not "
  793.                 "wish the PlayCD drawer to be transferred to your system, "
  794.                 "skip this step." )
  795.         (default 1)
  796.     )
  797. )))
  798.  
  799. (if #instPlayCD
  800.     (
  801.  
  802.     (working "\n\nDecrunching PlayCD...."
  803.              "\n\nPlease Wait!")
  804.  
  805.     ( if (NOT @pretend )
  806.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:PlayCD.lha" )
  807.         (
  808.         (abort "\n\nUnable to decrunch PlayCD!")
  809.         )
  810.     )))
  811.  
  812.  
  813.     (tooltype
  814.         (dest "CacheCDFS:PlayCD/PlayCD" )
  815.         (settooltype "DEVICE" #CDROM_Device )
  816.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  817.         (settooltype "BUFMEMTYPE" ("%ld" #BufMemInt ))
  818.     )
  819.     )
  820. )
  821.  
  822. (complete 80 )
  823.  
  824. (set #instJukebox 0)
  825.  
  826. (if (exists "CacheCDFSInst:JukeBox.lha")
  827. ((set #instJukebox
  828.     (askbool
  829.         (prompt "\n\nShould the JukeBox Audio Player be installed?")
  830.         (help "\n\nThis will copy over the JukeBox drawer "
  831.                 "to your CacheCDFS directory\n\nIf you do not "
  832.                 "wish the JukeBox drawer to be transferred to your system, "
  833.                 "skip this step." )
  834.         (default 1)
  835.     )
  836. )))
  837.  
  838. (if #instJukebox
  839.     (
  840.     (protect "CacheCDFS:JukeBox" "rwed" )
  841.     (protect "CacheCDFS:JukeBox.info" "rwed" )
  842.     (makedir "CacheCDFS:JukeBox" 
  843.         (infos)
  844.         (prompt "\n\nCreating drawer for JukeBox\n")
  845.         (help "\n\nThis will create a drawer for the JukeBox "
  846.                 "Audio Player." )
  847.     )
  848.  
  849.  
  850. (working "\n\nDecrunching Jukebox...."
  851.          "\n\nPlease Wait!")
  852.  
  853.     ( if (NOT @pretend )
  854.     (( if ( run "CacheCDFSInst:c/lhex -qafFw=CacheCDFS:Jukebox e CacheCDFSInst:JukeBox.lha" )
  855.         (
  856.         (makeassign "JukeBox")
  857.         (abort "\n\nUnable to decrunch JukeBox!")
  858.         )
  859.     )))
  860.  
  861.  
  862.     (tooltype
  863.         (dest "CacheCDFS:Jukebox/JukeBox" )
  864.         (settooltype "DEVICE" #CDROM_Device )
  865.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  866.     )
  867.  
  868. ))
  869.  
  870. (set #instYACDP 0)
  871.  
  872. (if (AND (AND (exists "CacheCDFSInst:YACDP.lha") (exists "CacheCDFSInst:LIBS/reqtools.library")) (= #DevFlags 0))
  873. ((set #instYACDP
  874.     (askbool
  875.         (prompt "\n\nShould the YACDP Audio Player be installed?")
  876.         (help "\n\nThis will copy over the YACDP drawer "
  877.                 "to your CacheCDFS directory\n\nIf you do not "
  878.                 "wish the YACDP drawer to be transferred to your system, "
  879.                 "skip this step." )
  880.         (default 1)
  881.     )
  882. )))
  883.  
  884. (if #instYACDP
  885.     (
  886.  
  887.     (protect "LIBS:reqtools.library" "rwed" )
  888.  
  889.     (copylib
  890.     (source "CacheCDFSInst:LIBS/reqtools.library")
  891.     (dest "LIBS:"))
  892.  
  893.     (working "\n\nDecrunching YACDP...."
  894.              "\n\nPlease Wait!")
  895.  
  896.     ( if (NOT @pretend )
  897.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:YACDP.lha" )
  898.         (
  899.         (abort "\n\nUnable to decrunch YACDP!")
  900.         )
  901.     )))
  902.  
  903.  
  904.     (tooltype
  905.         (dest "CacheCDFS:YACDP/YACDP" )
  906.         (settooltype "DEVICE" #CDROM_Device )
  907.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  908.     )
  909.     )
  910. )
  911.  
  912.  
  913. (if (AND (> #wbversion 38) (exists "CacheCDFSInst:CD32.lha"))
  914.  
  915.     ((complete 90 )
  916.  
  917.     (set #instCD32
  918.         (askbool
  919.             (prompt "\n\nShould the CD32-Emulator be installed?"
  920.                     "\n\nNote that the CD32-Emulator is completely useless "
  921.                     "if you don't have an Amiga with AA/AGA chipset and "
  922.                     "at least Kickstart version 3.0!")
  923.             (help "\n\nThis will copy over the CD32 drawer "
  924.                     "to your CacheCDFS directory\n\nIf you do not "
  925.                     "wish the CD32 drawer to be transferred to your system, "
  926.                     "skip this step.")
  927.             (default 1)
  928.         )
  929.     )
  930.  
  931.     (if #instCD32
  932.         (
  933.         (working "\n\nDecrunching CD32...."
  934.                  "\n\nPlease Wait!")
  935.  
  936.         ( if (NOT @pretend )
  937.         (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:CD32.lha" )
  938.             (
  939.             (abort "\n\nUnable to decrunch CD32!")
  940.             )
  941.         )))
  942.  
  943.     
  944.         (if (exists "CacheCDFSInst:CD32" )
  945.             ((copylib
  946.                 (prompt "This will copy the CD32 program.")
  947.                 (help "This will copy the CD32 program.")
  948.                 (source "CacheCDFSInst:CD32")
  949.                 (infos)
  950.                 (dest "CacheCDFS:CD32")
  951.                 (confirm)
  952.             ))
  953.         )
  954.  
  955.  
  956.         ( set #CDROM_Blocks 2 )
  957.  
  958.         (if (= #CDROM_Device "tandemcd.device")
  959.             (
  960.             ( set #CDROM_Blocks 4 )
  961.             )
  962.         )
  963.  
  964.         (if (= #CDROM_Device "tandemat.device")
  965.             (
  966.             ( set #CDROM_Blocks 4 )
  967.             )
  968.         )
  969.  
  970.         (if (= #CDROM_Device "tandemcd_pcmcia.device")
  971.             (
  972.             ( set #CDROM_Blocks 4 )
  973.             )
  974.         )
  975.  
  976.         (if (= #CDROM_Device "tandemcd_come.device")
  977.             (
  978.             ( set #CDROM_Blocks 4 )
  979.             )
  980.         )
  981.  
  982.         (tooltype
  983.             (dest "CacheCDFS:CD32/CD32" )
  984.             (settooltype "BLOCKS" ("%ld" #CDROM_Blocks ) )
  985.             (settooltype "DOSDEV" #CDDevice_NC)
  986.             )
  987.  
  988.         (set #instInst
  989.             (askbool
  990.             (prompt "\n\nShould the Installer utility be installed?"
  991.                     "\n\nNote that you only need to install the Installer "
  992.                     "utility if you don't have it already installed on "
  993.                     "your harddisk in your actual path!")
  994.             (help "\n\nThis will copy over the Installer utility "
  995.                     "to your CD32 directory\n\nIf you do not "
  996.                     "wish the Installer utility to be transferred to your system, "
  997.                     "skip this step." )
  998.             (default 1)
  999.             )
  1000.         )
  1001.  
  1002.         (if #instInst
  1003.             (
  1004.             (copyfiles
  1005.             (source "CacheCDFSInst:Installer")
  1006.             (dest "CacheCDFS:CD32")
  1007.             )
  1008.         )
  1009.         )
  1010.     ))
  1011. ))
  1012.  
  1013. (complete 100 )
  1014.  
  1015. (set #doMount
  1016.     (askbool
  1017.     (prompt "\n\nMount " #CDDevice " now ?")
  1018.     (help "Select, if " #CDDevice " should be mounted now, or not.")
  1019.     (default 1)
  1020.     )
  1021. )
  1022.  
  1023. (set #MountError 0)
  1024.  
  1025. ( if @pretend ((set #doMount 0))) 
  1026.  
  1027. (if #doMount
  1028.     (
  1029.     (run (cat "CacheCDFSInst:KillDev " #CDDevice " Quiet"))
  1030.     (if (< #wbversion 38)
  1031.         (
  1032.         (set #MountError
  1033.             (run (cat "C:Mount " #CDDevice " from devs:MountList." #CDDevice_NC ))
  1034.         )
  1035.         )
  1036.     )
  1037.  
  1038.     (if (> #wbversion 37)
  1039.         (
  1040.         (set #MountError
  1041.             (run (cat "C:Mount " #CDDevice  ))
  1042.         )
  1043.         )
  1044.     )
  1045.     )
  1046. )
  1047.  
  1048. (if #MountError
  1049.     (
  1050.     (message "\n\nMounting " #CDDevice " failed!")
  1051.     )
  1052. )
  1053.  
  1054. (makeassign "CacheCDFSInst" (safe))
  1055. (makeassign "CacheCDFS" (safe))
  1056.  
  1057.