@ECHO OFF
IF .%3. == .NOWIN.                                 GOTO NOWIN
IF .%3. == .nowin.                                 GOTO NOWIN
:BIGWINDISK
ECHO.
ECHO ******************************************************************
ECHO *  Please, insert the disk "BigWin drivers for Windows"          *
ECHO ******************************************************************
ECHO Press any key when ready or Ctrl-C to quit. . .
PAUSE >NUL
IF NOT EXIST %1\V7SETUP.EXE                        GOTO BIGWINDISK
ECHO.
ECHO ******************************************************************
ECHO *  Loading files, Please wait.....                               *
ECHO ******************************************************************
ECHO.
ECHO. >> %2\OS2\INSTALL\DISPLAY.LOG
ECHO V7 Installation log file for 16M >> %2\OS2\INSTALL\DISPLAY.LOG
ECHO Installing BigWin files >> %2\OS2\INSTALL\DISPLAY.LOG
IF EXIST  %2\OS2\MDOS\WINOS2\BIGTEMP               GOTO TEMPEXIST
MD %2\OS2\MDOS\WINOS2\BIGTEMP
:TEMPEXIST
IF EXIST  %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP        GOTO TEMPEXIST2
MD %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP
:TEMPEXIST2
COPY %1\SPVHOOK.DLL %2\OS2\MDOS\WINOS2\BIGTEMP                            >NUL
COPY %1\VGALOGO.LGO %2\OS2\MDOS\WINOS2\BIGTEMP                            >NUL
COPY %1\VGALOGO.RLE %2\OS2\MDOS\WINOS2\BIGTEMP                            >NUL
COPY %1\V7START.DLL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                     >NUL
COPY %1\S3VGA.2GR   %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                     >NUL
COPY %1\VDDS3.386   %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                     >NUL
COPY %1\S3VGA.3GR   %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                     >NUL
COPY %1\*.EXE %2\OS2\MDOS\WINOS2\BIGTEMP                                  >NUL
COPY %1\*.DRV %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                           >NUL
COPY %1\*.FNT %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                           >NUL
COPY %1\*.FON %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                           >NUL
COPY %1\*.ENG %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                           >NUL
IF NOT EXIST %1\V7FLIC.DLL GOTO NODLL
COPY %1\V7FLIC.DLL %2\OS2\MDOS\WINOS2\BIGTEMP                             >NUL
:NODLL
IF NOT EXIST %1\*.FLC GOTO NOFLC
COPY %1\*.FLC %2\OS2\MDOS\WINOS2\BIGTEMP                                  >NUL
:NOFLC
IF NOT EXIST %1\*.FRA GOTO NOFRA
COPY %1\*.FRA %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                           >NUL
:NOFRA
IF NOT EXIST %1\*.GER GOTO NOGER
COPY %1\*.GER %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                           >NUL
:NOGER
IF NOT EXIST %1\*.ITA GOTO NOITA
COPY %1\*.ITA %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                           >NUL
:NOITA
IF NOT EXIST %1\*.SPA GOTO NOSPA
COPY %1\*.SPA %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP                           >NUL
:NOSPA

%2\OS2\INSTALL\DOSEXP %1 %2

DEL %2\OS2\MDOS\WINOS2\BIGTEMP\SPVHOOK.DLL                                >NUL
DEL %2\OS2\MDOS\WINOS2\BIGTEMP\VGALOGO.LGO                                >NUL
DEL %2\OS2\MDOS\WINOS2\BIGTEMP\VGALOGO.RLE                                >NUL
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\V7START.DLL                         >NUL
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\S3VGA.2GR                           >NUL
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\VDDS3.386                           >NUL
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\S3VGA.3GR                           >NUL
DEL %2\OS2\MDOS\WINOS2\BIGTEMP\*.EXE                                      >NUL
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\*.DRV                               >NUL
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\*.FNT                               >NUL
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\*.FON                               >NUL
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\*.ENG                               >NUL
IF NOT EXIST %1\V7FLIC.DLL GOTO NODLL1
DEL %2\OS2\MDOS\WINOS2\BIGTEMP\V7FLIC.DLL                                 >NUL
:NODLL1
IF NOT EXIST %1\*.FLC GOTO NOFLC1
DEL %2\OS2\MDOS\WINOS2\BIGTEMP\*.FLC                                      >NUL
:NOFLC1
IF NOT EXIST %1\*.FRA GOTO NOFRA1
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\*.FRA                               >NUL
:NOFRA1
IF NOT EXIST %1\*.GER GOTO NOGER1
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\*.GER                               >NUL
:NOGER1
IF NOT EXIST %1\*.ITA GOTO NOITA1
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\*.ITA                               >NUL
:NOITA1
IF NOT EXIST %1\*.SPA GOTO NOSPA1
DEL %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP\*.SPA                               >NUL
:NOSPA1
RD %2\OS2\MDOS\WINOS2\SYSTEM\BIGTEMP
RD %2\OS2\MDOS\WINOS2\BIGTEMP
COPY %2\OS2\MDOS\WINOS2\SYSTEM\*.ENG %2\OS2\MDOS\WINOS2\*.TCO             >NUL
IF NOT .%3. == ..                                  GOTO NOWIN
:BIGBLUEDISK
ECHO.
ECHO ******************************************************************
ECHO *  Please, insert the disk "BigBlue for V7-MIRAGE"               *
ECHO ******************************************************************
ECHO Press any key when ready or Ctrl-C to quit. . .
PAUSE >NUL
:NOWIN
IF NOT EXIST %1\BIGBS38.DL_                        GOTO BIGBLUEDISK
ECHO.
ECHO ******************************************************************
ECHO *  Loading files, Please wait.....                               *
ECHO ******************************************************************
ECHO.
ECHO Installing BigBlue files >> %2\OS2\INSTALL\DISPLAY.LOG
%2\OS2\ATTRIB -R %2\OS2\*.* /S                                     1>NUL 2>NUL
:START
IF EXIST %2\OS2\V7UTIL.SAV                         GOTO NEXT1
IF NOT EXIST %2\OS2\V7UTIL.EXE                     GOTO NEXT1
COPY %2\OS2\V7UTIL.EXE %2\OS2\V7UTIL.SAV                                  >NUL
:NEXT1
IF EXIST %2\OS2\SCREEN0?.SAV                       GOTO NEXT2
IF NOT EXIST %2\OS2\SCREEN0?.SYS                   GOTO NEXT2
COPY %2\OS2\SCREEN0?.SYS %2\OS2\SCREEN0?.SAV                              >NUL
:NEXT2
IF EXIST %2\OS2\INSTALL\WINSUP.IAM                 GOTO NEXT4
IF EXIST %2\OS2\INSTALL\DSPINSTL.SAV               GOTO NEXT3
IF NOT EXIST %2\OS2\INSTALL\DSPINSTL.EXE           GOTO NEXT3
COPY %2\OS2\INSTALL\DSPINSTL.EXE %2\OS2\INSTALL\DSPINSTL.SAV              >NUL
:NEXT3
IF EXIST %2\OS2\INSTALL\RSPDSPI.SAV                GOTO NEXT4
IF NOT EXIST %2\OS2\INSTALL\RSPDSPI.EXE            GOTO NEXT4
COPY %2\OS2\INSTALL\RSPDSPI.EXE %2\OS2\INSTALL\RSPDSPI.SAV                >NUL
:NEXT4
%2\OS2\UNPACK %1\TOOLS            %2\OS2\INSTALL                          >NUL
%2\OS2\UNPACK %1\V7ACTION.DL_     %2\OS2\DLL                              >NUL
%2\OS2\UNPACK %1\DDICO.EX_        %2\OS2\INSTALL                          >NUL
%2\OS2\UNPACK %1\DSPINSTL.IC_     %2\OS2\INSTALL                          >NUL
COPY          %1\PSV7MIR.DSC      %2\OS2\INSTALL                          >NUL
%2\OS2\UNPACK %1\V7UTIL.EX_       %2\OS2                                  >NUL
%2\OS2\UNPACK %1\VBE              %2\OS2                                  >NUL

%2\OS2\INSTALL\VBETOGDC %2
%2\OS2\UNPACK %1\SWINS3.DR_       %2\OS2\MDOS\WINOS2\SYSTEM               >NUL
%2\OS2\UNPACK %1\SCREEN.SY_       %2\OS2                                  >NUL
%2\OS2\INSTALL\DDICO.EXE          %2
DEL %2\OS2\INSTALL\DDICO.EXE                                       1>NUL 2>NUL
%2\OS2\INSTALL\MKSYSLVL %2\OS2\INSTALL\SYSLEVEL.OS2 XR02110               >NUL
ECHO Updated syslevel.os2 with XR02110 >> %2\OS2\INSTALL\DISPLAY.LOG
DEL %2\OS2\INSTALL\MKSYSLVL.EXE                                           >NUL
%2\OS2\ATTRIB -R -S -H %2\OS2KRNL                                  1>NUL 2>NUL
ECHO Patching OS2KRNL >> %2\OS2\INSTALL\DISPLAY.LOG
%2\OS2\INSTALL\S3PATCH /NOP /NOS /Q  %2\  %2\OS2\INSTALL\OS2KRNL.RTP >> %2\OS2\INSTALL\DISPLAY.LOG 2>NUL
%2\OS2\ATTRIB +R +S +H %2\OS2KRNL                                  1>NUL 2>NUL
DEL %2\OS2\INSTALL\OS2KRNL.RTP                                            >NUL
ECHO Patching VWIN.SYS >> %2\OS2\INSTALL\DISPLAY.LOG
%2\OS2\INSTALL\S3PATCH /NOP /NOS /Q  %2\OS2\MDOS  %2\OS2\INSTALL\VWIN.RTP >> %2\OS2\INSTALL\DISPLAY.LOG 2>NUL
DEL %2\OS2\INSTALL\S3PATCH.EXE                                            >NUL
DEL %2\OS2\INSTALL\VWIN.RTP                                               >NUL
rem IF EXIST %2\OS2\SCREEN01.SAV DEL %\OS2\SCREEN02.SYS                   2>NUL
rem IF EXIST %2\OS2\SCREEN02.SAV DEL %\OS2\SCREEN01.SYS                   2>NUL

%2\OS2\UNPACK.EXE S3PRF %2\OS2                                            >NUL
%2\OS2\S3PRF.EXE
DEL %2\OS2\S3PRF.EXE                                               1>NUL 2>NUL
ECHO ******************************************************************
ECHO *   1) Perform a shutdown and restart the system.                *
ECHO *                                                                *
ECHO *   2) After the restart, open the OS/2 System folder,           *
ECHO *      then open the System Setup folder.  Open the              *
ECHO *      Display Driver Install object.  This will execute         *
ECHO *      the Display Driver Installation (DSPINSTL)utility         *
ECHO *      program.                                                  *
ECHO *                                                                *
ECHO *   3) When DSPINSTL has completed, open the OS/2 System         *
ECHO *      folder, then open the System Setup folder.  Open          *
ECHO *      the System object and select the desired screen           *
ECHO *      resolution on the Screen page of the notebook.            *
ECHO *      Then close the System - Settings notebook.                *
ECHO *                                                                *
ECHO *   4) Perform a shutdown and restart the system.                *
ECHO ******************************************************************
