home *** CD-ROM | disk | FTP | other *** search
- ;Script file to install PowerVisor V1.13▀
-
- FailAt 21
-
- Echo "*nPowerVisor V1.13▀ installation procedure*n"
-
- Ask "Do you really want to install PowerVisor V1.13▀ ?"
- If NOT WARN
- Skip TheEnd
- EndIf
-
- Echo "*n"
- c/Input "Enter subdirectory name for PowerVisor : " env:PVName
-
- c/DirName env:PVName
- If EXISTS $PVName
- Echo "Warning! This subdirectory already exists.*n"
- Ask "Continue ?"
- If NOT WARN
- Skip TheEnd
- EndIf
- Else
- MakeDir $PVName
- EndIf
- c/DevName env:PVName
-
- SetEnv StandardS "0"
- SetEnv StandardLibs "0"
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nWhere do you want the PowerVisor executables ?"
- Echo "(PowerVisor is ▒100K big, all other executables are ▒20K)"
- Echo " 0 : abort installation"
- Echo " 1 : in the 'c:' directory"
- Echo " 2 : in the '${PVName}c' directory (Recommended place !)"
- Echo " 3 : somewhere else"
- Echo " 4 : don't install the PowerVisor executables"
-
- Lab EnterChoice
-
- c/Input " Enter choice : " env:Choice
-
- If $Choice EQ "0"
- Skip TheEnd
- EndIf
-
- If $Choice EQ "1"
- setenv CDir c:
- Skip InstallExec
- EndIf
-
- If $Choice EQ "2"
- SetEnv CDir ${PVName}c
- Skip InstallExec
- EndIf
-
- If $Choice EQ "3"
- c/Input " Enter subdirectory for the PowerVisor executables : " env:CDir
- Skip InstallExec
- EndIf
-
- If $Choice EQ "4"
- setenv CDir "..."
- Skip DontInstallExec
- EndIf
-
- Echo " Illegal choice!"
- Skip EnterChoice back
-
- Lab InstallExec
- c/DirName env:CDir
- If NOT EXISTS $CDir
- MakeDir $CDir
- EndIf
- c/DevName env:CDir
-
- Version >NIL: exec.library 36
- If NOT WARN
- SetEnv Name13 "13"
- SetEnv Name20 ""
- SetEnv Dos20 "1"
- Echo " Your Amiga has Kickstart 2.0 (V36) or higher in ROM."
- Ask " Do you want to install the AmigaDOS 1.3 executables ?"
- If WARN
- SetEnv Dos13 "1"
- Else
- SetEnv Dos13 "0"
- EndIf
- Else
- SetEnv Name13 ""
- SetEnv Name20 "20"
- SetEnv Dos13 "1"
- Echo " Your Amiga has Kickstart 1.3 or lower in ROM."
- Ask " Do you want to install the AmigaDOS 2.0 executables ?"
- If WARN
- SetEnv Dos20 "1"
- Else
- SetEnv Dos20 "0"
- EndIf
- EndIf
-
- SetEnv Source "c/"
- SetEnv Return "Return1"
- SetEnv Arg "Executables"
- SetEnv File "pv"
- Skip CheckFile
- Lab Return1
-
- If $Dos13 EQ "1"
- Copy ${Source}pv13 ${CDir}pv${Name13}
- Copy ${Source}pv13.info ${CDir}pv${Name13}.info
- EndIf
- If $Dos20 EQ "1"
- Copy ${Source}pv ${CDir}pv${Name20}
- Copy ${Source}pv.info ${CDir}pv${Name20}.info
- EndIf
-
- Echo " Do you want to install QuickHelp and MStruct"
- Ask " additional utilities useful for PowerVisor ?"
- If WARN
- If $Dos13 EQ "1"
- Copy ${Source}Help13 ${CDir}Help${Name13}
- Copy ${Source}MakeHelp13 ${CDir}MakeHelp${Name13}
- Copy ${Source}ArcFiles13 ${CDir}ArcFiles${Name13}
- Copy ${Source}MStruct13 ${CDir}MStruct${Name13}
- EndIf
- If $Dos20 EQ "1"
- Copy ${Source}Help ${CDir}Help${Name20}
- Copy ${Source}MakeHelp ${CDir}MakeHelp${Name20}
- Copy ${Source}ArcFiles ${CDir}ArcFiles${Name20}
- Copy ${Source}MStruct ${CDir}MStruct${Name20}
- EndIf
- EndIf
-
- Echo "*n PowerVisor executables installed in '${CDir}'"
-
- Lab DontInstallExec
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nWhere do you want the PowerVisor online help files, the error file"
- Echo "and the standard PowerVisor startup script ?"
- Echo "(Online help and error files are ▒170K big)"
- Echo " 0 : abort installation"
- Echo " 1 : in the 's:' directory"
- Echo " 2 : in the '${PVName}s' directory"
- Echo " 3 : somewhere else"
- Echo " 4 : don't install the PowerVisor online help and error files"
- Version >NIL: exec.library 36
- If NOT WARN
- If NOT a${CDir}a EQ "a...a"
- Echo " 5 : at the same place as the executables (Recommended place !)"
- Echo " (only recommended if you have AmigaDOS 2.0, use item 1 or 2 if"
- Echo " you want to use PowerVisor in AmigaDOS 1.3 too)"
- EndIf
- EndIf
-
- Lab EnterChoice2
-
- c/Input " Enter choice : " env:Choice
-
- If $Choice EQ "0"
- Skip TheEnd
- EndIf
-
- If $Choice EQ "1"
- Skip InSDir
- EndIf
-
- If $Choice EQ "2"
- SetEnv StandardS "1"
- Skip InPVSDir
- EndIf
-
- If $Choice EQ "3"
- SetEnv StandardS "1"
- Skip AskSDir
- EndIf
-
- If $Choice EQ "4"
- setenv SDir s:
- SetEnv StandardS "2"
- Skip DontInstallHelp
- EndIf
-
- Version >NIL: exec.library 36
- If NOT WARN
- If NOT a${CDir}a EQ "a...a"
- If $Choice EQ "5"
- setenv SDir $CDir
- Skip InstallHelp
- EndIf
- EndIf
- EndIf
-
- Echo " Illegal choice!"
- Skip EnterChoice2 back
-
- Lab InSDir
- setenv SDir s:
- Skip InstallHelp
-
- Lab InPVSDir
- SetEnv SDir ${PVName}s
- Skip InstallHelp
-
- Lab AskSDir
- c/Input " Enter subdirectory for the online help and error files : " env:SDir
-
- Lab InstallHelp
- c/DirName env:SDir
- If NOT EXISTS $SDir
- MakeDir $SDir
- EndIf
- c/DevName env:SDir
-
- SetEnv Source "s/"
- SetEnv Return "Return2"
- SetEnv Arg "Help and error files"
- SetEnv File "PowerVisor-errors"
- Skip CheckFile
- Lab Return2
-
- Copy ${Source}PowerVisor-help ${SDir}PowerVisor-help
- Copy ${Source}PowerVisor-ctrl ${SDir}PowerVisor-ctrl
- Copy ${Source}PowerVisor-errors ${SDir}PowerVisor-errors
- If EXISTS ${SDir}PowerVisor-startup
- Copy >NIL: ${SDir}PowerVisor-startup ${SDir}PowerVisor-startup.bak
- Echo " Old PowerVisor-startup file renamed to PowerVisor-startup.bak"
- EndIf
- Copy ${Source}PowerVisor-startup ${SDir}PowerVisor-startup
-
- If $Dos20 EQ "1"
- If EXISTS ${SDir}PowerVisor-menus
- Copy >NIL: ${SDir}PowerVisor-menus ${SDir}PowerVisor-menus.bak
- Echo " Old PowerVisor-menus file renamed to PowerVisor-menus.bak"
- EndIf
- Copy ${Source}PowerVisor-menus ${SDir}PowerVisor-menus
- EndIf
-
- If EXISTS ${SDir}PowerVisor-config
- Skip PVConfigErr
- EndIf
- If EXISTS s:PowerVisor-config
- Lab PVConfigErr
- Echo " Warning! You already have a PowerVisor-config file !"
- Echo " If you are installing a new version of PowerVisor it is probably"
- Echo " better to delete the old PowerVisor-config file. This is because"
- Echo " the config file is not always compatible (Read the 'ReadThisFirst'"
- Echo " file to see if there is a difference between this version and the"
- Echo " previous version)."
- Ask " Should I delete this file ?"
- If WARN
- Delete >NIL: ${SDir}PowerVisor-config
- Delete >NIL: s:PowerVisor-config
- EndIf
- EndIf
-
- Echo "*n PowerVisor online help and error files installed in '${SDir}'"
-
- Lab DontInstallHelp
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nDo you want all the examples ?"
- Echo "(All examples are ▒30K big)"
- Echo " 0 : abort installation"
- Echo " 1 : yes, I want them (in '${PVName}')"
- Echo " 2 : no, I don't want them"
-
- Lab EnterChoice3
-
- c/Input " Enter choice : " env:Choice
-
- If $Choice EQ "0"
- Skip TheEnd
- EndIf
-
- If $Choice EQ "1"
- Skip YesExamples
- EndIf
-
- If $Choice EQ "2"
- Skip NoExamples
- EndIf
-
- Echo " Illegal choice!"
- Skip EnterChoice3 back
-
- Lab YesExamples
- If NOT EXISTS ${PVName}Examples
- MakeDir ${PVName}Examples
- EndIf
- If NOT EXISTS ${PVName}Source
- MakeDir ${PVName}Source
- EndIf
- If NOT EXISTS ${PVName}PowerVisorLib
- MakeDir ${PVName}PowerVisorLib
- EndIf
-
- SetEnv Source "Examples/"
- SetEnv Return "Return3"
- SetEnv Arg "Example files"
- SetEnv File "BuggyProgram"
- Skip CheckFile
- Lab Return3
-
- Copy >NIL: ${Source}#? ${PVName}Examples
-
- SetEnv Source "Source/"
- SetEnv Return "Return4"
- SetEnv Arg "Source files for examples"
- SetEnv File "BuggyProgram.asm"
- Skip CheckFile
- Lab Return4
-
- Copy >NIL: ${Source}#? ${PVName}Source
-
- SetEnv Source "PowerVisorLib/"
- SetEnv Return "Return5"
- SetEnv Arg "PowerVisor library source files"
- SetEnv File "pv_lib.fd"
- Skip CheckFile
- Lab Return5
-
- Copy >NIL: ${Source}#? ${PVName}PowerVisorLib
-
- Echo "*n Examples installed in '${PVName}Examples'"
-
- Lab NoExamples
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nDo you want all the documentation ?"
- Echo "(All documentation files are ▒800K big)"
- Echo " 0 : abort installation"
- Echo " 1 : yes, I want them (in '${PVName}Docs')"
- Echo " 2 : no, I don't want them"
-
- Lab EnterChoice4
-
- c/Input " Enter choice : " env:Choice
-
- If $Choice EQ "0"
- Skip TheEnd
- EndIf
-
- If $Choice EQ "1"
- Skip YesDocs
- EndIf
-
- If $Choice EQ "2"
- Skip NoDocs
- EndIf
-
- Echo " Illegal choice!"
- Skip EnterChoice4 back
-
- Lab YesDocs
- If NOT EXISTS ${PVName}Docs
- MakeDir ${PVName}Docs
- EndIf
-
- SetEnv Source "Docs/"
- SetEnv Return "Return6"
- SetEnv Arg "Document files"
- SetEnv File "CommandReference"
- Skip CheckFile
- Lab Return6
-
- Copy >NIL: ${Source}#? ${PVName}Docs
-
- Echo "*n Documentation installed in '${PVName}Docs'"
-
- Lab NoDocs
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nWhere do you want the PowerVisor script files ?"
- Echo "(Script files are ▒60K big)"
- Echo "Note that some of these files are needed by the standard"
- Echo "PowerVisor-startup file"
- Echo " 0 : abort installation"
- Echo " 1 : in the 's:pv' directory (Recommended place !)"
- Echo " 2 : somewhere else"
- Echo " 3 : in the '${PVName}s/pv' directory"
- Echo " 4 : don't install the PowerVisor script files"
-
- Lab EnterChoice5
-
- c/Input " Enter choice : " env:Choice
-
- If $Choice EQ "0"
- Skip TheEnd
- EndIf
-
- If $Choice EQ "1"
- setenv PDir s:pv
- Skip InstallScripts
- EndIf
-
- If $Choice EQ "2"
- c/Input " Enter subdirectory for the script files : " env:PDir
- Skip InstallScripts
- EndIf
-
- If $Choice EQ "3"
- If NOT EXISTS ${PVName}s
- MakeDir ${PVName}s
- EndIf
- setenv PDir ${PVName}s/pv
- Skip InstallScripts
- EndIf
-
- If $Choice EQ "4"
- Skip DontInstallScripts
- EndIf
-
- Echo " Illegal choice!"
- Skip EnterChoice5 back
-
- Lab InstallScripts
- c/DirName env:PDir
- If NOT EXISTS $PDir
- MakeDir $PDir
- EndIf
-
- SetEnv Source "s/pv/"
- SetEnv Return "Return7"
- SetEnv Arg "Script files"
- SetEnv File "db"
- Skip CheckFile
- Lab Return7
-
- Copy >NIL: ${Source}#? ${PDir}
-
- c/DevName env:PDir
- Echo "*n Script files installed in '${PDir}'"
-
- Lab DontInstallScripts
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nWhere do you want the PowerVisor develop files ?"
- Echo "Note that these files are rather specialized. If you are a novice"
- Echo "PowerVisor user, you won't need them"
- Echo "(Develop files are ▒160K big)"
- Echo " 0 : abort installation"
- Echo " 1 : in the '${PVName}PVDevelop' directory"
- Echo " 2 : somewhere else"
- Echo " 3 : don't install the PowerVisor develop files"
-
- Lab EnterChoice7
-
- c/Input " Enter choice : " env:Choice
-
- If $Choice EQ "0"
- Skip TheEnd
- EndIf
-
- If $Choice EQ "1"
- Skip InPVDevelopDir
- EndIf
-
- If $Choice EQ "2"
- Skip AskDevelopDir
- EndIf
-
- If $Choice EQ "3"
- Skip DontInstallDevelop
- EndIf
-
- Echo " Illegal choice!"
- Skip EnterChoice7 back
-
- Lab InPVDevelopDir
- setenv DDir ${PVName}PVDevelop
- Skip InstallDevelop
-
- Lab AskDevelopDir
- c/Input " Enter subdirectory for the develop files : " env:DDir
-
- Lab InstallDevelop
- c/DirName env:DDir
- If NOT EXISTS $DDir
- MakeDir $DDir
- EndIf
- c/DevName env:DDir
-
- SetEnv Source "PVDevelop/"
- SetEnv Return "Return10"
- SetEnv Arg "Develop files"
- SetEnv File "PVDevelop.lzh"
- Skip CheckFile
- Lab Return10
-
- Copy >NIL: ${Source}#? all ${DDir}
-
- Echo "*n Develop files installed in '${DDir}'"
-
- Lab DontInstallDevelop
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nWhere do you want the PowerVisor library files ?"
- Echo "(Library files are ▒1K big)"
- Echo "Note that you PowerVisor really needs these files!"
- Echo " 0 : abort installation"
- Echo " 1 : in the 'libs:' directory (Recommended place !)"
- Echo " 2 : in the '${PVName}libs' directory"
- Echo " 3 : somewhere else"
- Echo " 4 : don't install the PowerVisor library files"
-
- Lab EnterChoice6
-
- c/Input " Enter choice : " env:Choice
-
- If $Choice EQ "0"
- Skip TheEnd
- EndIf
-
- If $Choice EQ "1"
- Skip InLibsDir
- EndIf
-
- If $Choice EQ "2"
- SetEnv StandardLibs "1"
- Skip InPVLibsDir
- EndIf
-
- If $Choice EQ "3"
- SetEnv StandardLibs "1"
- Skip AskLibsDir
- EndIf
-
- If $Choice EQ "4"
- SetEnv StandardLibs "2"
- Skip DontInstallLibs
- EndIf
-
- Echo " Illegal choice!"
- Skip EnterChoice6 back
-
- Lab InLibsDir
- setenv LDir libs:
- Skip InstallLibs
-
- Lab InPVLibsDir
- SetEnv LDir ${PVName}libs
- Skip InstallLibs
-
- Lab AskLibsDir
- c/Input " Enter subdirectory for the library files : " env:LDir
-
- Lab InstallLibs
- c/DirName env:LDir
- If NOT EXISTS $LDir
- MakeDir $LDir
- EndIf
- c/DevName env:LDir
-
- SetEnv Source "Libs/"
- SetEnv Return "Return8"
- SetEnv Arg "Library files"
- SetEnv File "powervisor.library"
- Skip CheckFile
- Lab Return8
-
- Copy ${Source}powervisor.library ${LDir}powervisor.library
-
- Echo "*n Libraries installed in '${LDir}'"
-
- Lab DontInstallLibs
-
- SetEnv Source ""
- SetEnv Return "Return9"
- SetEnv Arg "Readme and bugs files"
- SetEnv File "ReadThisFirst"
- Skip CheckFile
- Lab Return9
-
- Copy ${Source}pv.bugs ${PVName}pv.bugs
- Copy ${Source}pv.bugs.info ${PVName}pv.bugs.info
- Copy ${Source}ReadThisFirst ${PVName}ReadThisFirst
- Copy ${Source}ReadThisFirst.info ${PVName}ReadThisFirst.info
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nInstallation is complete*n"
- Echo "Notes :*n"
-
- If $StandardS EQ "1"
- Echo " In order to have online help and readable error messages"
- Echo " you will have to assign s: to '${SDir}'."
- Echo " If you have AmigaDOS 2.0 you can use multiple assignes to accomplish this."
- Echo " Otherwise I recommend that you put the online help and error file in your"
- Echo " s: directory*n"
- EndIf
- If $StandardS EQ "2"
- Echo " Note that you have not installed the online help and error files."
- Echo " This means that you have no online help and that the error messages"
- Echo " in PowerVisor will be rather unreadable*n"
- EndIf
-
- If $StandardLibs EQ "1"
- Echo " In order to be able to run PowerVisor you must have powervisor.library"
- Echo " in your libs: directory. You can assign libs: to '${LDir}'"
- Echo " or use the AmigaDOS 2.0 multiple assign feature to accomplish this*n"
- EndIf
- If $StandardLibs EQ "2"
- Echo " Note that you can't run PowerVisor because you have not installed"
- Echo " the PowerVisor.library*n"
- EndIf
-
- Ask "Press <enter> to continue"
-
- Echo "*n--------------------------------------------------------------------"
- Echo "*nThe standard s/PowerVisor-startup file needs fd: assigned to the"
- Echo "subdirectory containing all fd-files."
- Ask "*nShould I alter your s:Startup-sequence file for you ?"
- If WARN
- c/Input "Where are your fd-files located ? " env:fddir
- c/DirName env:fddir
- c/DirName env:PVName
- echo >ram:test "f /endcli/"
- echo >>ram:test ""
- echo >>ram:test "i"
- echo >>ram:test "assign fd: ${fddir}"
- echo >>ram:test "assign pv: ${PVName}"
- echo >>ram:test "Z"
- echo >>ram:test "w"
- edit >NIL: with ram:test from sys:s/Startup-sequence
- delete >NIL: ram:test
- EndIf
-
- Lab TheEnd
-
- Delete >NIL: env:pvname env:fddir env:ddir env:ldir env:cdir env:sdir env:pdir env:choice env:Source env:Arg env:Dir
- Delete >NIL: env:standards env:standardlibs env:Name13 env:Name20 env:Dos13 env:Dos20 env:Return env:File
-
- Ask "*n*n*nEnd of installation! (press <enter>)"
- EndCli >NIL:
-
-
- ;Subroutine to check if a file exists
- ;Return address is in env:return
- ;Arg string is in env:Arg
- ;Initial source is in env:Source
- ;Initial file is in env:File
-
- Lab CheckFile
- If NOT EXISTS ${Source}${File}
- Echo " Error ! ${Arg} not found in '$Source' !"
- Echo " 0 : abort installation"
- Echo " 1 : enter new source pathname"
- Echo " 2 : directory"
-
- Lab ChoiceCheckFile
- c/Input " Enter choice : " env:Choice
-
- If $Choice EQ "0"
- Skip TheEnd back
- EndIf
-
- If $Choice EQ "1"
- c/Input " Give correct pathname : " env:Source
- c/DevName env:Source
- Skip CheckFile back
- EndIf
-
- If $Choice EQ "2"
- c/Input " Directory name and parameters for 'dir' : " env:Dir
- Dir ${Dir}
- Skip ChoiceCheckFile back
- EndIf
-
- Echo " Illegal choice!"
- Skip ChoiceCheckFile back
- EndIf
- Skip $Return back
-