.key dest,Flag/k
.bra {
.ket }
.def dest SYS
failat 21
;
; CopyData3.bat
;  FLAGS     FILES
;-----------------------------------------
;  Du5       Du5 DirUtil
;
;  SFont     HP_SoftFonts
;


lab StartData3
If {Flag} EQ "Du5"
   type 'CopyDu5.txt
   ask -dY " Copy Du5 Utility ? Y"
   if warn                   ; no, dont copy Du5
      skip END
   endif                     ; yes, Check for Data3 Disk
      skip InsertData3
endif

;If {Flag} EQ "SFont"
   type 'CopySFont.txt
   ask -dY " Copy the SoftFonts for HP LaserJet compatible printers ? Y"
   if warn                   ; no, dont copy SFonts
      skip END
   endif                     ; yes, Check for Data1 Disk


lab InsertData3
   assign >nil: Data3: exists             ; check if they put disk in
   if warn                                ; No Disk, Ask for it
      echo "*N Please insert Data3 Disk and press Return to continue"
      ask  -dy " or type N and Return to cancel and go back to Menu "

         ; if typed "n" then, go to END
         ;
         ; if typed "y" or return then check for disk
         ; if disk not found then ask again
         ; if disk is found then skip to CopyToWhere

      if  warn                            ; no, SKip to end
         skip END
      endif                               ; Yes, continue
         skip InsertData3 BACK            ; go back and check for disk again
   endif                                  ; Data3 Disk is available


If {Flag} EQ "Sfont"
   skip Sfont
endif

; If {Flag} EQ "du5" continue

lab Du5

;*********************************************
;*                                           *
;*               Copy Du5                    *
;*                                           *
;*********************************************

if {dest} eq "SYS"
   echo "*Ec*N Where shall I put the Du5?"
   echo "*N -->1) SYS:CityDesk"
   echo "*N    2) SYS:"
   echo "*N    3) I was only joking, I really don't want to copy Du5"
   echo "*N Please choose an option by typing its number. Then press Return ?" NOLINE
   setenv >NIL: Choice{$$} ?
      if $Choice{$$} EQ 1 VAL
         Skip 3
      endif
      if $Choice{$$} EQ 2 VAL
         Skip 4
      endif
      if $Choice{$$} EQ 3 VAL
         Skip 5
      endif
         skip FUBAR
else
   echo "*Ec*N Where shall I put the Du5?"
   echo "*N -->1) {dest}:CityDesk"
   echo "*N    2) {dest}:"
   echo "*N    3) SYS:CityDesk"
   echo "*N    4) SYS:"
   echo "*N    5) Forget it, I don't want to copy the Du5"
   echo "*N Please choose an option by typing its number. Then press Return ?" NOLINE
   setenv >NIL: Choice{$$} ?
endif

lab eval_Choice{$$}
   if $Choice{$$} EQ 1 VAL                   ; Copy Du5Utility to {dest}:CityDesk
      if not exists {dest}:CityDesk
         makedir {dest}:CityDesk
         copy cdbat:Drawer.icon to {dest}:CityDesk.info CLONE QUIET
      endif
      assign Whereto: {dest}:CityDesk        ; WhereTo: used as variable when copying
      echo "*NCopying the Du5 to {dest}:CityDesk..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 2 VAL                   ; Copy Du5Utility to {dest}:
      assign Whereto: {dest}:                ; WhereTo: used as variable when copying
      echo "*NCopying the Du5 to {dest}:..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 3 VAL                   ; Copy Du5Utility to SYS:CityDesk
   lab 3
      if not exists SYS:CityDesk
         makedir SYS:CityDesk
         copy cdbat:Drawer.icon to SYS:CityDesk.info CLONE QUIET
      endif
      assign Whereto: SYS:CityDesk           ; WhereTo: used as variable when copying
      echo "*NCopying the Du5 to SYS:CityDesk..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 4 VAL                   ; Copy Du5Utility to SYS:
   lab 4
      assign Whereto: SYS:                   ; WhereTo: used as variable when copying
      echo "*NCopying the Du5 to SYS:..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 5 VAL                   ; abort copy
   lab 5
      Echo "*NOk, I won't copy the Du5 Directory Utility"
      Skip END
   endif

   ; They typed in something other than the 1-3 or 1-5
   lab FUBAR
      if {dest} EQ "SYS"
         echo "*N You must type in a number between 1 and 3"
      else
         echo "*N You must type in a number between 1 and 5"
      endif
         wait 1
         skip Du5 BACK

lab Copy_Files
 ;skip debug
   copy Data3:DirUtil5               to Whereto: CLONE QUIET
   copy Data3:DU5                    to Whereto: CLONE QUIET
   copy cdbat:Du5.icon               to Whereto:DU5.info CLONE QUIET
   copy CDBat:IconX                  to Whereto: CLONE QUIET
 lab Debug
   echo  "*N*N Du5 has been copied"
   skip End


lab SFont

;*********************************************
;*                                           *
;*           CopyHPSoftFonts                 *
;*                                           *
;*********************************************

if {dest} eq "SYS"
   echo "*Ec*N Where shall I put the HP LaserJet SoftFont files?"
   echo "*N -->1) SYS:CityDesk"
   echo "*N    2) SYS:"
   echo "*N    3) I was only joking, I really don't want to copy laser stuff"
   echo "*N Please choose an option by typing its number. Then press Return ?" NOLINE
   setenv >NIL: Choice{$$} ?
      if $Choice{$$} EQ 1 VAL
         Skip 3
      endif

      if $Choice{$$} EQ 2 VAL
         Skip 4
      endif

      if $Choice{$$} EQ 3 VAL
         Skip 5
      endif
         skip FUBAR
else
   echo "*Ec*N Where shall I put the HP LaserJet SoftFont files?"
   echo "*N -->1) {dest}:CityDesk"
   echo "*N    2) {dest}:"
   echo "*N    3) SYS:CityDesk"
   echo "*N    4) SYS:"
   echo "*N    5) Forget it, I don't want to copy the HP LaserJet SoftFont files"
   echo "*N Please choose an option by typing its number. Then press Return ?" NOLINE
   setenv >NIL: Choice{$$} ?
endif

lab eval_Choice{$$}
   if $Choice{$$} EQ 1 VAL                   ; Copy HPSoftFont to {dest}:CityDesk
      if not exists {dest}:CityDesk
         makedir {dest}:CityDesk
         copy cdbat:drawer.icon to {dest}:CityDesk.info CLONE QUIET
      endif
      assign Whereto: {dest}:CityDesk        ; WhereTo: used as variable when copying
      echo "*NCopying the HP LaserJet SoftFont files to {dest}:CityDesk..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 2 VAL                   ; Copy HPSoftFont to {dest}:
      assign Whereto: {dest}:                ; WhereTo: used as variable when copying
      echo "*NCopying the HP LaserJet SoftFont files to {dest}:..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 3 VAL                   ; Copy HPSoftFont to SYS:CityDesk
   lab 3
      if not exists SYS:CityDesk
         makedir SYS:CityDesk
         copy cdbat:drawer.icon to SYS:CityDesk.info CLONE QUIET
      endif
      assign Whereto: SYS:CityDesk           ; WhereTo: used as variable when copying
      echo "*NCopying the HP LaserJet SoftFont files to SYS:CityDesk..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 4 VAL                                     ; Copy HPSoftFont to SYS:
   lab 4
      assign Whereto: SYS:                   ; WhereTo: used as variable when copying
      echo "*NCopying the HP LaserJet SoftFont files to SYS:..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 5 VAL                   ; abort copy
   lab 5
      Echo "*NOK, I wont copy the SoftFonts for HP LaserJet Compatible Printers"
      Skip END
   endif

   ; They typed in something other than the 1-3 or 1-5
   lab FUBAR
      if {dest} EQ "SYS"
         echo "*N You must type in a number between 1 and 3"
      else
         echo "*N You must type in a number between 1 and 5"
      endif
         wait 1
         skip SFont BACK

lab Copy_Files
;skip debug
   Copy Data3:HP_SoftFonts                to Whereto:HP_SoftFont  ALL CLONE QUIET
   Copy cdbat:drawer.icon                 to Whereto:HP_SoftFont.info CLONE QUIET
lab Debug
   echo  "*N*N All the HP LaserJet SoftFont files have been copied"
skip End


lab END
   Echo "*NPlease wait for Menu..." NOLINE
