home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / sbl / sbleval / install.cmd < prev    next >
Encoding:
Text File  |  1993-07-14  |  4.3 KB  |  170 lines

  1. /***********************************************************************
  2.    @ECHO OFF
  3.    ECHO OS/2 Procedures Language 2/REXX not installed.
  4.    ECHO Run Selective Installation from the Setup Folder to
  5.    ECHO install REXX support.
  6.    pause
  7.    exit
  8.  
  9.    Above used to detect if REXX is installed.
  10.  
  11.    usage:
  12.        install [Source] [Dest] [DISK]
  13.            Source - the name of the source directory
  14.            Dest - the name of the destination directory
  15.            DISK - if this parameter is 'DISK', the installation
  16.                   procedure will not create the SBL Folder.
  17.  
  18.        If the destination directory is not specified, the installation
  19.        procedure will query the user for one, providing the \SBLEVAL
  20.        on the boot drive as the default.
  21.        
  22.        If the source directory is not specified, it is assumed to be
  23.        the current directory
  24.  
  25.  
  26.          (C) Copyright Softbridge Inc. 1992
  27.        125 CambridgePark Drive
  28.        Cambridge, MA 02140
  29.        
  30.  
  31. */
  32. parse upper arg Src Dst Disk 
  33.  
  34. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  35. call SysLoadFuncs
  36.  
  37. say '┌────────────────────────────────────────────────────────────────────────┐'
  38. say '│                                                                        │'
  39. say '│                       Softbridge Basic Language                        │'
  40. say '│                         Installation Procedure                         │'
  41. say '│                                                                        │'
  42. say '└────────────────────────────────────────────────────────────────────────┘'
  43.  
  44.  
  45. if Dst = "" then do
  46.     Dst = "?"
  47. end
  48.  
  49. if Dst = "?" then do
  50.     parse value value('COMSPEC',,'OS2ENVIRONMENT') with Dst '\' junk
  51.     Dst = Dst'\SBLEVAL'
  52.     say
  53.     say 'Enter destination for installation: ['Dst'] '
  54.     parse upper pull TDst
  55.     if TDst \= "" then do
  56.         Dst = TDst
  57.     end
  58. end
  59.  
  60. if right(left(Dst, 2), 1) \= ":" then do
  61.     Dst = insert(left(directory(),2), Dst)
  62. end
  63.  
  64. if Src = "" then do
  65.     parse upper value directory() with Src
  66. end
  67.  
  68. if right(Src, 1) = "\" then do
  69.     Src = left(Src, length(Src)-1)
  70. end
  71.  
  72. if right(Dst, 1) = "\" then do
  73.     Dst = left(Dst, length(Dst)-1)
  74. end
  75.  
  76. say 'Copying from 'Src' to 'Dst
  77.  
  78. call CopyFiles '*.dll'
  79. call CopyFiles '*.exe'
  80. call CopyFiles '*.hlp'
  81. call CopyFiles '*.ico'
  82. call CopyFiles '*.sbl'
  83. call CopyFiles '*.txt'
  84. call CopyFiles '*.cmd'
  85. call CopyFiles '*.inf'
  86. call CopyFiles '*.h' 'Ignore'
  87. call CopyFiles '*.lib' 'Ignore'
  88.  
  89. if left(Disk,4) = "DISK" then do
  90.     exit
  91. end
  92.  
  93. classname='WPFolder'
  94. title='SBL Folder'
  95. location='<WP_DESKTOP>'
  96. setup='OBJECTID=<SBL_FOLDER>;'||,
  97.       'ICONFILE='Dst'\SBL.ICO;'
  98. Call BldObj
  99.  
  100. classname='WPProgram'
  101. location='<SBL_FOLDER>'
  102.  
  103. os = value('COMSPEC',,'OS2ENVIRONMENT')
  104. os = left(os, lastpos('\', os)-1)
  105.  
  106. title='Sbl Demo - GCD'
  107. setup='OBJECTID=<SBLDEMO_GCD>;'||,
  108.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  109.       'PARAMETERS=GCD.SBL;'||,
  110.       'PROGTYPE=PM;'
  111. Call BldObj
  112.  
  113. title='Sbl Demo - DIRDEMO'
  114. setup='OBJECTID=<SBLDEMO_DIRDEMO>;'||,
  115.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  116.       'PARAMETERS=DIRDEMO.SBL;'||,
  117.       'PROGTYPE=PM;'
  118. Call BldObj
  119.  
  120. title='Sbl Demo - GREP'
  121. setup='OBJECTID=<SBLDEMO_GREP>;'||,
  122.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  123.       'PARAMETERS=GREP.SBL;'||,
  124.       'PROGTYPE=PM;'
  125. Call BldObj
  126.  
  127. title='Sbl Demo - HELLO'
  128. setup='OBJECTID=<SBLDEMO_HELLO>;'||,
  129.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  130.       'PARAMETERS=HELLO.SBL;'||,
  131.       'PROGTYPE=PM;'
  132. Call BldObj
  133.  
  134. title='Sbl Demo - QUICK'
  135. setup='OBJECTID=<SBLDEMO_QUICK>;'||,
  136.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  137.       'PARAMETERS=QUICK.SBL;'||,
  138.       'PROGTYPE=PM;'
  139. Call BldObj
  140.  
  141. title='SblEdit'
  142. setup='OBJECTID=<SBL_EDIT>;'||,
  143.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  144.       'PROGTYPE=PM;'
  145. Call BldObj
  146.  
  147. title='About SBL'
  148. setup='OBJECTID=<SBL_ABOUT>;'||,
  149.       'EXENAME='os'\view.exe;'||,
  150.       'PARAMETERS='Dst'\SBLEVAL.INF;'||,
  151.       'PROGTYPE=PM;'
  152. Call BldObj
  153.  
  154. Exit
  155.  
  156. BldObj:
  157.     result = SysCreateObject(classname, title, location, setup, 'U')
  158.     Return 
  159.  
  160. CopyFiles:
  161.     parse upper arg FileSpec Ignore
  162.      '@xcopy 'Src'\'FileSpec' 'Dst'\ >nul 2>nul'
  163.     if rc <> 0 then do
  164.         if Ignore = "" then do
  165.             say 'Error returned from XCOPY.'
  166.             exit
  167.         end
  168.     end
  169.     return
  170.