home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 April / PCO0499.ISO / filesbbs / os2 / nftp150o.arj / NFTP150O.ZIP / install.cmd < prev    next >
Encoding:
Text File  |  1999-02-06  |  2.3 KB  |  90 lines

  1. /* REXX */
  2.  
  3. /* Load RexxUtil extensions */
  4. if RxFuncQuery("SysLoadFuncs") then do
  5.     say "loading RexxUtil extensions..."
  6.     call RxFuncAdd "SysLoadFuncs","RexxUtil","SysLoadFuncs"
  7.     if result \= "0" then do
  8.         say "error loading RexxUtil.dll"
  9.         exit
  10.     end
  11.     call SysLoadFuncs
  12. end
  13.  
  14. /* ask user about directories etc. */
  15. Call SysCls
  16. say
  17. say "NFTP Version 1.50 installation"
  18. say
  19. say "This script will do the following:"
  20. say "1) copy required files into the directory you specified;"
  21. say "2) create objects on your desktop"
  22. say
  23. say "Enter destination directory (where NFTP files will be installed)."
  24. say "WARNING: this must be HPFS drive (to support long filenames)."
  25. say "If you wish to install NFTP into the subtree (eg, ""d:\apps\tcpip\nftp"")"
  26. say "you have to create upper directory first (""d:\apps\tcpip"" in the"
  27. say "above example). Enter ""."" to install into the current directory."
  28. say "Empty line entered will abort installation."
  29. say
  30. parse pull destpath .
  31. if destpath = "" then exit
  32.  
  33. destpath = strip(destpath, "T", "\")
  34. dlpath = strip(dlpath, "T", "\")
  35.  
  36. /* verify choices */
  37. call SysCls
  38. say "Installing NFTP into the directory :" destpath
  39. say
  40. say "Press Ctrl-C to abort or any other key to continue"
  41. say
  42. '@pause >nul'
  43. Call SysCls
  44.  
  45. /* creating target directories if necessary */
  46. if destpath <> "." then
  47. do
  48.     call SysFileTree destpath, "srch", "D"
  49.     if srch.0 = 0 then do
  50.         rc = SysMkDir(destpath)
  51.         if rc <> 0 then do
  52.             say "Fatal error: cannot create directory" destpath
  53.             exit
  54.         end
  55.     end
  56.     call SysFileTree destpath"\nls", "srch", "D"
  57.     if srch.0 = 0 then do
  58.         rc = SysMkDir(destpath"\nls")
  59.         if rc <> 0 then do
  60.             say "Fatal error: cannot create directory" destpath"\nls"
  61.             exit
  62.         end
  63.     end
  64. end
  65.     
  66. /* copying NFTP files */
  67. if destpath <> "." then
  68. do
  69.     '@copy * 'destpath' >nul'
  70.     '@copy 'destpath'\*.nls 'destpath'\nls\ >nul'
  71.     '@copy 'destpath'\*.mnu 'destpath'\nls\ >nul'
  72.     '@del 'destpath'\*.nls' destpath'\*.mnu'
  73.     say "Files were copied to" destpath
  74. end
  75.  
  76. if destpath = "." then destpath = directory()
  77. if dlpath = "." then dlpath = directory()
  78.  
  79. '@pause'
  80. Call SysCls
  81.  
  82. call makeobjs destpath
  83.  
  84. /* looks like we're done... */
  85. say
  86. say "Installation complete."
  87. say
  88. '@pause'
  89. Exit
  90.