home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor3.zip / VNDINST / FRNTENDS / 123G-FLG / FLGRUN.CMD < prev    next >
OS/2 REXX Batch file  |  1996-04-04  |  4KB  |  111 lines

  1. /******************************************************************
  2. Description:    Lotus FL/G Execution Exec.
  3.  
  4. Details:        This exec is used to run FL/G.
  5.  
  6.                 This exec assigns the LOTUSLOT license alias
  7.                 then starts FL/G.
  8.  
  9. Dependencies:
  10.    Externals:   RXUTILS.DLL - Part of VENDOR package.
  11.                 GIME.EXE    - Part of VENDOR package.
  12.                 HIDEWIN.EXE - Part of VENDOR package.
  13.    Drive(s):    None
  14.    Directories: All DLL and EXE files in same directory.
  15.    Window Type: FS/WIN
  16.    App Title:   Lotus FLG
  17.  
  18. Last Updated:   7/27/92
  19. ******************************************************************/
  20.  
  21. '@echo off'
  22. trace 'o'
  23.  
  24. /** Give header **/
  25. say
  26. say ' LOTUS Freelance Graphics'
  27. say ' ------------------------'
  28. say
  29.  
  30. /** Setup Miscellaneous Variables **/
  31. call RxFuncAdd 'RXCLS',    'RXUTILS', 'RXCLS'
  32. call RxFuncAdd 'RXGREP',   'RXUTILS', 'RXGREP'
  33. call RxFuncAdd 'RXPAUSE',  'RXUTILS', 'RXPAUSE'
  34. call RxFuncAdd 'RXOS2INI', 'RXUTILS', 'RXOS2INI'
  35. parse source . . filespec        /* Get the drive, dir and name of  exec   */
  36. LicAlias='LOTUSLOT'              /* Don't touch this one                   */
  37. Env='OS2ENVIRONMENT'             /* Set the REXX environment variable      */
  38. olddir=directory()               /* Get current directory                  */
  39. pdir=GetPersonal()               /* Get personal Lotus dir var if  exists  */
  40. Inst123G = RxOS2Ini( , '123G_FLG', 'INSTALL_123G')
  41. InstFLG  = RxOS2Ini( , '123G_FLG', 'INSTALL_FLG')
  42.  
  43. /** If Personal directory not in CONFIG.SYS then exit error **/
  44. if pdir='' then do
  45.  say d2c(7)||d2c(7)
  46.  say ' Cannot determine LOTUS Personal Directory.  Please run the'
  47.  say ' installation program for this package then try again.'; say
  48.  'pause'
  49.  'exit'
  50. end
  51.  
  52. /***********************************************************
  53. ** Assign License Drive:                                  **
  54. ** Replace this section of code with NET USE if your site **
  55. ** does not wish to use GIME.                             **
  56. ***********************************************************/
  57. say ' Initializing LOTUS License Drive...'
  58. do queued(); pull .; end
  59. 'gime 'LicAlias' | RXQUEUE'
  60. parse upper pull 'THE NETNAME ' . ' ASSIGNED TO DRIVE ' drive
  61. if drive='' then do
  62.   say d2c(7)
  63.   say ' Error assigning LOTUS License Drive.'
  64.   say ' Please contact an OS/2 Consultant.'; say
  65.   'pause'
  66.   'exit'
  67. end
  68.  
  69. /** Setup new path **/
  70. call value 'DPATH', drive';'value('DPATH', ,Env), Env
  71.  
  72. /** Setup new directory to run from location of this exec **/
  73. call directory left(filespec, lastpos('\', filespec)-1)
  74.  
  75. /** Start the program **/
  76. if Package<>'QUIT' then do
  77.   say
  78.   say ' LOTUS FL/G is starting.  Please wait...'
  79.   say
  80.   say ' Please do not terminate this session.  It will be hidden'
  81.   say ' automatically...'
  82.   'START HIDEWIN /D=20 Lotus FL/G'
  83.   'FLG presentation'
  84. end
  85.  
  86. /** Drop the license drive (don't have a COW if this fails) **/
  87. say ' Exiting...'
  88. call directory olddir
  89. 'gime 'LicAlias' /d>nul'
  90. 'exit'
  91.  
  92. /************************************************************
  93. ** GetPersonal()                                           **
  94. **                                                         **
  95. ** Returns the Lotus Personal Env Var as specified in      **
  96. ** the CONFIG.SYS.  This is needed as the user may change  **
  97. ** this and we would rather not force a reboot to activate **
  98. ** it.                                                     **
  99. **                                                         **
  100. ** Also sets the current LOTUSPERSONAL to that set in the  **
  101. ** CONFIG.SYS (JIC).                                       **
  102. ************************************************************/
  103. GetPersonal:
  104.  if RxGrep('SET LOTUSPERSONAL=',RxBootDrive()'\CONFIG.SYS', 'grep')=0 then
  105.    if grep.0>0 then
  106.      pdir=space(substr(grep.1, pos('=', grep.1)+1))
  107.    else
  108.      pdir=''
  109.  call value 'LOTUSPERSONAL', pdir, Env
  110. return pdir
  111.