home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / prtgr22.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1996-05-10  |  3KB  |  86 lines

  1. /************************************************************************
  2. *  Project     : PRTGRAPH                                               *
  3. *  Module      : REXX Library                                           *
  4. *  Filename    : install.cmd              Author  : Peter Kanis         *
  5. *************************************************************************
  6. *                                                                       *
  7. *  (c) ADD Consulting  All Rights Reserved                              *
  8. *                                                                       *
  9. *************************************************************************/
  10.  
  11. '@echo off'
  12. address cmd
  13.  
  14. /***** Find out where we are ********************************************/
  15.  
  16. parse source s1 s2 s3
  17.  
  18. s1 = filespec( 'D', s3)
  19. s2 = filespec( 'P', s3)
  20.  
  21. p = pos( '\', s2)
  22. lp = lastpos( '\', s2)
  23.  
  24. if lp <> p then
  25.     instpath =  s1 || substr( s2, 1, lp)
  26. else
  27.     instpath =  s1 || s2
  28.  
  29. /***** Find the boot drive for installation *****************************/
  30.  
  31. set_path = VALUE( 'PATH', , 'OS2ENVIRONMENT');
  32. bootdrive = substr( set_path, pos( '\OS2\SYSTEM', set_path ) -2, 2);
  33.  
  34. dllpath = bootdrive || '\OS2\APPS\DLL'
  35. bkpath = bootdrive || '\OS2\BOOK'
  36. exepath = bootdrive || '\OS2\APPS'
  37. bmppath = bootdrive || '\OS2\BITMAP'
  38.  
  39. 'cls'
  40.  
  41. say 'Installation for PRTGRAPH REXX library'
  42. say '(c)1995, 1996 ADD Consulting (CH)'
  43. say ''
  44.  
  45. say 'The DLL will be installed in' dllpath 'OK (Y/N)'
  46. pull ans
  47. ans = translate( ans);
  48. if ans <> 'Y' then do
  49.     say 'Enter the path to install the DLL'
  50.     pull dllpath
  51. end
  52. say 'The programming guide book will be installed in' bkpath 'OK (Y/N)'
  53. pull ans
  54. ans = translate( ans);
  55. if ans <> 'Y' then do
  56.     say 'Enter the path to install the book'
  57.     pull bkpath
  58. end
  59. say 'The Demo will be installed in' exepath 'OK (Y/N)'
  60. pull ans
  61. ans = translate( ans);
  62. if ans <> 'Y' then do
  63.     say 'Enter the path to install the Demo'
  64.     pull exepath
  65. end
  66.  
  67. 'copy' instpath || 'prtgraph.dll' dllpath
  68. 'copy' instpath || 'prtgraph.inf' bkpath
  69. 'copy' instpath || 'prtrdemo.exe' exepath
  70. 'copy' instpath || 'addlogo.bmp' bmppath
  71.  
  72. say 'PRTGRAPH wass successfully installed'
  73. say ''
  74. say 'You will need to copy the VX-REXX project files'
  75. say 'to the path of your choice'
  76.  
  77. exit
  78.  
  79. /************************************************************************/
  80. /*                                                                      */
  81. /*                         (c) ADD Consulting 1996                      */
  82. /*                                                                      */
  83. /*                               END OF FILE.                           */
  84. /*                                                                      */
  85. /************************************************************************/
  86.