/***************************************************************************/
/*                                                                         */
/* Copyright (c) 1995 SiS Corp. Setup Utility                              */
/*                                                                         */
/***************************************************************************/

Trace 'O'
Address CMD
'@ECHO ON'

/**************/
/* Initialize */
/**************/
Call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
Call sysloadfuncs

toolpath = ''
bootdrive = Substr(Translate(Value('PATH',,'OS2ENVIRONMENT')),Pos('\OS2\SYSTEM',Translate(Value('PATH',,'OS2ENVIRONMENT')))-2,2)
tooldrive = bootdrive
toolpath=tooldrive||"\SISDRV"


Say " *------------------------------------------------------------------*"
Say " * SiS Inc. SVGA installation for OS/2 2.1...                       *"
Say " *==================================================================*"
Say " *                                                                  *"
Say " * This installation program will make a directory in boot drive.   *"
Say " * example: md c:\sisdrv                                            *"
Say " *                                                                  *"
Say " *------------------------------------------------------------------*"
"md" ""||bootdrive||"\sisdrv  "

Say ""
Say " Copy Files ...........Please Wait"

'@ECHO OFF'
"copy svga.exe"  ""||bootdrive||"\os2 > NUL"
"copy frate2.exe" ""||bootdrive||"\os2  > NUL"
"copy ddc.exe" ""||bootdrive||"\os2  > NUL"

"copy" "*.* "||toolpath||"\*.* > NUL "
"copy" ""||toolpath||"\sis.in@ "||bootdrive||"\os2\sis.ini > NUL"
"md" ""||toolpath||"\temp > NUL"
""||bootdrive||""
"cd" ""||toolpath||"\temp > NUL"
""||bootdrive||"\os2\unpack ..\s768256.dl@ > NUL "
""||bootdrive||"\os2\unpack ..\ibmvga32.dl@ > NUL"
""||bootdrive||"\os2\unpack ..\bvhsvga.dl@ > NUL "
""||bootdrive||"\os2\unpack ..\vga256.dr@  > NUL "
""||bootdrive||"\os2\unpack ..\vga64k.dr@  > NUL"
""||bootdrive||"\os2\unpack ..\vga16m.dr@  > NUL"
""||bootdrive||"\os2\unpack ..\vga256s.dr@ > NUL"
""||bootdrive||"\os2\unpack ..\vga64ks.dr@ > NUL"
""||bootdrive||"\os2\unpack ..\vga16ms.dr@ > NUL"
""||bootdrive||"\os2\unpack ..\vsvga.sy@   > NUL"
"cd .. > NUL"


/* call sis.cmd to setup the sis icon */
/* 12/18/95 */
/* for fix the problem of Janpanese OS/2 version first install icon error */
If tooldrive <> '' Then Do
  Call SysCreateObject 'WPProgram', 'SiS Setup','<WP_DESKTOP>','OBJECTID=<TK_SISDRV>;EXENAME='||toolpath||'\notebook.exe;PROGTYPE=PM;ICONFILE='||toolpath||'\sis.ico','R'
End


if "%1"=="" then
""||toolpath||"\sissetup"
else
""||toolpath||"\sissetup %1 %2 %3 %4"

"del "||toolpath||"\temp\*.drv  > NUL"
"del "||toolpath||"\temp\*.dll  > NUL"
"del "||toolpath||"\temp\*.sys  > NUL"
"rd temp > NUL"

'@ECHO ON'
Say ""
Say ""
Say " *---------------------------------------------------------------------*"
Say " * This program will now create a icon for SiS SVGA Display Driver and *"
Say " * its identified components on your desktop.                          *"
Say " *                                                                     *"
Say " * If you want to change resolution, please run system icon of System  *"
Say " * Setup Group in PM or run the SiS Setup icon after reboot.           *"
Say " *---------------------------------------------------------------------*"

