home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_progs
/
mem_util
/
pwrvisr1.lha
/
InstallPV
< prev
next >
Wrap
Text File
|
1992-09-26
|
14KB
|
554 lines
;PowerVisor installation script for AmigaDOS 2.0 ('Installer' only
;works in AmigaDOS 2.0. I didn't realize this when I wrote this script.
;Therefore this script is written as if it is possible to run from
;within AmigaDOS 1.3. Maybe someone will write an Installer program that
;works on AmigaDOS 1.3).
;
;Normally this script expects all files in the same source directory. Since
;this is not possible when you don't have a harddisk, you can also put
;the document files (the 'docs' subdirectory) and the 'PVDevelop'
;subdirectory on another disk. This script will automatically ask for
;the right disk.
;
;PowerVisor V1.20
(complete 0)
(set kick13 (< (/ (getversion) 65536) 37))
(set PVName
(tackon
(askdir
(prompt "In which disk or drawer should PowerVisor V1.20 be installed?")
(help @askdir-help)
(default @default-dest)
)
"PV"
)
)
(set SourceName
(tackon
(askdir
(prompt "Where can I find the uninstalled PowerVisor?")
(help @askdir-help)
(default (pathonly @icon))
)
""
)
)
(makedir PVName (infos))
;(makeassign "PV" PVName)
(set @default-dest PVName)
(set together
(not
(askchoice
(prompt "Do you want all PowerVisor files together in the same subdirectory?")
(help
"If you select 'yes' ALL PowerVisor files will be placed in the \"" PVName
"\" subdirectory. This install script will not copy files to other places "
"on your disk.\n\n"
"The advantage of this is that you "
"can easily find all files belonging to PowerVisor. The disadvantage is that "
"you have to use the AmigaDOS 2.0 multiple assign feature for libs: and s: "
"so that PowerVisor can find the powervisor.library and the scripts. "
"These assigns are automatically added to your s:user-startup file (later "
"on) so you need not worry about these. If you have AmigaDOS 1.3, you "
"better select 'no', since you can't use the multiple assign feature.\n\n"
"If you select 'no' the PowerVisor files will be put in the right subdirectories "
"(libraries in libs:, scripts in s:, ...)"
)
(choices "Yes" "No")
(default 1)
)
)
)
(set otherkick
(askbool
(prompt
(if kick13
"You have AmigaDOS 1.3, do you want the AmigaDOS 2.0 files and executables?"
"You have AmigaDOS 2.0, do you want the AmigaDOS 1.3 files and executables?"
)
)
(help
(if kick13
(cat
"You have AmigaDOS 1.3. If you choose 'yes' this install script will "
"also copy all files needed for the AmigaDOS 2.0 version of PowerVisor. "
"The AmigaDOS 2.0 executables in the \"" (tackon PVName "c") "\" subdirectory will "
"all end with '20'."
)
(cat
"You have AmigaDOS 2.0. If you choose 'yes' this install script will "
"also copy all files needed for the AmigaDOS 1.3 version of PowerVisor. "
"The AmigaDOS 1.3 executables in the \"" (tackon PVName "c") "\" subdirectory will "
"all end with '13'.\n"
"In the AmigaDOS 2.0 version of PowerVisor, the online help and error files "
"are located in the same directory as the PowerVisor executable. This feature "
"is not possible in AmigaDOS 1.3 (PROGDIR: is a new feature in AmigaDOS 2.0). "
"If you choose 'yes' this install script will therefore copy the online "
"help and error files to the \""
(if together
(tackon PVName "s")
"s:"
)
"\" directory so that the AmigaDOS 1.3 version has access to these files. "
"Note that this is not the recommended place for these files if you have "
"AmigaDOS 2.0."
)
)
)
(default 0)
)
)
(set copy13 (if kick13 1 otherkick))
(set copy20 (if kick13 otherkick 1))
(copyfiles
(prompt "Copying various files...")
(help @copyfiles-help)
(source SourceName)
(dest PVName)
(choices "ReadThisFirst" "pv.bugs" "HowToGetTheSource")
(infos)
)
(complete 8)
(if copy13
(copyfiles
(prompt "Copying AmigaDOS 1.3 executables...")
(help @copyfiles-help)
(source (tackon SourceName "c"))
(dest (tackon PVName "c"))
(choices "pv13" "MStruct13" "ArcFiles13" "Help13" "MakeHelp13" "dc")
(infos)
)
)
(complete 16)
(if copy20
(copyfiles
(prompt "Copying AmigaDOS 2.0 executables...")
(help @copyfiles-help)
(source (tackon SourceName "c"))
(dest (tackon PVName "c"))
(choices "pv" "MStruct" "ArcFiles" "Help" "makeHelp" "dc")
(infos)
)
)
(complete 24)
(if (and copy20 kick13)
(
(foreach (tackon PVName "c") "~(#?13)"
(rename @each-name (cat @each-name "20")
)
)
)
)
(if kick13
(
(rename "pv13" "pv")
(rename "MStruct13" "MStruct")
(rename "MakeHelp13" "MakeHelp")
(rename "ArcFiles13" "ArcFiles")
(rename "Help13" "Help")
)
)
(complete 32)
(if together
(
(copyfiles
(source (tackon SourceName "libs/powervisor.library"))
(dest (tackon PVName "libs"))
)
(copyfiles
(source
(tackon SourceName
(if kick13 "libs13/reqtools.library" "libs/reqtools.library")
)
)
(dest (tackon PVName "libs"))
)
)
(
(copylib
(prompt "Should I copy the newer powervisor.library?")
(help
"Note that PowerVisor needs this library to run."
)
(source (tackon SourceName "libs/powervisor.library"))
(dest "LIBS:")
(confirm)
)
(copylib
(prompt "Should I copy the newer reqtools.library? (© Nico François)")
(help
"PowerVisor does not really need this library, but makes rather "
"good use of it. And anyway, it is a very good library so you really "
"should have it."
)
(source
(tackon SourceName
(if kick13 "libs13/reqtools.library" "libs/reqtools.library")
)
)
(dest "LIBS:")
(confirm)
)
)
)
(complete 40)
(set OnlineHelpDest
(if (or kick13 copy13)
(if together
(tackon PVName "s")
"s:"
)
(tackon PVName "c")
)
)
(copyfiles
(prompt "Copying online help and error files...")
(help
"These files are needed by PowerVisor for the online help and "
"for readable error messages. You don't strictly need them, but "
"they make life a lot easier."
)
(source (tackon SourceName "s"))
(dest OnlineHelpDest)
(if copy20
(choices "PowerVisor-help.qq" "PowerVisor-ctrl" "PowerVisor-errors"
"PowerVisor-menus")
(choices "PowerVisor-help.qq" "PowerVisor-ctrl" "PowerVisor-errors")
)
(infos)
(confirm)
)
(if (exists (tackon OnlineHelpDest "PowerVisor-help.qq"))
(
(run
(cat
"\""
(tackon (tackon PVName "c") "dc")
"\" \""
(tackon OnlineHelpDest "PowerVisor-help.qq")
"\" \""
(tackon OnlineHelpDest "PowerVisor-help")
"\" 4"
)
)
(delete (tackon OnlineHelpDest "PowerVisor-help.qq"))
)
)
(delete (tackon (tackon PVName "c") "dc"))
(complete 48)
(if
(askbool
(prompt
"Do you want the standard PowerVisor-startup file?"
)
(help
"This file is a PowerVisor script that is automatically executed when "
"PowerVisor starts. This file is not really needed, but many useful "
"new aliases and features are installed there so I highly recommend that "
"you copy this file.\n"
"If you already have a PowerVisor-script, this old script will be renamed "
"to PowerVisor-script.bak so you don't loose any work.\n"
"Note that this script uses various other scripts so you should also copy "
"the PowerVisor script files (next question) if you copy this file."
)
(default 1)
)
(
(set sd
(if together
(tackon PVName "s")
"s:"
)
)
(if (exists (tackon sd "PowerVisor-startup"))
(rename (tackon sd "PowerVisor-startup") (tackon sd "PowerVisor-startup.bak"))
)
(copyfiles
(prompt "Copying startup script file...")
(help @copyfiles-help)
(source (tackon SourceName "s/PowerVisor-startup"))
(dest sd)
(infos)
)
)
)
(complete 56)
(copyfiles
(prompt "Copying PowerVisor script files...")
(help
"Copy various example script files (ARexx and PowerVisor scripts). "
"Note that some of these scripts are needed by the standard PowerVisor-startup "
"script, so you should copy these script files if you have copied the "
"PowerVisor-startup file (previous question)."
)
(source (tackon SourceName "s/pv"))
(dest
(if together
(tackon PVName "s/pv")
"s:pv"
)
)
(all)
(infos)
(confirm)
)
(complete 64)
(set answer1
(askbool
(prompt "Should the Example Files be installed?")
(help
"You can use the examples to learn how to use PowerVisor. "
"The manual refers to some of these examples but they are not "
"really needed.\n"
"Some other source files (to use the powervisor.library from within "
"your own programs and the source for the previous examples) are also "
"copied."
)
(default 1)
)
)
(if answer1
(
(copyfiles
(prompt "Copying example files...")
(help @copyfiles-help)
(source (tackon SourceName "Examples"))
(dest (tackon PVName "Examples"))
(all)
(infos)
)
(copyfiles
(prompt "Copying source files for examples...")
(help @copyfiles-help)
(source (tackon SourceName "Source"))
(dest (tackon PVName "Source"))
(all)
(infos)
)
(copyfiles
(prompt "Copying PowerVisor library source files...")
(help @copyfiles-help)
(source (tackon SourceName "PowerVisorLib"))
(dest (tackon PVName "PowerVisorLib"))
(all)
(infos)
)
)
)
(complete 72)
(set answer1
(askbool
(prompt "Do you want the PowerVisor manual (warning: about 800 Kbytes)?")
(help
"These manual files are in hypertext format for the AmigaGuide "
"program. If you don't have AmigaGuide you can still read them "
"as normal ascii files. If you have AmigaGuide you can use this "
"manual as a better online help system (highly recommended!)\n"
"Note that this manual is a far better way to learn how to use PowerVisor "
"than the previously installed online help file."
)
(default 1)
)
)
(if answer1
(
(while (not (exists (tackon SourceName "docs")))
(set SourceName
(tackon
(askdir
(prompt "Where can I find the PowerVisor manual? (Insert right "
"disk if necessary, disk must contain a 'Docs' subdirectory)")
(help @askdir-help)
(default (pathonly @icon))
)
""
)
)
)
(copyfiles
(prompt "Copying manual...")
(help @copyfiles-help)
(source (tackon SourceName "docs"))
(dest (tackon PVName "docs"))
(all)
(infos)
)
(if
(askbool
(prompt
"Do you want to convert the AmigaGuide manual to a somewhat more "
"readable document format? (only do this if you don't have AmigaGuide)"
)
(help
"When you choose 'yes' all manual files will be converted to a more "
"readable format. This is only useful if you don't have AmigaGuide and "
"you want to be able to comfortably read the manual with a normal text "
"reader.\n"
"Note that you can always convert these manuals at a later time. "
"Simply use the 'convertguide2doc' utility in the 'docs' subdirectory "
"to do this (redirect the output of this utility to the desired file)."
)
(default 0)
)
(
(working
(prompt "Converting manual...")
)
(foreach (tackon PVName "docs") "#?.guide"
(
(execute
(cat
"\""
(tackon (tackon PVName "docs") "ConvertDoc.script")
"\" \""
(tackon PVName "docs")
"\" \""
@each-name
"\""
)
)
(tooltype
(dest (cat (tackon (tackon PVName "docs") @each-name) ".info"))
(noposition)
)
)
)
)
)
(delete (tackon (tackon PVName "docs") "doc.info"))
(delete (tackon (tackon PVName "docs") "ConvertDoc.script"))
)
)
(complete 80)
(set answer1
(askbool
(prompt "Do you want the PowerVisor develop files?")
(help
"You only need these files if you plan to write sophisticated"
"PowerVisor scripts (machinelanguage or C scripts). These files"
"are certainly not healthy for the beginning PowerVisor user."
)
(default 0)
)
)
(if answer1
(
(while (not (exists (tackon SourceName "PVDevelop")))
(set SourceName
(tackon
(askdir
(prompt "Where can I find the PV develop files? (Insert right "
"disk if necessary, disk must contain a 'PVDevelop' subdirectory)")
(help @askdir-help)
(default (pathonly @icon))
)
""
)
)
)
(copyfiles
(prompt "Copying PowerVisor develop files...")
(help @copyfiles-help)
(source (tackon SourceName "PVDevelop"))
(dest (tackon PVName "PVDevelop"))
(all)
(infos)
)
)
)
(while (not (exists (tackon SourceName "c")))
(set SourceName
(tackon
(askdir
(prompt "Please insert the first PowerVisor disk")
(help @askdir-help)
(default (pathonly @icon))
)
""
)
)
)
(complete 88)
(set fddir
(askdir
(prompt "Where are your fd files?")
(help
"Fd-files are files containing information about the Amiga libraries. "
"PowerVisor makes very good use of these files so they are highly recommended. "
"Simply answer a dummy directory (like 'ram:') if you don't have these files. "
"Note that you can find the AmigaDOS 1.3 fd-files on the Extras 1.3 disk."
)
(default "work:fd")
)
)
(complete 96)
(startup "PowerVisor"
(prompt
"Some instructions need to be added to the \"S:user-startup\" "
"so that your system will be properly configured to use PowerVisor.")
(help @startup-help)
(if (and together (not kick13))
(command
"Assign PV: \"" PVName "\"\n"
"Assign FD: \"" fddir "\"\n"
"Assign LIBS: \"" (tackon PVName "libs") "\" add\n"
"Assign S: \"" (tackon PVName "s") "\" add\n"
"Path pv:c add\n"
)
(command
"Assign PV: \"" PVName "\"\n"
"Assign FD: \"" fddir "\"\n"
"Path pv:c add\n"
)
)
)
(exit)