home *** CD-ROM | disk | FTP | other *** search
- /* Setup.cmd */
-
- /* $Revision: 1.10 $ */
- /* $Date: 1996/07/02 14:58:52 $ */
-
- PARSE ARG arg1
-
- /* Load RexxUtil functions if not loaded */
- WeLoadedRxFnc=0
- if rxfuncquery('SysLoadFuncs') <> 0 then
- do
- /* Load RexxUtil functions */
- call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
- call SysLoadFuncs
- WeLoadedRxFnc=1
- end
-
- /* Clear screen */
- rv = SysCls()
-
- /*Check for setup.cmd */
- rc = SysFileTree("setup.cmd", stem, 'O')
- IF stem.0 = 0 THEN
- SIGNAL err
- say ' '
- say ' '
- say 'Loading...'
- say ' '
- say ' '
-
- /* How much space is needed */
- required = 100000
-
- /* Get TMP environment variable */
- tempvar = VALUE('TMP',,'OS2ENVIRONMENT')
- IF tempvar = ' ' THEN
- DO
- tempvar = SysSearchPath('PATH', os2.ini)
- tempvar = left(tempvar, 3)
- flag = 1
- END
-
- /* Get the OS/2 boot drive */
- PARSE VALUE tempvar WITH drive':'path
- drive = drive || ':'
-
- /* Get available drive space */
- drivestring = SysDriveInfo(drive)
- PARSE VALUE drivestring WITH,
- drive_name,
- drive_free,
- drive_used,
- drive_vol
-
- /* Check if enough disk space */
- IF drive_free < required THEN
- DO
- say ' '
- say ' '
- say ' '
- say 'ERROR: Not enough free space for temporary setup files.'
- say ' '
- say 'Setup requires ' || required || ' bytes for temporary setup files'
- say 'and found ' || drive_free || ' bytes available. Please free up some '
- say 'additional disk space on drive ' || drive || ', or point the TMP '
- say 'environment variable in your CONFIG.SYS file to a drive '
- say 'with more space and then reboot.'
- say ' '
- say 'Once the problem has been corrected run SETUP again.'
- SIGNAL Cleanup
- END
- ELSE
- DO
- '@echo off'
- Commandline = "setup2.exe"
- IF arg1 = ' ' THEN
- NOP
- ELSE
- Commandline = Commandline 'y' arg1
- Commandline
- szFileSpec = tempvar || '\hasetup.hlp'
-
- /* Wait until hasetup.hlp is deleted by InstallSheild */
- DO Forever
- rc = SysSleep(1)
- rc = SysFileTree(szFileSpec, 'stem')
- if stem.0 = 0 THEN
- LEAVE
- END
-
- Delete:
- rc = SysSleep(10)
- if flag <> 1 THEN
- DO
- Commandline = 'del' tempvar || '\~ins0363.~mp'
- Commandline
- Commandline = 'del' tempvar || '\~ins0463.~mp'
- Commandline
- Commandline = 'del' tempvar || '\setup.dll'
- Commandline
- Commandline = 'del' tempvar || '\install.log'
- Commandline
- Commandline = 'del' tempvar || '\~ins0163.~mp'
- Commandline
- END
- rv = SysCls()
- signal cleanup
-
- END
-
- Err:
- /* if not in installation directory */
- rc = SysCls()
- say ' '
- say ' '
- say ' '
- say ' '
- SAY 'Please log onto the drive that contains the HyperACCESS for OS/2'
- say 'installation files and type SETUP'
- SAY ' '
- SIGNAL Cleanup
-
- Cleanup:
- /* if we loaded the REXX Utility Package drop it */
- if WeLoadedRxFnc = 1 then
- call SysDropFuncs
-
- EXIT
-
-