@echo off
REM
REM Copyright (c) 1997  Quantum3D, Inc.
REM All Rights Reserved.
REM
REM This is UNPUBLISHED PROPRIETARY SOURCE CODE of Quantum3D, Inc.;
REM the contents of this file may not be disclosed to third parties, copied or
REM duplicated in any form, in whole or in part, without the prior written
REM permission of Quantum3D, Inc.
REM
REM RESTRICTED RIGHTS LEGEND:
REM Use, duplication or disclosure by the Government is subject to restrictions
REM as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
REM and Computer Software clause at DFARS 252.227-7013, and/or in similar or
REM successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished  -
REM rights reserved under the Copyright Laws of the United States.
REM
REM RunMeFirst.bat
REM     - for Obsidian 100SB
REM
REM $Revision: 9 $  $Date: 97/12/10 $
REM

echo Quantum3D Obsidian 100SB RunMeFirst -- Version 1.00
echo Copyright 1997  Quantum3D, Inc.   All Rights Reserved.
echo+
if "%OS%" == "Windows_NT" goto sp3_chk
if "%windir%" == "" goto sa_dos
if "%TMP%" == "" goto notmp
echo This program prepares your computer for a clean Obsidian 100SB installation by
echo removing any existing Voodoo Graphics INF files and hardware registry keys.
echo It also checks that you are running Windows 95 OSR 2 or later and that you
echo have installed DirectX 5 or later.
echo+
pause

REM Test for OSR 2
q3dbatut osvertest 9x 4 0 1081
if not errorlevel 1 goto osr2
echo You are not running Windows 95 OSR 2 or later, a requirement for reliable
echo operation of the Obsidian 100SB.  Windows 95 OSR 2 incorporates operating
echo system resolutions for older motherboards that do not properly support the
echo PCI-to-PCI bridge used on the Obsidian 100SB.  You may continue with the
echo installation without Windows 95 OSR 2 installed, however it may be necessary
echo to upgrade your system BIOS.  Many motherboard manufacturers have system BIOS
echo upgrades that add support for PCI-to-PCI bridges.  Consult your motherboard
echo manufacturer for availability.
echo+
pause
:osr2

REM Test for DX 5
q3dbatut dxvertest 5 0
if not errorlevel 1 goto dx5
echo Microsoft DirectX 5 or later is not installed.  We recommend that you install
echo the latest version of DirectX, so that your Direct3D applications will have
echo the highest performance.
echo+
pause
:dx5

REM Remove INF files with our hardware ID
if exist %TMP%\~q3drmf.tmp del %TMP%\~q3drmf.tmp
REM Split to prevent the command line from exceeding 128
for %%f in (%windir%\inf\*.inf) do %windir%\command\find /c /i "PCI\VEN_121A&DEV_0001" %%f >> %TMP%\~q3drmf.tmp
for %%f in (%windir%\inf\other\*.inf) do %windir%\command\find /c /i "PCI\VEN_121A&DEV_0001" %%f >> %TMP%\~q3drmf.tmp
q3dbatut deliffound < %TMP%\~q3drmf.tmp
del %TMP%\~q3drmf.tmp

REM Remove our hardware key from the registry
start /w %windir%\RunDll %windir%\system\setupx.dll,InstallHinfSection Obsidian100SB.RunMeFirst 4 .\Ob100SB.inf
goto done

:notmp
echo FATAL ERROR: TMP is not set in the environment.
goto fini

:sa_dos
echo This program can not be run in MS-DOS mode.
goto fini

:sp3_chk
echo This program checks that you are running Windows NT 4 Service Pack 3 or later.
echo+
pause

REM Check for SP3
q3dbatut osvertest NT 4 0 3
if not errorlevel 1 goto sp3
echo You are not running Windows NT 4 Service Pack 3 or later, a requirement
echo for reliable operation of the Obsidian 100SB.  You must install it before
echo continuing with the installation.
echo+
:sp3

:done
echo Done.  Click the Close button in the right corner of this window to close it.

:fini


