home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 612a.lha / PowerVisor_v1.13 / PowerVisor_v1.13.lzh / install.script < prev    next >
Text File  |  1992-02-07  |  18KB  |  674 lines

  1. ;Script file to install PowerVisor V1.13ß
  2.  
  3. FailAt 21
  4.  
  5. Echo "*nPowerVisor V1.13ß installation procedure*n"
  6.  
  7. Ask "Do you really want to install PowerVisor V1.13ß ?"
  8. If NOT WARN
  9.    Skip TheEnd
  10. EndIf
  11.  
  12. Echo "*n"
  13. c/Input "Enter subdirectory name for PowerVisor : " env:PVName
  14.  
  15. c/DirName env:PVName
  16. If EXISTS $PVName
  17.    Echo "Warning! This subdirectory already exists.*n"
  18.    Ask "Continue ?"
  19.    If NOT WARN
  20.       Skip TheEnd
  21.    EndIf
  22. Else
  23.    MakeDir $PVName
  24. EndIf
  25. c/DevName env:PVName
  26.  
  27. SetEnv StandardS "0"
  28. SetEnv StandardLibs "0"
  29.  
  30. Echo "*n--------------------------------------------------------------------"
  31. Echo "*nWhere do you want the PowerVisor executables ?"
  32. Echo "(PowerVisor is ±100K big, all other executables are ±20K)"
  33. Echo "      0 : abort installation"
  34. Echo "      1 : in the 'c:' directory"
  35. Echo "      2 : in the '${PVName}c' directory (Recommended place !)"
  36. Echo "      3 : somewhere else"
  37. Echo "      4 : don't install the PowerVisor executables"
  38.  
  39. Lab EnterChoice
  40.  
  41.    c/Input "   Enter choice : " env:Choice
  42.  
  43.    If $Choice EQ "0"
  44.       Skip TheEnd
  45.    EndIf
  46.  
  47.    If $Choice EQ "1"
  48.        setenv CDir c:
  49.        Skip InstallExec
  50.    EndIf
  51.  
  52.    If $Choice EQ "2"
  53.        SetEnv CDir ${PVName}c
  54.        Skip InstallExec
  55.    EndIf
  56.  
  57.    If $Choice EQ "3"
  58.        c/Input "   Enter subdirectory for the PowerVisor executables : " env:CDir
  59.       Skip InstallExec
  60.    EndIf
  61.  
  62.    If $Choice EQ "4"
  63.       setenv CDir "..."
  64.       Skip DontInstallExec
  65.    EndIf
  66.  
  67.    Echo "   Illegal choice!"
  68.    Skip EnterChoice back
  69.  
  70. Lab InstallExec
  71.    c/DirName env:CDir
  72.    If NOT EXISTS $CDir
  73.       MakeDir $CDir
  74.    EndIf
  75.    c/DevName env:CDir
  76.  
  77.    Version >NIL: exec.library 36
  78.    If NOT WARN
  79.       SetEnv Name13 "13"
  80.       SetEnv Name20 ""
  81.       SetEnv Dos20 "1"
  82.       Echo "   Your Amiga has Kickstart 2.0 (V36) or higher in ROM."
  83.       Ask "   Do you want to install the AmigaDOS 1.3 executables ?"
  84.       If WARN
  85.          SetEnv Dos13 "1"
  86.       Else
  87.          SetEnv Dos13 "0"
  88.       EndIf
  89.    Else
  90.       SetEnv Name13 ""
  91.       SetEnv Name20 "20"
  92.       SetEnv Dos13 "1"
  93.       Echo "   Your Amiga has Kickstart 1.3 or lower in ROM."
  94.       Ask "   Do you want to install the AmigaDOS 2.0 executables ?"
  95.       If WARN
  96.          SetEnv Dos20 "1"
  97.       Else
  98.          SetEnv Dos20 "0"
  99.       EndIf
  100.    EndIf
  101.  
  102.     SetEnv Source "c/"
  103.     SetEnv Return "Return1"
  104.     SetEnv Arg "Executables"
  105.     SetEnv File "pv"
  106.     Skip CheckFile
  107.     Lab Return1
  108.  
  109.    If $Dos13 EQ "1"
  110.       Copy ${Source}pv13 ${CDir}pv${Name13}
  111.       Copy ${Source}pv13.info ${CDir}pv${Name13}.info
  112.    EndIf
  113.    If $Dos20 EQ "1"
  114.       Copy ${Source}pv ${CDir}pv${Name20}
  115.       Copy ${Source}pv.info ${CDir}pv${Name20}.info
  116.    EndIf
  117.  
  118.    Echo "   Do you want to install QuickHelp and MStruct"
  119.    Ask "   additional utilities useful for PowerVisor ?"
  120.    If WARN
  121.       If $Dos13 EQ "1"
  122.          Copy ${Source}Help13 ${CDir}Help${Name13}
  123.          Copy ${Source}MakeHelp13 ${CDir}MakeHelp${Name13}
  124.          Copy ${Source}ArcFiles13 ${CDir}ArcFiles${Name13}
  125.          Copy ${Source}MStruct13 ${CDir}MStruct${Name13}
  126.       EndIf
  127.       If $Dos20 EQ "1"
  128.          Copy ${Source}Help ${CDir}Help${Name20}
  129.          Copy ${Source}MakeHelp ${CDir}MakeHelp${Name20}
  130.          Copy ${Source}ArcFiles ${CDir}ArcFiles${Name20}
  131.          Copy ${Source}MStruct ${CDir}MStruct${Name20}
  132.       EndIf
  133.    EndIf
  134.  
  135.    Echo "*n   PowerVisor executables installed in '${CDir}'"
  136.  
  137. Lab DontInstallExec
  138.  
  139.    Echo "*n--------------------------------------------------------------------"
  140.    Echo "*nWhere do you want the PowerVisor online help files, the error file"
  141.    Echo "and the standard PowerVisor startup script ?"
  142.    Echo "(Online help and error files are ±170K big)"
  143.    Echo "      0 : abort installation"
  144.    Echo "      1 : in the 's:' directory"
  145.    Echo "      2 : in the '${PVName}s' directory"
  146.    Echo "      3 : somewhere else"
  147.    Echo "      4 : don't install the PowerVisor online help and error files"
  148.    Version >NIL: exec.library 36
  149.    If NOT WARN
  150.         If NOT a${CDir}a EQ "a...a"
  151.            Echo "      5 : at the same place as the executables (Recommended place !)"
  152.          Echo "          (only recommended if you have AmigaDOS 2.0, use item 1 or 2 if"
  153.          Echo "          you want to use PowerVisor in AmigaDOS 1.3 too)"
  154.         EndIf
  155.     EndIf
  156.  
  157.    Lab EnterChoice2
  158.  
  159.       c/Input "   Enter choice : " env:Choice
  160.  
  161.       If $Choice EQ "0"
  162.          Skip TheEnd
  163.       EndIf
  164.  
  165.       If $Choice EQ "1"
  166.          Skip InSDir
  167.       EndIf
  168.  
  169.       If $Choice EQ "2"
  170.          SetEnv StandardS "1"
  171.          Skip InPVSDir
  172.       EndIf
  173.  
  174.       If $Choice EQ "3"
  175.          SetEnv StandardS "1"
  176.          Skip AskSDir
  177.       EndIf
  178.  
  179.       If $Choice EQ "4"
  180.          setenv SDir s:
  181.          SetEnv StandardS "2"
  182.          Skip DontInstallHelp
  183.       EndIf
  184.  
  185.        Version >NIL: exec.library 36
  186.        If NOT WARN
  187.             If NOT a${CDir}a EQ "a...a"
  188.               If $Choice EQ "5"
  189.                  setenv SDir $CDir
  190.                  Skip InstallHelp
  191.               EndIf
  192.             EndIf
  193.         EndIf
  194.  
  195.       Echo "   Illegal choice!"
  196.       Skip EnterChoice2 back
  197.  
  198.    Lab InSDir
  199.       setenv SDir s:
  200.       Skip InstallHelp
  201.  
  202.    Lab InPVSDir
  203.       SetEnv SDir ${PVName}s
  204.       Skip InstallHelp
  205.  
  206.    Lab AskSDir
  207.       c/Input "   Enter subdirectory for the online help and error files : " env:SDir
  208.  
  209.    Lab InstallHelp
  210.       c/DirName env:SDir
  211.       If NOT EXISTS $SDir
  212.          MakeDir $SDir
  213.       EndIf
  214.       c/DevName env:SDir
  215.  
  216.         SetEnv Source "s/"
  217.         SetEnv Return "Return2"
  218.         SetEnv Arg "Help and error files"
  219.         SetEnv File "PowerVisor-errors"
  220.         Skip CheckFile
  221.         Lab Return2
  222.  
  223.       Copy ${Source}PowerVisor-help ${SDir}PowerVisor-help
  224.       Copy ${Source}PowerVisor-ctrl ${SDir}PowerVisor-ctrl
  225.       Copy ${Source}PowerVisor-errors ${SDir}PowerVisor-errors
  226.       If EXISTS ${SDir}PowerVisor-startup
  227.           Copy >NIL: ${SDir}PowerVisor-startup ${SDir}PowerVisor-startup.bak
  228.           Echo "   Old PowerVisor-startup file renamed to PowerVisor-startup.bak"
  229.       EndIf
  230.       Copy ${Source}PowerVisor-startup ${SDir}PowerVisor-startup
  231.  
  232.        If $Dos20 EQ "1"
  233.           If EXISTS ${SDir}PowerVisor-menus
  234.               Copy >NIL: ${SDir}PowerVisor-menus ${SDir}PowerVisor-menus.bak
  235.               Echo "   Old PowerVisor-menus file renamed to PowerVisor-menus.bak"
  236.           EndIf
  237.           Copy ${Source}PowerVisor-menus ${SDir}PowerVisor-menus
  238.        EndIf
  239.  
  240.       If EXISTS ${SDir}PowerVisor-config
  241.          Skip PVConfigErr
  242.       EndIf
  243.       If EXISTS s:PowerVisor-config
  244.          Lab PVConfigErr
  245.          Echo "   Warning! You already have a PowerVisor-config file !"
  246.          Echo "   If you are installing a new version of PowerVisor it is probably"
  247.          Echo "   better to delete the old PowerVisor-config file. This is because"
  248.          Echo "   the config file is not always compatible (Read the 'ReadThisFirst'"
  249.          Echo "   file to see if there is a difference between this version and the"
  250.          Echo "   previous version)."
  251.          Ask "   Should I delete this file ?"
  252.          If WARN
  253.             Delete >NIL: ${SDir}PowerVisor-config
  254.             Delete >NIL: s:PowerVisor-config
  255.          EndIf
  256.       EndIf
  257.  
  258.       Echo "*n   PowerVisor online help and error files installed in '${SDir}'"
  259.  
  260. Lab DontInstallHelp
  261.  
  262.    Echo "*n--------------------------------------------------------------------"
  263.    Echo "*nDo you want all the examples ?"
  264.    Echo "(All examples are ±30K big)"
  265.    Echo "      0 : abort installation"
  266.    Echo "      1 : yes, I want them (in '${PVName}')"
  267.    Echo "      2 : no, I don't want them"
  268.  
  269.    Lab EnterChoice3
  270.  
  271.       c/Input "   Enter choice : " env:Choice
  272.  
  273.       If $Choice EQ "0"
  274.          Skip TheEnd
  275.       EndIf
  276.  
  277.       If $Choice EQ "1"
  278.          Skip YesExamples
  279.       EndIf
  280.  
  281.       If $Choice EQ "2"
  282.          Skip NoExamples
  283.       EndIf
  284.  
  285.       Echo "   Illegal choice!"
  286.       Skip EnterChoice3 back
  287.  
  288.    Lab YesExamples
  289.       If NOT EXISTS ${PVName}Examples
  290.          MakeDir ${PVName}Examples
  291.       EndIf
  292.       If NOT EXISTS ${PVName}Source
  293.          MakeDir ${PVName}Source
  294.       EndIf
  295.       If NOT EXISTS ${PVName}PowerVisorLib
  296.          MakeDir ${PVName}PowerVisorLib
  297.       EndIf
  298.  
  299.         SetEnv Source "Examples/"
  300.         SetEnv Return "Return3"
  301.         SetEnv Arg "Example files"
  302.         SetEnv File "BuggyProgram"
  303.         Skip CheckFile
  304.         Lab Return3
  305.  
  306.       Copy >NIL: ${Source}#? ${PVName}Examples
  307.  
  308.         SetEnv Source "Source/"
  309.         SetEnv Return "Return4"
  310.         SetEnv Arg "Source files for examples"
  311.         SetEnv File "BuggyProgram.asm"
  312.         Skip CheckFile
  313.         Lab Return4
  314.  
  315.       Copy >NIL: ${Source}#? ${PVName}Source
  316.  
  317.         SetEnv Source "PowerVisorLib/"
  318.         SetEnv Return "Return5"
  319.         SetEnv Arg "PowerVisor library source files"
  320.         SetEnv File "pv_lib.fd"
  321.         Skip CheckFile
  322.         Lab Return5
  323.  
  324.       Copy >NIL: ${Source}#? ${PVName}PowerVisorLib
  325.  
  326.       Echo "*n   Examples installed in '${PVName}Examples'"
  327.  
  328. Lab NoExamples
  329.  
  330.    Echo "*n--------------------------------------------------------------------"
  331.    Echo "*nDo you want all the documentation ?"
  332.    Echo "(All documentation files are ±800K big)"
  333.    Echo "      0 : abort installation"
  334.    Echo "      1 : yes, I want them (in '${PVName}Docs')"
  335.    Echo "      2 : no, I don't want them"
  336.  
  337.    Lab EnterChoice4
  338.  
  339.       c/Input "   Enter choice : " env:Choice
  340.  
  341.       If $Choice EQ "0"
  342.          Skip TheEnd
  343.       EndIf
  344.  
  345.       If $Choice EQ "1"
  346.          Skip YesDocs
  347.       EndIf
  348.  
  349.       If $Choice EQ "2"
  350.          Skip NoDocs
  351.       EndIf
  352.  
  353.       Echo "   Illegal choice!"
  354.       Skip EnterChoice4 back
  355.  
  356.    Lab YesDocs
  357.       If NOT EXISTS ${PVName}Docs
  358.          MakeDir ${PVName}Docs
  359.       EndIf
  360.  
  361.         SetEnv Source "Docs/"
  362.         SetEnv Return "Return6"
  363.         SetEnv Arg "Document files"
  364.         SetEnv File "CommandReference"
  365.         Skip CheckFile
  366.         Lab Return6
  367.  
  368.       Copy >NIL: ${Source}#? ${PVName}Docs
  369.  
  370.       Echo "*n   Documentation installed in '${PVName}Docs'"
  371.  
  372. Lab NoDocs
  373.  
  374.    Echo "*n--------------------------------------------------------------------"
  375.    Echo "*nWhere do you want the PowerVisor script files ?"
  376.    Echo "(Script files are ±60K big)"
  377.    Echo "Note that some of these files are needed by the standard"
  378.    Echo "PowerVisor-startup file"
  379.    Echo "      0 : abort installation"
  380.    Echo "      1 : in the 's:pv' directory (Recommended place !)"
  381.    Echo "      2 : somewhere else"
  382.    Echo "      3 : in the '${PVName}s/pv' directory"
  383.    Echo "      4 : don't install the PowerVisor script files"
  384.  
  385.    Lab EnterChoice5
  386.  
  387.       c/Input "   Enter choice : " env:Choice
  388.  
  389.       If $Choice EQ "0"
  390.          Skip TheEnd
  391.       EndIf
  392.  
  393.       If $Choice EQ "1"
  394.           setenv PDir s:pv
  395.           Skip InstallScripts
  396.       EndIf
  397.  
  398.       If $Choice EQ "2"
  399.           c/Input "   Enter subdirectory for the script files : " env:PDir
  400.           Skip InstallScripts
  401.       EndIf
  402.  
  403.       If $Choice EQ "3"
  404.           If NOT EXISTS ${PVName}s
  405.               MakeDir ${PVName}s
  406.           EndIf
  407.             setenv PDir ${PVName}s/pv
  408.             Skip InstallScripts
  409.       EndIf
  410.  
  411.       If $Choice EQ "4"
  412.          Skip DontInstallScripts
  413.       EndIf
  414.  
  415.       Echo "   Illegal choice!"
  416.       Skip EnterChoice5 back
  417.  
  418.    Lab InstallScripts
  419.       c/DirName env:PDir
  420.       If NOT EXISTS $PDir
  421.          MakeDir $PDir
  422.       EndIf
  423.  
  424.         SetEnv Source "s/pv/"
  425.         SetEnv Return "Return7"
  426.         SetEnv Arg "Script files"
  427.         SetEnv File "db"
  428.         Skip CheckFile
  429.         Lab Return7
  430.  
  431.       Copy >NIL: ${Source}#? ${PDir}
  432.  
  433.       c/DevName env:PDir
  434.       Echo "*n   Script files installed in '${PDir}'"
  435.  
  436. Lab DontInstallScripts
  437.  
  438.    Echo "*n--------------------------------------------------------------------"
  439.    Echo "*nWhere do you want the PowerVisor develop files ?"
  440.    Echo "Note that these files are rather specialized. If you are a novice"
  441.    Echo "PowerVisor user, you won't need them"
  442.    Echo "(Develop files are ±160K big)"
  443.    Echo "      0 : abort installation"
  444.    Echo "      1 : in the '${PVName}PVDevelop' directory"
  445.    Echo "      2 : somewhere else"
  446.    Echo "      3 : don't install the PowerVisor develop files"
  447.  
  448.    Lab EnterChoice7
  449.  
  450.       c/Input "   Enter choice : " env:Choice
  451.  
  452.       If $Choice EQ "0"
  453.          Skip TheEnd
  454.       EndIf
  455.  
  456.       If $Choice EQ "1"
  457.          Skip InPVDevelopDir
  458.       EndIf
  459.  
  460.       If $Choice EQ "2"
  461.          Skip AskDevelopDir
  462.       EndIf
  463.  
  464.       If $Choice EQ "3"
  465.          Skip DontInstallDevelop
  466.       EndIf
  467.  
  468.       Echo "   Illegal choice!"
  469.       Skip EnterChoice7 back
  470.  
  471.    Lab InPVDevelopDir
  472.       setenv DDir ${PVName}PVDevelop
  473.       Skip InstallDevelop
  474.  
  475.    Lab AskDevelopDir
  476.       c/Input "   Enter subdirectory for the develop files : " env:DDir
  477.  
  478.    Lab InstallDevelop
  479.       c/DirName env:DDir
  480.       If NOT EXISTS $DDir
  481.          MakeDir $DDir
  482.       EndIf
  483.       c/DevName env:DDir
  484.  
  485.         SetEnv Source "PVDevelop/"
  486.         SetEnv Return "Return10"
  487.         SetEnv Arg "Develop files"
  488.         SetEnv File "PVDevelop.lzh"
  489.         Skip CheckFile
  490.         Lab Return10
  491.  
  492.       Copy >NIL: ${Source}#? all ${DDir}
  493.  
  494.       Echo "*n   Develop files installed in '${DDir}'"
  495.  
  496. Lab DontInstallDevelop
  497.  
  498.    Echo "*n--------------------------------------------------------------------"
  499.    Echo "*nWhere do you want the PowerVisor library files ?"
  500.    Echo "(Library files are ±1K big)"
  501.    Echo "Note that you PowerVisor really needs these files!"
  502.    Echo "      0 : abort installation"
  503.    Echo "      1 : in the 'libs:' directory (Recommended place !)"
  504.    Echo "      2 : in the '${PVName}libs' directory"
  505.    Echo "      3 : somewhere else"
  506.    Echo "      4 : don't install the PowerVisor library files"
  507.  
  508.    Lab EnterChoice6
  509.  
  510.       c/Input "   Enter choice : " env:Choice
  511.  
  512.       If $Choice EQ "0"
  513.          Skip TheEnd
  514.       EndIf
  515.  
  516.       If $Choice EQ "1"
  517.          Skip InLibsDir
  518.       EndIf
  519.  
  520.       If $Choice EQ "2"
  521.          SetEnv StandardLibs "1"
  522.          Skip InPVLibsDir
  523.       EndIf
  524.  
  525.       If $Choice EQ "3"
  526.          SetEnv StandardLibs "1"
  527.          Skip AskLibsDir
  528.       EndIf
  529.  
  530.       If $Choice EQ "4"
  531.          SetEnv StandardLibs "2"
  532.          Skip DontInstallLibs
  533.       EndIf
  534.  
  535.       Echo "   Illegal choice!"
  536.       Skip EnterChoice6 back
  537.  
  538.    Lab InLibsDir
  539.       setenv LDir libs:
  540.       Skip InstallLibs
  541.  
  542.    Lab InPVLibsDir
  543.       SetEnv LDir ${PVName}libs
  544.       Skip InstallLibs
  545.  
  546.    Lab AskLibsDir
  547.       c/Input "   Enter subdirectory for the library files : " env:LDir
  548.  
  549.    Lab InstallLibs
  550.       c/DirName env:LDir
  551.       If NOT EXISTS $LDir
  552.          MakeDir $LDir
  553.       EndIf
  554.       c/DevName env:LDir
  555.  
  556.         SetEnv Source "Libs/"
  557.         SetEnv Return "Return8"
  558.         SetEnv Arg "Library files"
  559.         SetEnv File "powervisor.library"
  560.         Skip CheckFile
  561.         Lab Return8
  562.  
  563.       Copy ${Source}powervisor.library ${LDir}powervisor.library
  564.  
  565.       Echo "*n   Libraries installed in '${LDir}'"
  566.  
  567. Lab DontInstallLibs
  568.  
  569.     SetEnv Source ""
  570.     SetEnv Return "Return9"
  571.     SetEnv Arg "Readme and bugs files"
  572.     SetEnv File "ReadThisFirst"
  573.     Skip CheckFile
  574.     Lab Return9
  575.  
  576.    Copy ${Source}pv.bugs ${PVName}pv.bugs
  577.    Copy ${Source}pv.bugs.info ${PVName}pv.bugs.info
  578.    Copy ${Source}ReadThisFirst ${PVName}ReadThisFirst
  579.    Copy ${Source}ReadThisFirst.info ${PVName}ReadThisFirst.info
  580.  
  581.    Echo "*n--------------------------------------------------------------------"
  582.    Echo "*nInstallation is complete*n"
  583.    Echo "Notes :*n"
  584.  
  585.    If $StandardS EQ "1"
  586.       Echo "   In order to have online help and readable error messages"
  587.       Echo "   you will have to assign s: to '${SDir}'."
  588.       Echo "   If you have AmigaDOS 2.0 you can use multiple assignes to accomplish this."
  589.       Echo "   Otherwise I recommend that you put the online help and error file in your"
  590.       Echo "   s: directory*n"
  591.    EndIf
  592.    If $StandardS EQ "2"
  593.       Echo "   Note that you have not installed the online help and error files."
  594.       Echo "   This means that you have no online help and that the error messages"
  595.       Echo "   in PowerVisor will be rather unreadable*n"
  596.    EndIf
  597.  
  598.    If $StandardLibs EQ "1"
  599.       Echo "   In order to be able to run PowerVisor you must have powervisor.library"
  600.       Echo "   in your libs: directory. You can assign libs: to '${LDir}'"
  601.       Echo "   or use the AmigaDOS 2.0 multiple assign feature to accomplish this*n"
  602.    EndIf
  603.    If $StandardLibs EQ "2"
  604.       Echo "   Note that you can't run PowerVisor because you have not installed"
  605.       Echo "   the PowerVisor.library*n"
  606.    EndIf
  607.  
  608.    Ask "Press <enter> to continue"
  609.  
  610.    Echo "*n--------------------------------------------------------------------"
  611.    Echo "*nThe standard s/PowerVisor-startup file needs fd: assigned to the"
  612.    Echo "subdirectory containing all fd-files."
  613.    Ask "*nShould I alter your s:Startup-sequence file for you ?"
  614.    If WARN
  615.       c/Input "Where are your fd-files located ? " env:fddir
  616.       c/DirName env:fddir
  617.       c/DirName env:PVName
  618.         echo >ram:test "f /endcli/"
  619.         echo >>ram:test ""
  620.         echo >>ram:test "i"
  621.         echo >>ram:test "assign fd: ${fddir}"
  622.         echo >>ram:test "assign pv: ${PVName}"
  623.         echo >>ram:test "Z"
  624.         echo >>ram:test "w"
  625.         edit >NIL: with ram:test from sys:s/Startup-sequence
  626.         delete >NIL: ram:test
  627.    EndIf
  628.  
  629. Lab TheEnd
  630.  
  631.    Delete >NIL: env:pvname env:fddir env:ddir env:ldir env:cdir env:sdir env:pdir env:choice env:Source env:Arg env:Dir
  632.    Delete >NIL: env:standards env:standardlibs env:Name13 env:Name20 env:Dos13 env:Dos20 env:Return env:File
  633.  
  634.    Ask "*n*n*nEnd of installation! (press <enter>)"
  635.    EndCli >NIL:
  636.  
  637.  
  638. ;Subroutine to check if a file exists
  639. ;Return address is in env:return
  640. ;Arg string is in env:Arg
  641. ;Initial source is in env:Source
  642. ;Initial file is in env:File
  643.  
  644. Lab CheckFile
  645.     If NOT EXISTS ${Source}${File}
  646.         Echo "   Error ! ${Arg} not found in '$Source' !"
  647.         Echo "      0 : abort installation"
  648.         Echo "      1 : enter new source pathname"
  649.         Echo "      2 : directory"
  650.  
  651.         Lab ChoiceCheckFile
  652.            c/Input "   Enter choice : " env:Choice
  653.  
  654.            If $Choice EQ "0"
  655.               Skip TheEnd back
  656.            EndIf
  657.  
  658.            If $Choice EQ "1"
  659.                 c/Input "   Give correct pathname : " env:Source
  660.                 c/DevName env:Source
  661.                 Skip CheckFile back
  662.            EndIf
  663.  
  664.            If $Choice EQ "2"
  665.                c/Input "   Directory name and parameters for 'dir' : " env:Dir
  666.                Dir ${Dir}
  667.                Skip ChoiceCheckFile back
  668.            EndIf
  669.  
  670.            Echo "   Illegal choice!"
  671.            Skip ChoiceCheckFile back
  672.     EndIf
  673.     Skip $Return back
  674.