@ECHO OFF
ECHO ÿ
ECHO ***********************************************************
ECHO * Chips And Technologies OS/2 Display Driver Installation * 
ECHO *                  VERSION 3.2.3                          *
ECHO *   Supports Chips And Technologies 65545,65548 VL Bus    * 
ECHO *            Flat Panel VGA/SVGA Controller               *
ECHO ***********************************************************
IF .%2. == .. GOTO USAGE
IF NOT EXIST %1\*.DSC GOTO USAGE
IF NOT EXIST %2\OS2\INSTALL GOTO USAGE
SET LOG=%2\OS2\INSTALL\CTINSTL.LOG
ECHO OS/2 3.0 Display Driver Installation for CT65545/65548 VL  >%LOG%
ECHO VERSION 3.2.3  >>%LOG%
%1\TESTVER >>%LOG%
IF ERRORLEVEL 302 GOTO VER_ERR
IF ERRORLEVEL 300 GOTO VER_WARP
IF ERRORLEVEL 211 GOTO VER_2X
IF ERRORLEVEL 210 GOTO VER_2X
GOTO VER_ERR
:VER_2X
IF EXIST %2\OS2\INSTALL\DSPINSTL.211 GOTO COPYINST
IF EXIST %2\OS2\INSTALL\DSPINSTL.EXE COPY %2\OS2\INSTALL\DSPINSTL.EXE %2\OS2\INSTALL\DSPINSTL.211 >NUL
:COPYINST
COPY %1\DSPINSTL.EXE %2\OS2\INSTALL >NUL
:VER_WARP
IF EXIST %2\OS2\INSTALL\CHIPS545.DSC DEL %2\OS2\INSTALL\CHIPS545.DSC >NUL
COPY %1\*.DSC %2\OS2\INSTALL\*.DSC >NUL
IF EXIST %2\OS2\SVGA.ESV GOTO COPYOK1
IF EXIST %2\OS2\SVGA.EXE COPY %2\OS2\SVGA.EXE %2\OS2\*.ESV >NUL
:COPYOK1
COPY %1\SVGA.EXE %2\OS2 >NUL
IF EXIST %2\OS2\SCREEN01.SSV GOTO COPYOK2
IF EXIST %2\OS2\SCREEN01.SYS COPY %2\OS2\SCREEN01.SYS %2\OS2\*.SSV >NUL
:COPYOK2
ATTRIB %2\OS2\SCREEN01.SYS -R
COPY %1\SCREEN01.SYS %2\OS2 >NUL
IF EXIST %2\OS2\DLL\SVGA.DSV GOTO COPYOK3
IF EXIST %2\OS2\DLL\SVGA.DLL COPY %2\OS2\DLL\SVGA.DLL %2\OS2\DLL\*.DSV >NUL
:COPYOK3
COPY %1\SVGA.DLL %2\OS2\DLL\SVGA.DLL >NUL
COPY %1\CHIPS.SYS %2\OS2 >NUL
%1\SETLBA %2\OS2\CHIPS
COPY %1\VSVGA.SYS %2\OS2\MDOS >NUL
ECHO *********************************************************
ECHO * Installation of system files is complete.             *
ECHO *    SHUTDOWN and then restart your system.             *
ECHO *    Run Selective Install to install new video driver. *
ECHO *********************************************************
ECHO Installation of system files is complete.              >>%LOG%
GOTO END
:VER_ERR
ECHO ÿ
ECHO Error: This driver is intended for OS/2 Version 3.01, 3.00, 2.11 or 2.10 only !
ECHO Error: This driver is intended for OS/2 Version 3.01, 3.00, 2.11 or 2.10 only >> %LOG%
GOTO END
:USAGE
ECHO ÿ
ECHO Usage: INSTALL [INSTALLDRIVE:] [BOOTDRIVE:] 
ECHO Usage: INSTALL [INSTALLDRIVE:] [BOOTDRIVE:] >> %LOG% 
:END
