Metropoli BBS
VIEWER: install.cmd MODE: TEXT (ASCII)
/* */


call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
call SysCls


parse upper arg srcdisk dstdisk .

parse source . . command .

command = FILESPEC( 'Name', command )

i = POS( '.', command )

if i <> 0 then

   command = substr( command, 1, i - 1 )


if srcdisk = '' then

   do

      say d2c(27)'[1;40;33m'
      say 'Usage:' command 'Source Target'
      say
      say '        Where:'
      say '               Source is the source Disk to the SVGA Driver directory.'
      say '               e.g. A:'
      say
      say '               Target is the Disk where the Driver has been installed.    '
      say '               e.g. C:'d2c(27)'[0;40;37m'
      exit

   end

bksrc.1 = 'MDOS\VSVGA.SYS'
bksrc.2 = 'MDOS\VVGA.SYS'
bksrc.3 = 'SVGA.EXE'
bksrc.4 = 'SVGADATA.PMI'
bksrc.5 = 'SCREEN01.SYS'
bksrc.6 = 'SCREEN02.SYS'
bksrc.7 = 'DLL\IBMGPMI.DLL'
bksrc.8 = 'DLL\IBMDEV32.DLL'
bksrc.9 = 'DLL\IBMVGA32.DLL'
bksrc.10 = 'DLL\BVHVGA.DLL'
bksrc.11 = 'DLL\BVHSVGA.DLL'

bksrc.0 = 11

bkdst.1 = 'VSVGA.SYS'
bkdst.2 = 'VVGA.SYS'
bkdst.3 = 'SVGA.EXE'
bkdst.4 = 'SVGADATA.PMI'
bkdst.5 = 'SCREEN01.SYS'
bkdst.6 = 'SCREEN02.SYS'
bkdst.7 = 'IBMGPMI.DLL'
bkdst.8 = 'IBMDEV32.DLL'
bkdst.9 = 'IBMVGA32.DLL'
bkdst.10 = 'BVHVGA.DLL'
bkdst.11 = 'BVHSVGA.DLL'

copyfile.1 = 'OS2\SVGA.EXE'
copyfile.2 = 'OS2\SVGADATA.PMI'
copyfile.3 = 'OS2\MDOS\VSVGA.SYS'
copyfile.4 = 'OS2\MDOS\VVGA.SYS'
copyfile.5 = 'OS2\INSTALL\PSALI.DSC'
copyfile.6 = 'OS2\VIDEO.CFG'

copyfile.0 = 6

say d2c(27)'[1;40;32m' 
say '* Avance Logic, Inc.'
say '*'
say '* OS/2 Support Files Installation...'
say '*'
say '* Making back up copies of OS/2 Video Virtual Drivers.'
say '* You may get a few warning messages if this installation has been'
say '* done before.  Please disregard those messages.'
say '*'
say '*'
say '*'
say '* You are about to begin installation of driver support files.'
say '*'d2c(27)'[1;40;37m'
'@pause'

Call SysFileTree dstdisk':\OS2\MDOS\AVANCEBK',dirs,'DO'
if dirs.0 = 0 then
  do
      '@MD'  dstdisk':\OS2\MDOS\AVANCEBK >NUL'
      say 'Backup Files'd2c(27)'[1;40;33m'
      do i = 1 to bksrc.0
         say dstdisk':\OS2\'bksrc.i
         '@COPY' dstdisk':\OS2\'bksrc.i' 'dstdisk':\OS2\MDOS\AVANCEBK\'bkdst.i' >NUL'
      end
  end  
say d2c(27)'[1;40;37m'
say 'Recover Files'd2c(27)'[1;40;31m'
do i = 1 to copyfile.0
   say srcdisk':'copyfile.i
   '@COPY' srcdisk':'copyfile.i' 'dstdisk':\'copyfile.i' >NUL'
   if rc <> 0 then DO
        say d2c(27)'[0;40;37m'
        say 'Cannot copy 'srcdisk':'copyfile.i' to 'dstdisk':\'copyfile.i
        exit
   end
end
say d2c(27)'[0;40;37m'
/* Code    */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
/* '@echo off' */
PMMPEGPATH = DIRECTORY()
if SysCreateObject("WPProgram","Display Driver Install","<WP_DESKTOP>",0,
                   "PROGTYPE=PM;EXENAME=C:\OS2\INSTALL\DSPINSTL.EXE;STARTUPDIR=C:\OS2\INSTALL;ASSOCFILTER=*.*")
then
    say
'@dspinstl'
   if rc <> 0 then DO
        say d2c(27)'[0;40;37m'
        say 'Cannot Install ALI Display Driver to OS/2 system.'
        exit
   end
say 'Driver Support files installed successfully.'
[ RETURN TO DIRECTORY ]