home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor3.zip / VNDINST / FRNTENDS / OBVISION / PACKRUN.CMD < prev   
OS/2 REXX Batch file  |  1996-04-04  |  4KB  |  107 lines

  1. /******************************************************************
  2. Description:    ObjectVision Run Exec
  3.  
  4. Details:        This exec is used to run the ObjectVision program.
  5.  
  6.                 It checks to see if the Local.Directory exists.
  7.                 If it doesn't the user is told to run the install.
  8.                 It also checks to make sure that OS/2 2.0 is
  9.                 running.  The the Vendor path is added to the PATH
  10.                 statement, which is recommended in the README.TXT
  11.                 file.
  12.  
  13. Dependencies:
  14.    Externals:   RXUTILS.DLL - Part of VENDOR package.
  15.                 HIDEWIN.EXE - Part of VENDOR package.
  16.    Drive(s):    none
  17.    Directories:
  18.    Window Type: FS/WIN
  19.    App Title:   ObjectVision
  20.  
  21. Last Updated    10/1/92
  22. ******************************************************************/
  23. '@ECHO OFF'
  24. trace 'o'
  25.  
  26. call RxFuncAdd 'RXDIREXIST',  'RXUTILS', 'RXDIREXIST'
  27. call RxFuncAdd 'RXMKDIR',     'RXUTILS', 'RXMKDIR'
  28. call RxFuncAdd 'RXOS2INI',    'RXUTILS', 'RXOS2INI'
  29. call RxFuncAdd 'RXPAUSE',     'RXUTILS', 'RXPAUSE'
  30. call RxFuncAdd 'RXOS2VER',    'RXUTILS', 'RXOS2VER'
  31.  
  32. /* Give header */
  33. say
  34. say ' ObjectVision Run exec'
  35. say ' ---------------------'
  36. say
  37.  
  38. /* Parse args */
  39. parse source . . exec
  40. path=left(exec, lastpos('\', exec))
  41. drive=left(path,2)
  42. Env = 'OS2ENVIRONMENT'
  43.  
  44. /*****************************************/
  45. /** Determine if OS/2 2.0 is being used **/
  46. /*****************************************/
  47.  
  48. if (RxOS2Ver() < 2.0) then do
  49.   say
  50.   say d2c(7)|| ' Error!'
  51.   say 'ObjectVision requires OS/2 2.0 or later in order to'
  52.   say 'run.  It will not run on earlier versions of OS/2.'
  53.   say
  54.   call RxPause 'Press any key to exit.'
  55.   'exit 10'
  56. end /* do */
  57.  
  58. /***************************************************************************/
  59. /** Check if Local Directory exists, if not tell user to run installation **/
  60. /***************************************************************************/
  61.  
  62. Local.Directory = RxOS2Ini(, 'Directories', 'ObjectVision')
  63. if rxDirExist(Local.Directory)=0 then do
  64.    say
  65.    say d2c(7)|| ' Local ObjectVision directory not set.'
  66.    say ' You must run the installation program.'
  67.    say
  68.    call RxPause 'Press any key to exit'
  69.    'exit 10'
  70. end  /* Do */
  71.  
  72. /****************************************************/
  73. /** Give message about using ObjectVision programs **/
  74. /****************************************************/
  75.  
  76. say
  77. say ' If you want to use the the sample and demo programs that'
  78. say ' come with ObjectVision you will have to run them from the'
  79. say ' SAMPLE subdirectory in your 'Local.Directory' directory.'
  80. say ' If you try to run them from the Vendor drive ObjectVision'
  81. say ' may hang and require that it be closed and restarted.  If'
  82. say ' you did not initially choose to have these programs copied'
  83. say ' locally, you can re-run the install program to copy them.'
  84. say
  85. call RxPause
  86.  
  87. /*********************************************/
  88. /** Add ObjectVision path to PATH statement **/
  89. /** recommended in README.TXT file          **/
  90. /*********************************************/
  91.  
  92. call value 'PATH',  path';'||value('PATH',,Env), Env
  93.  
  94. /** Run ObjectVision **/
  95. say
  96. say ' Starting ObjectVision...'
  97. say
  98. say ' Please wait a moment while it is loaded.'
  99. say '   ( This may take more than a minute )'
  100. say
  101. say ' Local directory = 'Local.Directory
  102. say
  103. say ' Once ObjectVision has started this window will be hidden.'
  104. 'START HIDEWIN /D=20 ObjectVision'
  105. 'vision'
  106. 'exit'
  107.