1 ;$VER: CDVDFS Install 1.2 (06.05.07)
2 ;(C) 1994 Thomas Kessler
3 ;(C) 2005-2007 Pavel Fedin
5 (set #amicdrom-version "1.4")
6 (set #amicdrom-date "(16-Jun-08)")
7 (set #install-version "1.2")
9 (set old-level @user-level)
10 (set @default-dest "SYS:")
12 (set #wbversion (getversion))
13 (set #wbversion (/ #wbversion 65536) )
14 (set #morphos (exists "SYS:MorphOS"))
15 (set #mountvernum (getversion "C:Mount"))
16 (set #mountversion (/ #mountvernum 65536))
23 (set charsetsdir "SYS:Libs/Charsets/")
24 (set docdir "Locale:Help")
29 (if (<= #mountversion 37) (set #space "+"))
31 (if (NOT (exists "C/GetNames")) (abort "Can't find file: 'C/GetNames'"))
36 "C/GetNames DEVICES ENV NOROM SCSI EXCLUDE QUIET" ; © 1994 Thomas Kessler
39 (set dev0 "enter device by hand")
40 (if (exists ("ENV:Name.1")) (set dev1 (getenv "Name.1")))
41 (if (exists ("ENV:Name.2")) (set dev2 (getenv "Name.2")))
42 (if (exists ("ENV:Name.3")) (set dev3 (getenv "Name.3")))
43 (if (exists ("ENV:Name.4")) (set dev4 (getenv "Name.4")))
44 (if (exists ("ENV:Name.5")) (set dev5 (getenv "Name.5")))
45 (if (exists ("ENV:Name.6")) (set dev6 (getenv "Name.6")))
46 (if (exists ("ENV:Name.7")) (set dev7 (getenv "Name.7")))
47 (if (exists ("ENV:Name.8")) (set dev8 (getenv "Name.8")))
48 (if (exists ("ENV:Name.9")) (set dev9 (getenv "Name.9")))
49 (if (exists ("ENV:Name.10")) (set dev10 (getenv "Name.10")))
50 (if (exists ("ENV:Name.11")) (set dev11 (getenv "Name.11")))
51 (if (exists ("ENV:Name.12")) (set dev12 (getenv "Name.12")))
52 (if (exists ("ENV:Name.13")) (set dev13 (getenv "Name.13")))
53 (if (exists ("ENV:Name.14")) (set dev14 (getenv "Name.14")))
54 (if (exists ("ENV:Name.15")) (set dev15 (getenv "Name.15")))
55 (if (exists ("ENV:Name.16")) (set dev16 (getenv "Name.16")))
56 (if (exists ("ENV:Name.17")) (set dev17 (getenv "Name.17")))
57 (if (exists ("ENV:Name.18")) (set dev18 (getenv "Name.18")))
58 (if (exists ("ENV:Name.19")) (set dev19 (getenv "Name.19")))
59 (if (exists ("ENV:Name.20")) (set dev20 (getenv "Name.20")))
60 (if (exists ("ENV:Name.21")) (set dev21 (getenv "Name.21")))
65 "C:Delete >NIL: ENV:Name.#? FORCE"
67 ;(delete (prompt "") (help #na) "ENV:Name.x" (optional force))
72 (message "\n\nCDVDFS "#amicdrom-version"\n\n"
73 "a CDROM filesystem for Amiga family of operating systems\n\n"
74 "Version "#amicdrom-version" "#amicdrom-date" © 2007 Pavel Fedin\n"
75 "Based on AmiCDROM 1.15 © 1993,1994 Frank Munkert\nAll rights reserved.\n"
76 "Install-Script "#install-version" © 1994 Thomas Kessler, 2005-2007 Pavel Fedin\nAll rights reserved.")
88 (prompt "Choose your SCSI/AT device:")
89 (prompt "\nChoose your SCSI/AT device:\n")
92 "The first field (DEVICE) contains the name of your "
95 (if dev1 (choices dev0 dev1))
96 (if dev2 (choices dev0 dev1 dev2))
97 (if dev3 (choices dev0 dev1 dev2 dev3))
98 (if dev4 (choices dev0 dev1 dev2 dev3 dev4))
99 (if dev5 (choices dev0 dev1 dev2 dev3 dev4 dev5))
100 (if dev6 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6))
101 (if dev7 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7))
102 (if dev8 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8))
103 (if dev9 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9))
104 (if dev10 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10))
105 (if dev11 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11))
106 (if dev12 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12))
107 (if dev13 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13))
108 (if dev14 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13 dev14))
109 (if dev15 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13 dev14 dev15))
110 (if dev16 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13 dev14 dev15 dev16))
111 (if dev17 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13 dev14 dev15 dev16 dev17))
112 (if dev18 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13 dev14 dev15 dev16 dev17 dev18))
113 (if dev19 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13 dev14 dev15 dev16 dev17 dev18 dev19))
114 (if dev20 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13 dev14 dev15 dev16 dev17 dev18 dev19 dev20))
115 (if dev21 (choices dev0 dev1 dev2 dev3 dev4 dev5 dev6 dev7 dev8 dev9 dev10 dev11 dev12 dev13 dev14 dev15 dev16 dev17 dev18 dev19 dev20 dev21))
124 (set default-device "ide.device")
125 (set default-device "scsi.device")
130 (if (= 1 ask-device) (set device dev1))
131 (if (= 2 ask-device) (set device dev2))
132 (if (= 3 ask-device) (set device dev3))
133 (if (= 4 ask-device) (set device dev4))
134 (if (= 5 ask-device) (set device dev5))
135 (if (= 6 ask-device) (set device dev6))
136 (if (= 7 ask-device) (set device dev7))
137 (if (= 8 ask-device) (set device dev8))
138 (if (= 9 ask-device) (set device dev9))
139 (if (= 10 ask-device) (set device dev10))
140 (if (= 11 ask-device) (set device dev11))
141 (if (= 12 ask-device) (set device dev12))
142 (if (= 13 ask-device) (set device dev13))
143 (if (= 14 ask-device) (set device dev14))
144 (if (= 15 ask-device) (set device dev15))
145 (if (= 16 ask-device) (set device dev16))
146 (if (= 17 ask-device) (set device dev17))
147 (if (= 18 ask-device) (set device dev18))
148 (if (= 19 ask-device) (set device dev19))
149 (if (= 20 ask-device) (set device dev20))
150 (if (= 21 ask-device) (set device dev21))
156 (prompt "\nEnter the name of your SCSI/AT device:\n")
158 "The first field (DEVICE) contains the name of "
159 "your SCSI/AT device."
161 (default default-device)
172 (prompt "\n\nChoose the unit (ID) of your CDROM drive:\n\n")
174 "The second field (UNIT) contains the target ID (aka \"SCSI-ID\") "
175 "of your CDROM drive. If your CDROM drive supports multiple logical units, "
176 "such as the Pioneer DRM-604X six disk changer drive, then the 10s digit "
177 "of the number in this field should be the LUN of the desired disk."
179 (choices "unit 0" "unit 1" "unit 2" "unit 3" "unit 4" "unit 5" "unit 6" "unit 7")
194 (prompt "\nMemory options:\n")
196 "Some SCSI devices can only read from or write to chip memory. "
197 "(The A3000 scsi.device is able to use fast memory.)\n\n"
198 "\"24 bit DMA memory\" means that only "
199 "memory addresses below 0x01000000 are considered for "
201 "IDE controllers are usually able to use any memory."
204 "use CHIP memory for SCSI buffers"
205 "use FAST memory for SCSI buffers"
206 "use 24 bit DMA memory for SCSI buffers"
207 "use ANY memory available")
208 (default default-mem)
216 (if (= 0 memtype) (set memtype "2"))
217 (if (= 1 memtype) (set memtype "4"))
218 (if (= 2 memtype) (set memtype "32"))
219 (if (= 3 memtype) (set memtype "0"))
227 (prompt "\nOther options:\n")
229 "ROCKRIDGE=R: Use Rock Ridge file names, if possible.\n\n"
230 "JOLIET=J: Use Joliet file names, if possible.\n\n"
231 "SHOWVERSION=SV: Show version numbers.\n\n"
232 "RETRY: Do not report an error if the CDROM drive is switched off while "
233 "mounting the filesystem. The \"C:Mount\" program will hang until "
234 "the CDROM drive is switched on."
237 "use Rock Ridge file names, if possible"
238 "use Joliet file names, if possible"
239 "use trackdisk-device instead of SCSI-direct"
240 "show version numbers"
241 "don't report an error if CDROM is switched off"
250 (if (IN other-options 0) (set startstr (cat startstr #space "ROCKRIDGE")))
251 (if (IN other-options 1) (set startstr (cat startstr #space "JOLIET")))
252 (if (IN other-options 2) (set startstr (cat startstr #space "SHOWVERSION")))
253 (if (IN other-options 3) (set startstr (cat startstr #space "RETRY")))
258 (prompt "\nMap filenames to lower case:\n")
260 "LOWERCASE=L: Map ISO-9660 names to lower case.\n\n"
261 "MAYBELOWERCASE=ML: Do not convert the filenames if the CDROM is a "
262 "CDTV or CD32 disk, or a disk created by Mkisofs. "
263 "Otherwise, map the filenames to lower case.\n\n"
264 "(LOWERCASE and MAYBELOWERCASE are mutually exclusive.)"
267 "map to lower (except CDTV, CD32, Mkisoft)"
268 "map to lower case (always)"
269 "don't map filenames")
276 (if (= 0 case-options) (set startstr (cat startstr #space "MAYBELOWERCASE")))
277 (if (= 1 case-options) (set startstr (cat startstr #space "LOWERCASE")))
278 ;(if (= 2 case-options) (...))
284 "\n\nEnter the number of 2048 byte buffers for\n"
285 "general access to the CDROM drive:\n")
287 "Number of 2048 byte buffers for general access to the "
288 "CDROM drive. Default = 5 buffers"
300 "\n\nEnter the number of 2048 byte buffers for\n"
301 "file access with the AmigaDOS Read() call:\n")
303 "FILEBUFFERS=FB: Number of 2048 byte buffers for file access with the "
304 "AmigaDOS Read() call. Default = 5 buffers"
312 (if (<> 5 file-buf) (set startstr (cat startstr #space "FILEBUFFERS=" file-buf)))
318 "\nEnter the time between two successive diskchange checks in seconds.\n\n"
319 "If the value of this option is 0, then no diskchange "
320 "checks will be performed; in this case, you have to use "
321 "the C:DiskChange command in order to inform AmiCDROM that "
322 "a disk has been changed.\n")
324 "SCANINTERVAL=SI: Time between two successive diskchange checks. "
325 "Default = 3 seconds.\n"
326 "If the value of this option is 0, then no diskchange "
327 "checks will be performed; in this case, you have to use "
328 "the C:DiskChange command in order to inform AmiCDROM that "
329 "a disk has been changed.\n"
337 (if (<> 3 diskchg) (set startstr (cat startstr #space "SCANINTERVAL=" diskchg)))
343 "Select the command which should be executed, when you "
344 "double-click a CD-DA (AudioCD) icon or click Proceed.")
346 "PLAYCDDA=PC: Name of the command to be executed if the user double-"
347 "clicks at the \"CD-DA\" icon. If you want to execute "
348 "a command with parameters, you have to create "
349 "a script file containing the command plus parameters. "
350 "The name of the script file has to be passed as an "
351 "argument to the PC option. Don't forget to set the "
352 "\"S\" protection bit of the script file."
360 (if (NOT (= "" cdda-file)) (set startstr (cat startstr #space "PLAYCDDA=" cdda-file)))
365 (prompt "\n\nSelect CD-DA (AudioCD) icon position:\n")
366 (help "\nDefault: WB selects position.")
368 "Workbench selects position"
369 "enter own position")
381 (prompt "\n\nEnter the x-position for the CD-DA (AudioCD) icon:\n")
382 (help "\nX position of CD-DA icon. (Default: WB selects position.)")
387 (prompt "\n\nEnter the y-position for the CD-DA (AudioCD) icon:\n")
388 (help "\nY position of CD-DA icon. (Default: WB selects position.)")
393 (if x-pos (set startstr (cat startstr #space "XPOS=" x-pos)))
394 (if y-pos (set startstr (cat startstr #space "YPOS=" y-pos)))
405 "\n\n\nDo you want to configure also the options\n"
406 "which are for Mac-CDs only?\n")
408 "The following options are only interesting for you, "
409 "if you have some Mac-CDs or if you plan to get some "
423 (prompt "\nMac options:\n")
425 "MACTOISO=MI: Convert Mac characters into ISO-Latin-1 (Amiga) characters. "
426 "(The conversion applies only to the filenames, not to "
427 "the contents of the files.) Additionally, the character "
428 "':' will be converted into a '.', and '/' will be "
429 "converted into '-'; this is necessary because AmigaDOS cannot "
430 "handle filenames containing those characters.\n\n"
431 "CONVERTSPACES=CS: Convert spaces in MacHFS filenames into underscores ('_').\n\n"
432 "HFSFIRST=HF: If a new disk is mounted, AmiCDROM normally tests first "
433 "if the new disk is a ISO-9660 disk. If the option \"HF\" "
434 "is given, then the disk is first examined for a HFS "
436 "This option is useful if you have a \"multi-platform\" "
437 "disk with both a ISO-9660 and a HFS partition. Without "
438 "the option you get the ISO partition; with the option "
439 "you get the HFS partition."
442 "convert Mac characters into Amiga characters"
443 "convert space in MacHFS filenames to underscore"
444 "examine CD first for a HFS partition"
452 (if (IN other-options 0) (set startstr (cat startstr #space "MACTOISO")))
453 (if (IN other-options 1) (set startstr (cat startstr #space "CONVERTSPACES")))
454 (if (IN other-options 2) (set startstr (cat startstr #space "HFSFIRST")))
460 "\nEnter the extension for the data fork\n"
461 "of a file on MacHFS disks:\n\n"
462 "(leave it empty, if you are not sure!)\n")
464 "DATAEXT=DE: Extension for the data fork of a file on MacHFS disks.\n\n"
465 "RESOURCEEXT=RE: Extension for the resource fork of a file on MacHFS disks.\n\n"
466 "(If neither DE nor RE are given, DE is set to the empty "
467 "string and RE is set to \".rsrc\".)"
475 "\nEnter the extension for the resource fork\n"
476 "of a file on MacHFS disks:\n\n"
477 "(leave it empty, if you are not sure!)\n")
479 "DATAEXT=DE: Extension for the data fork of a file on MacHFS disks.\n\n"
480 "RESOURCEEXT=RE: Extension for the resource fork of a file on MacHFS disks.\n\n"
481 "(If neither DE nor RE are given, DE is set to the empty "
482 "string and RE is set to \".rsrc\".)"
488 (if res-fork (set startstr (cat startstr #space "RESOURCEEXT=" res-fork)))
489 (if data-fork (set startstr (cat startstr #space "DATAEXT=" data-fork)))
498 "\n\n\nDo you want to install supplied\n"
499 "character set tables?\n")
501 "You may choose not to install them, if you already "
502 "have them, for example if you have codesets.library "
512 (prompt "\nInstalling character set tables")
524 "Select the character set translation table you wish "
525 "to use for Joliet disks or click Proceed for default "
526 "built-in Latin-1 table.\n\n"
527 "These tables are usually placed in LIBS:Charsets.")
529 "UNICODETABLE=UT: Name of the external table used to "
530 "translate characters on Joliet disks. "
531 "The name of the table file has to be passed in an "
534 (default charsetsdir)
540 (if (NOT (= charsetsdir charset-file)) (set startstr (cat startstr #space "UNICODETABLE=" charset-file)))
542 (set startstr (substr startstr 1 (strlen startstr)))
543 (set startstr (cat "\"" startstr "\"")) ; startup fertig
549 "Enter the AmigaDOS device-name you want to use for your CDROM drive:\n\n"
559 ; copy 'device' to 'dev-name' and kill ':'
560 (set dev-name (substr dosdevice 0 (- (strlen dosdevice) 1)))
565 (prompt "Do you want to auto-mount "device" during every system-start?\n"
567 "KillDevice tool (for MorphOS) will not be inserted into\n"
568 "Startup-Sequence automatically, you will need to do it manually"
572 "Auto-Mount: The entry \"Mount >NIL: "device"\" will be added "
573 "in your user-startup\n\n"
574 "No: Nothing will be added anywhere. If you want to access your "
575 "CDs, you will have to type \"Mount "device"\" in your shell first.\n\n"
576 "Workbench 2.1+ or MorphOS:\n\n"
577 "Auto-Mount: The file "dev-name" will be placed in your "
578 "directory \"SYS:Devs/DOSDrivers\"\n\n"
579 "No: The file "dev-name" will be placed in your "
580 "directory \"SYS:Storage/DOSDrivers\"\n"
582 (choices "Auto-Mount" "No")
588 (if (<= #wbversion 37)
590 (protect "DEVS:MountList" "+wd")
592 (prompt "\nCreating Workbench 2.0 Mountlist-Entry")
594 (dest "DEVS:MountList")
595 (if (exists "DEVS:MountList") (include "DEVS:MountList"))
596 (append "\n/* CDVDFS filesystem V"#amicdrom-version" */\n\n"
597 dosdevice" Handler = "ldir2"cdrom-handler\n"
598 " Stacksize = 10000\n"
602 " Device = "device"\n"
607 " BlocksPerTrack = 1\n"
608 " Buffers = "std-buf"\n"
609 " BufMemType = "memtype"\n"
610 " DosType = 0x43444653\n"
611 " Control = "startstr"\n"
616 (user 1) ; nicht auf EXPERT!!
619 (prompt "\nEditing your startup")
621 (command (cat "Mount >NIL: " dosdevice))
629 (set dev-dir "SYS:Devs/DOSDrivers")
630 (set dev-dir "SYS:Storage/DOSDrivers")
633 (protect (tackon dev-dir dev-name) "+wd")
635 (prompt "\nCreating Workbench 2.1+ mount-entry")
637 (dest (tackon dev-dir dev-name))
638 (append "/* CDVDFS filesystem V"#amicdrom-version" */\n\n"
639 " Handler = "ldir2"cdrom-handler\n"
640 " Stacksize = 10000\n"
645 " Device = "device"\n"
650 " BlocksPerTrack = 1\n"
651 " Buffers = "std-buf"\n"
652 " BufMemType = "memtype"\n"
653 " DosType = 0x43444653\n"
654 " Control = "startstr"\n"
658 (protect (cat (tackon dev-dir dev-name) ".info") "+wd")
660 (prompt "\nCreating Workbench 2.1+ mount-entry icon")
662 (source "CD0.info") ; ***TODO***
664 (newname (cat dev-name ".info"))
668 (dest (tackon dev-dir dev-name))
677 (prompt "\nInstalling "ldir2"cdrom-handler")
679 (source "l/cdrom-handler") ; ***TODO***
683 (prompt "\nInstalling "cdir2"cdcontrol")
685 (source "c/cdcontrol")
689 (prompt "\nInstalling "cdir2"checkcd")
695 (prompt "\nInstalling "cdir2"cdrom")
702 (prompt "\nInstalling "cdir2"KillDevice")
704 (source "C/KillDevice")
709 (prompt "\nInstalling documentation")
711 (source "CDVDFS.guide")