home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / pmhuneng.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  2001-09-13  |  1KB  |  50 lines

  1. /* A PMszótár telepítôprogramja */
  2. /* 2001.09.12.                  */
  3.  
  4. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  5. call sysloadfuncs
  6.  
  7. say
  8. say 'This script installs PMszótár/Ez a szkript telepíti a PMszótárt'
  9. say 'CTRL-C = abort/megszakít, Enter continue/folytat'
  10. '@pause>nul'
  11.  
  12. say
  13. say 'Please select a language/Válasszon nyelvet!'
  14. call sysfiletree 'readme.*', 'tmp.', 'FO'
  15. j=0
  16. do i=1 to tmp.0
  17.     if translate(filespec('name',tmp.i)) <> 'README.TXT' then do
  18.         j=j+1
  19.         lang.j = substr(tmp.i, lastpos('.', tmp.i)+1)
  20.         say j'. 'lang.j
  21.     end
  22. end
  23.  
  24. pull response
  25. if datatype(response) <> 'NUM' | response < 1 | response > j then do
  26.     say 'Invalide response/Érvénytelen válasz'
  27.     exit 1
  28. end
  29.  
  30. rcode = 0
  31. say
  32. say 'Copying files/Fájlok másolása folyik...'
  33. '@copy readme.'lang.response' readme.txt'
  34. if rc <> 0 then rcode = 1
  35. '@copy pmszotar.'lang.response' pmszotar.rsf'
  36. if rc <> 0 then rcode = 2
  37.  
  38. say
  39. say 'Creating icon/Ikonkészítás...'
  40. path = directory()
  41. rc = SysCreateObject("WPProgram", "PMszótár 0.93 ("lang.response")", "<WP_DESKTOP>", "OBJECTID=<PMSZOTAR>;EXENAME="path"\PMSZOTAR.EXE", "R")
  42. if rc <> 1 then rcode = 3
  43.  
  44. say
  45. say 'Checking installation/Telepítés ellenôrzése...'            
  46. if rcode <> 0 then 
  47.     say 'Installation unsuccesful/A telepítés nem sikerült (rc='rcode')!'
  48. else 
  49.     say 'Succesfully installed/A telepítés sikerült!'
  50.