home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************
- @ECHO OFF
- ECHO OS/2 Procedures Language 2/REXX not installed.
- ECHO Run Selective Installation from the Setup Folder to
- ECHO install REXX support.
- pause
- exit
-
- Above used to detect if REXX is installed.
-
- usage:
- install [Source] [Dest] [DISK]
- Source - the name of the source directory
- Dest - the name of the destination directory
- DISK - if this parameter is 'DISK', the installation
- procedure will not create the SBL Folder.
-
- If the destination directory is not specified, the installation
- procedure will query the user for one, providing the \SBLEVAL
- on the boot drive as the default.
-
- If the source directory is not specified, it is assumed to be
- the current directory
-
-
- (C) Copyright Softbridge Inc. 1992
- 125 CambridgePark Drive
- Cambridge, MA 02140
-
-
- */
- parse upper arg Src Dst Disk
-
- call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
- call SysLoadFuncs
-
- say '┌────────────────────────────────────────────────────────────────────────┐'
- say '│ │'
- say '│ Softbridge Basic Language │'
- say '│ Installation Procedure │'
- say '│ │'
- say '└────────────────────────────────────────────────────────────────────────┘'
-
-
- if Dst = "" then do
- Dst = "?"
- end
-
- if Dst = "?" then do
- parse value value('COMSPEC',,'OS2ENVIRONMENT') with Dst '\' junk
- Dst = Dst'\SBLEVAL'
- say
- say 'Enter destination for installation: ['Dst'] '
- parse upper pull TDst
- if TDst \= "" then do
- Dst = TDst
- end
- end
-
- if right(left(Dst, 2), 1) \= ":" then do
- Dst = insert(left(directory(),2), Dst)
- end
-
- if Src = "" then do
- parse upper value directory() with Src
- end
-
- if right(Src, 1) = "\" then do
- Src = left(Src, length(Src)-1)
- end
-
- if right(Dst, 1) = "\" then do
- Dst = left(Dst, length(Dst)-1)
- end
-
- say 'Copying from 'Src' to 'Dst
-
- call CopyFiles '*.dll'
- call CopyFiles '*.exe'
- call CopyFiles '*.hlp'
- call CopyFiles '*.ico'
- call CopyFiles '*.sbl'
- call CopyFiles '*.txt'
- call CopyFiles '*.cmd'
- call CopyFiles '*.inf'
- call CopyFiles '*.h' 'Ignore'
- call CopyFiles '*.lib' 'Ignore'
-
- if left(Disk,4) = "DISK" then do
- exit
- end
-
- say 'Files have been copied'
- say ' '
- say 'Building the SBL Folder in the DevCon Folder'
-
- classname='WPFolder'
- title='SBL Folder'
- location='<DEVCON_OS2_FOLDER>'
- setup='OBJECTID=<SBL_FOLDER>;'||,
- 'ICONFILE='Dst'\SBL.ICO;'
- Call BldObj
-
- classname='WPProgram'
- location='<SBL_FOLDER>'
-
- os = value('COMSPEC',,'OS2ENVIRONMENT')
- os = left(os, lastpos('\', os)-1)
-
- title='Sbl Demo - GCD'
- setup='OBJECTID=<SBLDEMO_GCD>;'||,
- 'EXENAME='Dst'\SBLEDIT.EXE;'||,
- 'PARAMETERS=GCD.SBL;'||,
- 'PROGTYPE=PM;'
- Call BldObj
-
- title='Sbl Demo - DIRDEMO'
- setup='OBJECTID=<SBLDEMO_DIRDEMO>;'||,
- 'EXENAME='Dst'\SBLEDIT.EXE;'||,
- 'PARAMETERS=DIRDEMO.SBL;'||,
- 'PROGTYPE=PM;'
- Call BldObj
-
- title='Sbl Demo - GREP'
- setup='OBJECTID=<SBLDEMO_GREP>;'||,
- 'EXENAME='Dst'\SBLEDIT.EXE;'||,
- 'PARAMETERS=GREP.SBL;'||,
- 'PROGTYPE=PM;'
- Call BldObj
-
- title='Sbl Demo - HELLO'
- setup='OBJECTID=<SBLDEMO_HELLO>;'||,
- 'EXENAME='Dst'\SBLEDIT.EXE;'||,
- 'PARAMETERS=HELLO.SBL;'||,
- 'PROGTYPE=PM;'
- Call BldObj
-
- title='Sbl Demo - QUICK'
- setup='OBJECTID=<SBLDEMO_QUICK>;'||,
- 'EXENAME='Dst'\SBLEDIT.EXE;'||,
- 'PARAMETERS=QUICK.SBL;'||,
- 'PROGTYPE=PM;'
- Call BldObj
-
- title='SblEdit'
- setup='OBJECTID=<SBL_EDIT>;'||,
- 'EXENAME='Dst'\SBLEDIT.EXE;'||,
- 'PROGTYPE=PM;'
- Call BldObj
-
- title='About SBL'
- setup='OBJECTID=<SBL_ABOUT>;'||,
- 'EXENAME='os'\view.exe;'||,
- 'PARAMETERS='Dst'\SBLEVAL.INF;'||,
- 'PROGTYPE=PM;'
- Call BldObj
-
- Exit
-
- BldObj:
- result = SysCreateObject(classname, title, location, setup, 'U')
- Return
-
- CopyFiles:
- parse upper arg FileSpec Ignore
- '@xcopy 'Src'\'FileSpec' 'Dst'\ >nul 2>nul'
- if rc <> 0 then do
- if Ignore = "" then do
- say 'Error returned from XCOPY.'
- exit
- end
- end
- return
-