.K test
.bra {
.ket }


if not Exists libs:ARP.Library
   echo "*Ec*N City Desk 2.0 requires the ARP.Library in you LIBS: directory*N"
   ask -dy "Shall I copy ARP.Library (v34.1) to LIBS:?  Y" 
   if warn                               ; No, don't copy ARP.library v34.1
      skip ConfirmNoARP
   else                                  ; Yes, Copy ARP.library to libs:
      skip CopyARP.lib
   endif
else
   lab CheckVersion
      failat 21
      version >nil: arp.library 34       ; Check to see if ARP.library is loaded
         if error                        ; ARP.library NOT loaded
            loadlib libs:ARP.library     ; load it,
            skip CheckVersion BACK       ; and check again
         else                            ; ARP.library is loaded
            version >nil: arp.library 34   ; see if v34 or higher
            if warn                      ;Not v34 or higher
               echo "*N City Desk 2.0 requires Version 34.1 or higher of ARP.library"
               echo " the version you have is less than v34. Shall I copy version 34.1
               ask -dY "into you LIBS: directory?  Y"
               if warn                   ; No don't copy ARP.library v34.1
               lab ConfirmNoARP
                  echo "*Ec*N <<<<<<<<<< WARNING >>>>>>>>>>"
                  echo " City Desk will NOT run without ARP.Library Version 34.1 or higher"
                  echo " Please confirm that you do NOT want ARP.library version 34.1*N copied into LIBS:"     
                  echo "*N -->1) YES, DO copy ARP.Library Version 34.1 into my LIBS Directory"
                  echo "*N    2) NO,  Do NOT copy ARP.Library Version 34.1 into my LIBS Directory"
                  echo "*N Please choose an option by typing its number. Then press Return ?" NOLINE
                  setenv >NIL: Choice{$$} ?

                  lab Evaluate Choice{$$}
                     if $Choice{$$} EQ 1 VAL            ; did they pick 1?
                        echo "*N Glad you came to your senses!!!"
                        skip copyARP.lib
                     endif 

                     if $Choice{$$} EQ 2 VAL            ; did they pick 2?
                        echo "*N OK have it you way. I will not copy ARP.Library version 34.1 into LIBS:"
                        echo "*N Remember...*N City Desk 2.0 will NOT run without ARP.Library (v34.1 or higher) in LIBS:"
                        skip aftercopy
                     endif

                     ; They have typed in somthing other than 1 or 2
                     echo "*N*NYou must type in a either 1 or 2"
                     wait
                     skip ConfirmNoARP BACK
               endif      

               lab copyARP.lib   
                  echo "Copying ARP.library to LIBS:"
                  copy  cdbat:ARP.library   to LIBS: CLONE QUIET
            else                                       ; Is version 34 or Higher
               Skip AfterCopy
            endif
         endif
endif

;echo "*Ec*N ARP.Library (v34.1 or higher) found in your LIBS: directory..." NOLINE

lab AfterCopy 
