home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / install / sblinst.cmd < prev    next >
Encoding:
Text File  |  1993-11-06  |  4.4 KB  |  174 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. say 'Files have been copied'
  94. say '   '
  95. say 'Building the SBL Folder in the DevCon Folder'
  96.  
  97. classname='WPFolder'
  98. title='SBL Folder'
  99. location='<DEVCON_OS2_FOLDER>'
  100. setup='OBJECTID=<SBL_FOLDER>;'||,
  101.       'ICONFILE='Dst'\SBL.ICO;'
  102. Call BldObj
  103.  
  104. classname='WPProgram'
  105. location='<SBL_FOLDER>'
  106.  
  107. os = value('COMSPEC',,'OS2ENVIRONMENT')
  108. os = left(os, lastpos('\', os)-1)
  109.  
  110. title='Sbl Demo - GCD'
  111. setup='OBJECTID=<SBLDEMO_GCD>;'||,
  112.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  113.       'PARAMETERS=GCD.SBL;'||,
  114.       'PROGTYPE=PM;'
  115. Call BldObj
  116.  
  117. title='Sbl Demo - DIRDEMO'
  118. setup='OBJECTID=<SBLDEMO_DIRDEMO>;'||,
  119.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  120.       'PARAMETERS=DIRDEMO.SBL;'||,
  121.       'PROGTYPE=PM;'
  122. Call BldObj
  123.  
  124. title='Sbl Demo - GREP'
  125. setup='OBJECTID=<SBLDEMO_GREP>;'||,
  126.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  127.       'PARAMETERS=GREP.SBL;'||,
  128.       'PROGTYPE=PM;'
  129. Call BldObj
  130.  
  131. title='Sbl Demo - HELLO'
  132. setup='OBJECTID=<SBLDEMO_HELLO>;'||,
  133.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  134.       'PARAMETERS=HELLO.SBL;'||,
  135.       'PROGTYPE=PM;'
  136. Call BldObj
  137.  
  138. title='Sbl Demo - QUICK'
  139. setup='OBJECTID=<SBLDEMO_QUICK>;'||,
  140.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  141.       'PARAMETERS=QUICK.SBL;'||,
  142.       'PROGTYPE=PM;'
  143. Call BldObj
  144.  
  145. title='SblEdit'
  146. setup='OBJECTID=<SBL_EDIT>;'||,
  147.       'EXENAME='Dst'\SBLEDIT.EXE;'||,
  148.       'PROGTYPE=PM;'
  149. Call BldObj
  150.  
  151. title='About SBL'
  152. setup='OBJECTID=<SBL_ABOUT>;'||,
  153.       'EXENAME='os'\view.exe;'||,
  154.       'PARAMETERS='Dst'\SBLEVAL.INF;'||,
  155.       'PROGTYPE=PM;'
  156. Call BldObj
  157.  
  158. Exit
  159.  
  160. BldObj:
  161.     result = SysCreateObject(classname, title, location, setup, 'U')
  162.     Return
  163.  
  164. CopyFiles:
  165.     parse upper arg FileSpec Ignore
  166.          '@xcopy 'Src'\'FileSpec' 'Dst'\ >nul 2>nul'
  167.     if rc <> 0 then do
  168.         if Ignore = "" then do
  169.             say 'Error returned from XCOPY.'
  170.             exit
  171.         end
  172.     end
  173.     return
  174.