@if "%1"=="" goto usage
@if "%2"=="" goto usage
@echo - Cirrus Logic 256 colors display driver installation for OS/2 2.0...
@echo -
@echo - Before installing the Cirrus Logic drivers, you'll need to boot
@echo - from a DOS diskette or ESC out of the OS/2 2.0 installation diskette
@echo - one to run this script file.  Type Control-C to abort the execution
@echo - of the script file.
@echo -
@pause
@rem ---------------------------------------------------------------------
@echo - saving original files . . .

@if exist %1:\os2\screen01._cl           goto sav1
@if exist %1:\os2\screen01.sys copy %1:\os2\screen01.sys %1:\os2\screen01._cl >nul

:sav1
@if exist %1:\os2\screen02._cl           goto sav2
@if exist %1:\os2\screen02.sys copy %1:\os2\screen02.sys %1:\os2\screen02._cl >nul

:sav2
@if exist %1:\os2\svga._cl               goto sav3
@if exist %1:\os2\svga.exe copy %1:\os2\svga.exe %1:\os2\svga._cl >nul

:sav3
@if exist %1:\os2\dll\bvhsvga._cl        goto sav4
@if exist %1:\os2\dll\bvhsvga.dll copy %1:\os2\dll\bvhsvga.dll %1:\os2\dll\bvhsvga._cl >nul

:sav4
@if exist %1:\os2\dll\ibmdev32._cl       goto sav5
@if exist %1:\os2\dll\ibmdev32.dll copy %1:\os2\dll\ibmdev32.dll %1:\os2\dll\ibmdev32._cl >nul

:sav5
@if exist %1:\os2\dll\ibmvga32._cl       goto sav6
@if exist %1:\os2\dll\ibmvga32.dll copy %1:\os2\dll\ibmvga32.dll %1:\os2\dll\ibmvga32._cl >nul

:sav6
@if exist %1:\os2\mdos\vsvga._cl         goto sav7
@if exist %1:\os2\mdos\vsvga.sys copy %1:\os2\mdos\vsvga.sys %1:\os2\mdos\vsvga._cl >nul

:sav7
@rem ---------------------------------------------------------------------

:dsk2
@echo - please insert display driver diskette two
@pause
@if not exist os2_2 goto dsk2

@if %2==6 goto 600
@if %2==7 goto 768
@copy sv480256.dll  %1:\os2\dll\ibmdev32.dll >nul
@goto inst

:600
@copy sv600256.dll  %1:\os2\dll\ibmdev32.dll >nul
@goto inst

:768
@copy sv768256.dll  %1:\os2\dll\ibmdev32.dll >nul

:inst
@echo - please insert display driver diskette one
@pause
@if not exist os2_1 goto inst

@if exist %1:\os2\screen01.sys copy screen01.sys %1:\os2 >nul
@if exist %1:\os2\screen02.sys copy screen02.sys %1:\os2 >nul
@copy svga.exe          %1:\os2 >nul
@copy bvhsvga.dll       %1:\os2\dll  >nul
@copy ibmvga32.dll      %1:\os2\dll  >nul
@copy vsvga.sys         %1:\os2\mdos >nul

@echo -
@echo - Before rebooting to OS/2 for the new drivers to take effect...
@echo -
@echo - 1. please edit OS/2's config.sys file with the following settings
@echo -
@echo -    set video_devices=vio_SVGA
@echo -    set vio_SVGA=device(bvhvga,BVHSVGA)
@echo -    device=c:\os2\mdos\VSVGA.SYS
@echo -
@echo - 2. if you booted from a DOS disk to install the drivers, type
@echo -    \OS2\SVGA ON DOS to write svgadata.dos in the current directory,
@echo -    then copy svgadata.dos to \os2\svgadata.pmi
@echo -
@echo - 3. if you ESCaped out of the OS/2 2.0 installation diskette one to
@echo -    install the drivers, you'll need to reboot to OS/2 first, then
@echo -    bring up a DOS full screen session, type \OS2\SVGA ON to create
@echo -    the svgadata.pmi file, type exit at the command prompt, shutdown
@echo -    the system and reboot to OS/2 again
@echo -
@goto home

:usage
@echo *------------------------------------------------------------------*
@echo * Cirrus Logic SVGA installation for OS/2 2.0...                   *
@echo *==================================================================*
@echo *                                                                  *
@echo * Please specify the drive letter for the files to be copied to... *
@echo * and the vertical display resolution of choice...                 *
@echo *                                                                  *
@echo *    640 x 480 x 256 ---- type 4 (default)                         *
@echo *    800 x 600 x 256 ---- type 6                                   *
@echo *   1024 x 768 x 256 ---- type 7                                   *
@echo *                                                                  *
@echo * example: cli25620 c 7                                            *
@echo * meaning: install Cirrus Logic 1024x768x256 driver on drive C,    *
@echo *          the OS/2 drive                                          *
@echo *                                                                  *
@echo *------------------------------------------------------------------*

:home

