home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / vdial323.zip / install.cmd next >
OS/2 REXX Batch file  |  1999-01-31  |  3KB  |  105 lines

  1. /* Install of VoiceDialer/2 */
  2.  
  3. call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
  4. call SysLoadFuncs
  5.  
  6. CALL SysCls
  7.  
  8. say 'Rexx Installer for Vdial/2'
  9. say '--------------------------------------------'
  10. say
  11. say '   Installation...'
  12. say
  13. say '   copies files to destination directory'
  14. say '   creates folder and objects on desktop'
  15. say
  16.  
  17. /* Ask Directory */
  18.  
  19. say 'Enter target directory (e.g.: C:\VDIAL):'
  20. say '(<return> = current directory, object creation only, no copy operation)'
  21. PARSE PULL InstDir
  22. InstDir = STRIP(InstDir, 'T', '\')
  23.  
  24. IF InstDir="" THEN
  25.  DO
  26.    InstDir=directory()
  27.    SIGNAL MakeIcons
  28.  END
  29.  
  30. /* Create Directory */
  31. say
  32. say '--------------------------------------------'
  33. say 'creating directories'
  34. say '--------------------------------------------'
  35.  
  36. if InstDir <> "." then
  37.    DO
  38.      call SysFileTree InstDir, "SearchDir", "D"
  39.      if SearchDir.0 = 0 then do
  40.          rc = SysMkDir(InstDir)
  41.             if rc <> 0 then do
  42.                  say "Error: Cannot create directory!" InstDir
  43.                  exit
  44.             end
  45.      end
  46. end
  47.  
  48. /* Copy files */
  49. say
  50. say '--------------------------------------------'
  51. say 'copying files'
  52. say '--------------------------------------------'
  53.  
  54. '@Copy Vdialer2.exe 'InstDir'\Vdialer2.exe'
  55. '@Copy VDIALGER.INF 'InstDir'\VDIALGER.INF'
  56. '@Copy VDIALENG.INF 'InstDir'\VDIALENG.INF'
  57. '@Copy VDIALFOLD1.ICO 'InstDir'\VDIALFOLD1.ICO'
  58. '@Copy VDIALFOLD2.ICO 'InstDir'\VDIALFOLD2.ICO'
  59.  
  60. MakeIcons:
  61. /* Make icons */
  62. say
  63. say '--------------------------------------------'
  64. say 'creating icons on your desktop'
  65. say '--------------------------------------------'
  66.  
  67. mydir=Directory()
  68.  
  69. classname = 'WPFolder'
  70. title     = 'Voice^Dial'
  71. location  = '<WP_DESKTOP>'
  72. icon1     = mydir||'\VDIALFOLD1.ico'
  73. icon2     = mydir||'\VDIALFOLD2.ico'
  74. icon      = 'ICONFILE='icon1||';ICONNFILE=1,'||icon2
  75. folderid  = '<VDIAL2_FOLDER>'
  76. setup     = 'OBJECTID='||folderid||';'||icon||':ICONVIEW=FLOWED'
  77. rc        = SysCreateObject(classname, title, location ,setup,'U')
  78.  
  79. classname = 'WPProgram'
  80. title     = 'ENGLISH INFORMATION'
  81. location  = '<VDIAL2_FOLDER>'
  82. INFNAME   = InstDir||'\VDIALENG.INF'  
  83. WorkDir   = InstDir
  84. setup     = 'OBJECTID=<VDIALENG>;EXENAME=VIEW.EXE;PARAMETERS='||INFNAME||';STARTUPDIR='||Workdir
  85. rc        = SysCreateObject(classname, title, location ,setup,'U')
  86.  
  87. classname = 'WPProgram'
  88. title     = 'GERMAN INFORMATION'
  89. location  = '<VDIAL2_FOLDER>'
  90. INFNAME   = InstDir||'\VDIALGER.INF' 
  91. WorkDir   = InstDir
  92. setup     = 'OBJECTID=<VDIALGER>;EXENAME=VIEW.EXE;PARAMETERS='||INFNAME||';STARTUPDIR='||Workdir
  93. rc        = SysCreateObject(classname, title, location ,setup,'U')
  94.  
  95. classname = 'WPProgram'
  96. title     = 'VoiceDial/2'
  97. location  = '<VDIAL2_FOLDER>'
  98. exename   = 'EXENAME='||InstDir||'\vdialer2.exe'
  99. WorkDir   = InstDir
  100. setup     = 'OBJECTID=<VDIAL2_PROGRAM>; STARTUPDIR='||InstDir||';STARTUPDIR='||Workdir||';'||exename
  101. rc        = SysCreateObject(classname, title, location, setup, 'U')
  102.  
  103. say
  104. say 'Ready.'
  105.