mirror of https://github.com/lianthony/NT4.0
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
804 lines
29 KiB
804 lines
29 KiB
;-----------------------------------------------------------------------
|
|
; OPTION TYPE
|
|
; -----------
|
|
; This identifies the Option type we are dealing with. The different
|
|
; possible types are:
|
|
;
|
|
; COMPUTER, VIDEO, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
|
|
;-----------------------------------------------------------------------
|
|
|
|
[Identification]
|
|
OptionType = VIDEO40BETA
|
|
|
|
;---------------------------------------------------------------------------
|
|
; 1. Identify
|
|
;
|
|
; DESCRIPTION: To verify that this INF deals with the same type of options
|
|
; as we are choosing currently.
|
|
;
|
|
; INPUT: None
|
|
;
|
|
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
|
|
; $($R1): Option Type (COMPUTER ...)
|
|
; $($R2): Diskette description
|
|
;---------------------------------------------------------------------------
|
|
|
|
[Identify]
|
|
;
|
|
;
|
|
read-syms Identification
|
|
|
|
set Status = STATUS_SUCCESSFUL
|
|
set Identifier = $(OptionType)
|
|
set Media = #("Source Media Descriptions", 1, 1)
|
|
|
|
Return $(Status) $(Identifier) $(Media)
|
|
|
|
|
|
[ServicesEntry]
|
|
CurrentEntry = "" ? $(!LIBHANDLE) GetDevicemapValue Video \Device\Video0
|
|
|
|
[SystemVariables]
|
|
STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
|
|
STF_WINDOWSPATH = "" ? $(!LIBHANDLE) GetWindowsNtDir
|
|
OemCodePage = "" ? $(!LIBHANDLE) GetOemCodepage
|
|
|
|
|
|
;-----------------------------------------------------------------------
|
|
; VIDEO DRIVER SECTION
|
|
; --------------------_
|
|
; This sections contains the processing for installing a new video driver.
|
|
;
|
|
;-----------------------------------------------------------------------
|
|
|
|
;
|
|
; Order of the information:
|
|
;
|
|
; driverentry = Miniport Driver (1),
|
|
; Type (2),
|
|
; Group (3),
|
|
; ErrorControl (4),
|
|
; InstalledDisplay (5),
|
|
; VgaCompatible(0/1) (6),
|
|
; EventMessageFile (7),
|
|
; TypesSupported (8),
|
|
; Autodetect (9),
|
|
; ExtraFilesRequired (10),
|
|
; ConfigSection (11)
|
|
;
|
|
|
|
[MiniportDrivers]
|
|
ati = ati , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {ati,8514a} , 0, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\ati.sys" , 7, 1, {} , ati-config
|
|
cirrus = cirrus , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {vga,cirrus,vga256,vga64k} , 1, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
dell_dgx = dell_dgx , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {framebuf} , 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
et4000 = et4000 , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {vga,w32,vga256,vga64k} , 1, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
jazzg300 = jazzg300 , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {framebuf} , 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
jazzg364 = jazzg364 , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {framebuf} , 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
jzvxl484 = jzvxl484 , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {jzvxl484} , 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
mga = mga , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {mga} , 0, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\mga.sys" , 7, 1, {} , noconfig
|
|
ncr77c22 = ncr77c22 , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {vga,vga256} , 1, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
psidisp = psidisp , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {psidisp} , 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
qv = qv , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {vga,qv} , 1, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\qv.sys" , 7, 1, {} , noconfig
|
|
s3 = s3 , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {s3} , 0, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\s3.sys" , 7, 1, {} , noconfig
|
|
tga = tga , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {tga} , 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
v7vram = v7vram , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {vga,vga256} , 1, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
wd90c24a = wd90c24a , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {wd90c24a} , 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
wdvga = wdvga , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {vga,vga256} , 1, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 1, {} , noconfig
|
|
weitekp9 = weitekp9 , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {weitekp9} , 0, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\weitekp9.sys" , 7, 1, {} , weitekp9-config
|
|
xga = xga , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {xga, vga256} , 0, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\xga.sys" , 7, 1, {} , noconfig
|
|
;
|
|
; The following entry are marked so as not to be part of autodetection
|
|
; ati8514 causes problem in autodetection because it loads before ati, and
|
|
; cause the 64bit ati boards (not vga compatible) to crash.
|
|
; 8514a detection is also not very reliable - so let's not detect it.
|
|
;
|
|
|
|
ati8514a = ati , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {8514a,ati} , 0, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\ati.sys" , 7, 0, {} , noconfig
|
|
i8514a = 8514a , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {8514a} , 0, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\8514a.sys" , 7, 0, {} , noconfig
|
|
vga = vga , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_IGNORE, {vga} , 1, "%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\Drivers\vga.sys" , 7, 0, {} , noconfig
|
|
videosim = videosim , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_IGNORE, {framebuf} , 0, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 0, {} , noconfig
|
|
;
|
|
; We do not autodetect the trident anymore either since we crash on the most
|
|
; most recent trident chip. The user can always install it later on, and
|
|
; if it crashes, they can use last known good.
|
|
;
|
|
trident = trident , !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, {vga,vga256} , 1, "%SystemRoot%\System32\IoLogMsg.dll" , 7, 0, {} , noconfig
|
|
|
|
;
|
|
; List of OpenGL drivers that go with display drivers.
|
|
; The section is mandatory, but entries in the list are optional.
|
|
;
|
|
|
|
[OpenGLDrivers]
|
|
; s3 = gls3
|
|
; vga256 = glvga256
|
|
|
|
[ExternalInstallOption]
|
|
Set !G:DebugOutputControl = 0
|
|
set Exit_Code = $(!SETUP_ERROR_GENERAL)
|
|
install LoadSetupLibrary
|
|
ifstr(i) $(STF_LANGUAGE) == ""
|
|
goto end
|
|
else-ifstr(i) $(OPTION) == ""
|
|
goto end
|
|
else-ifstr(i) $(INITSRC) == ""
|
|
goto end
|
|
else-ifstr(i) $(ADDCOPY) == ""
|
|
goto end
|
|
else-ifstr(i) $(DOCOPY) == ""
|
|
goto end
|
|
else-ifstr(i) $(DOCONFIG) == ""
|
|
goto end
|
|
else-ifstr(i) $(DOINSTALL) == ""
|
|
goto end
|
|
else-ifstr(i) $(INFFILE) == ""
|
|
goto end
|
|
endif
|
|
LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
|
|
set STF_CONTROLSET = CurrentControlSet
|
|
read-syms SystemVariables
|
|
detect SystemVariables
|
|
|
|
shell $(INFFILE) InstallOption $(STF_LANGUAGE) $(OPTION) $(INITSRC) $(ADDCOPY) $(DOCOPY) $(DOCONFIG) $(DOINSTALL)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "Execing Configuring hardware failed"
|
|
goto end
|
|
endif
|
|
ifstr(i) $($R0) == STATUS_SUCCESSFUL
|
|
set Exit_Code = $(!SETUP_ERROR_SUCCESS)
|
|
else-ifstr(i) $($R0) == STATUS_USERCANCEL
|
|
set Exit_Code = $(!SETUP_ERROR_USERCANCEL)
|
|
endif
|
|
end =+
|
|
install FreeSetupLibrary
|
|
FreeLibrary $(!LIBHANDLE)
|
|
exit
|
|
|
|
;
|
|
; InstallOption:
|
|
;
|
|
; FUNCTION: To copy files representing Options
|
|
; To configure the installed option
|
|
; To update the registry for the installed option
|
|
;
|
|
; INPUT: $($0): Language to use
|
|
; $($1): OptionID to install
|
|
; $($2): SourceDirectory
|
|
; $($3): AddCopy (YES | NO)
|
|
; $($4): DoCopy (YES | NO)
|
|
; $($5): DoConfig (YES | NO)
|
|
;
|
|
; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
|
|
; STATUS_NOLANGUAGE |
|
|
; STATUS_USERCANCEL |
|
|
; STATUS_FAILED
|
|
;
|
|
|
|
[InstallOption]
|
|
|
|
;
|
|
; Set default values for
|
|
;
|
|
set Status = STATUS_FAILED
|
|
set DrivesToFree = {}
|
|
|
|
;
|
|
; extract parameters
|
|
;
|
|
set !Option = $($1)
|
|
set SrcDir = $($2)
|
|
set AddCopy = $($3)
|
|
set DoCopy = $($4)
|
|
set DoConfig = $($5)
|
|
set DoInstall = $($6)
|
|
|
|
;
|
|
; Check if the language requested is supported
|
|
;
|
|
set LanguageList = ^(LanguagesSupported, 1)
|
|
Ifcontains(i) $($0) in $(LanguageList)
|
|
else
|
|
set Status = STATUS_NOLANGUAGE
|
|
goto finish_InstallOption
|
|
endif
|
|
read-syms Strings$($0)
|
|
|
|
;
|
|
; check for special detect option
|
|
;
|
|
|
|
ifstr(i) $(!Option) != "DETECT"
|
|
|
|
;
|
|
; check to see if Option is supported.
|
|
;
|
|
|
|
set OptionList = ^(Options, 0)
|
|
ifcontains $(!Option) in $(OptionList)
|
|
else
|
|
goto finish_InstallOption
|
|
endif
|
|
set OptionList = ""
|
|
|
|
;
|
|
; Option has been defined already
|
|
;
|
|
|
|
set DriverEntry = #(Options, $(!Option), 1)
|
|
set MiniportDriver = #(MiniportDrivers, $(DriverEntry), 1)
|
|
set InstalledDisplays = #(MiniportDrivers, $(DriverEntry), 5)
|
|
set OtherFiles = #(MiniportDrivers, $(DriverEntry), 10)
|
|
endif
|
|
|
|
read-syms ServicesEntry
|
|
detect ServicesEntry
|
|
|
|
set DriversList = ^(MiniportDrivers, 0)
|
|
set MiniportDriverList = ^(Files-DisplayMiniportDrivers, 0)
|
|
set DisplayDriverList = ^(Files-DisplayDLLs, 0)
|
|
set OpenGLDriverList = ^(OpenGLDrivers, 0)
|
|
|
|
installtheoption = +
|
|
|
|
;
|
|
; Code to add files to copy list
|
|
;
|
|
|
|
ifstr(i) $(AddCopy) == "YES"
|
|
|
|
ifstr(i) $(!Option) == "DETECT"
|
|
|
|
set DoActualCopy = YES
|
|
else
|
|
|
|
set DoActualCopy = NO
|
|
|
|
;
|
|
; Check miniport drivers
|
|
;
|
|
|
|
set FileToCheck = #(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
|
|
LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
|
|
ifstr(i) $(STATUS) == NO
|
|
set DoActualCopy = YES
|
|
goto addfiles
|
|
endif
|
|
|
|
;
|
|
; If we have Other files in the file list, add it.
|
|
; The extra files will be put in with miniport drivers since the
|
|
; configuration files should get installed in the driver directory
|
|
;
|
|
|
|
ForListDo $(OtherFiles)
|
|
|
|
ifcontains $($) in $(MiniportDriverList)
|
|
set FileToCheck = #(Files-DisplayMiniportDrivers, $($), 2)
|
|
LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
|
|
ifstr(i) $(STATUS) == NO
|
|
set DoActualCopy = YES
|
|
goto addfiles
|
|
endif
|
|
|
|
endif
|
|
|
|
EndForListDo
|
|
|
|
;
|
|
; If we have this display driver in the file list, add it.
|
|
;
|
|
|
|
ForListDo $(InstalledDisplays)
|
|
|
|
ifcontains $($) in $(DisplayDriverList)
|
|
set FileToCheck = #(Files-DisplayDLLs, $($), 2)
|
|
LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileToCheck)
|
|
ifstr(i) $(STATUS) == NO
|
|
set DoActualCopy = YES
|
|
goto addfiles
|
|
endif
|
|
|
|
;
|
|
; For each display driver also check their Open GL driver
|
|
;
|
|
|
|
ifcontains $($) in $(OpenGLDriverList)
|
|
set FileToCheck = #(Files-DisplayOpenGLDrivers, #(OpenGLDrivers, $($), 1), 2)
|
|
LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileToCheck)
|
|
ifstr(i) $(STATUS) == NO
|
|
set DoActualCopy = YES
|
|
goto addfiles
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
EndForListDo
|
|
|
|
endif
|
|
|
|
addfiles = +
|
|
|
|
ifstr(i) $(DoActualCopy) == NO
|
|
|
|
shell "subroutn.inf" DriversExist $($0) $(String1)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "VIDEO.INF: shelling DriversExist failed"
|
|
goto finish_InstallOption
|
|
endif
|
|
|
|
ifstr(i) $($R0) == STATUS_CURRENT
|
|
else-ifstr(i) $($R0) == STATUS_NEW
|
|
set DoActualCopy = YES
|
|
else-ifstr(i) $($R0) == STATUS_USERCANCEL
|
|
Debug-Output "VIDEO.INF: User cancelled video installation"
|
|
goto finish_InstallOption
|
|
else
|
|
Debug-Output "VIDEO.INF: Error reported in DriversExist routine in SUBROUTN.INF"
|
|
goto finish_InstallOption
|
|
endif
|
|
endif
|
|
|
|
ifstr(i) $(DoActualCopy) == YES
|
|
|
|
shell "registry.inf" GetNTSource
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
|
|
else
|
|
set SrcDir = $($R1)
|
|
endif
|
|
|
|
shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "VIDEO.INF: shelling DoAskSourceEx failed"
|
|
goto finish_InstallOption
|
|
endif
|
|
|
|
ifstr(i) $($R0) == STATUS_SUCCESSFUL
|
|
set SrcDir = $($R1)
|
|
ifstr(i) $($R2) != ""
|
|
set DrivesToFree = >($(DrivesToFree), $($R2))
|
|
endif
|
|
else
|
|
Debug-Output "VIDEO.INF: User cancelled asking source."
|
|
goto finish_InstallOption
|
|
endif
|
|
|
|
ifstr(i) $(!Option) != "DETECT"
|
|
install Install-AddCopyOption
|
|
else
|
|
install Install-AddAllCopy
|
|
endif
|
|
|
|
ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
|
|
Debug-Output "VIDEO.INF: Adding video files to copy list failed"
|
|
goto finish_InstallOption
|
|
endif
|
|
else
|
|
set DoCopy = NO
|
|
endif
|
|
endif
|
|
|
|
ifstr(i) $(DoCopy) == "YES"
|
|
read-syms ProgressCopy$($0)
|
|
install Install-DoCopyOption
|
|
ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
|
|
Debug-Output "Copying files failed"
|
|
goto finish_InstallOption
|
|
else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
|
|
set Status = STATUS_USERCANCEL
|
|
goto finish_InstallOption
|
|
endif
|
|
endif
|
|
|
|
ifstr(i) $(DoConfig) == "YES"
|
|
|
|
;
|
|
; first run a privilege check on modifying the setup node
|
|
;
|
|
|
|
shell "registry.inf" CheckSetupModify
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
goto finish_InstallOption
|
|
endif
|
|
|
|
ifstr(i) $($R0) != STATUS_SUCCESSFUL
|
|
goto finish_InstallOption
|
|
endif
|
|
|
|
ForListDo $(DriversList)
|
|
|
|
;
|
|
; determine if we really want to configure this driver.
|
|
;
|
|
|
|
ifstr(i) $(!Option) == "DETECT"
|
|
|
|
set DriverEntry = $($)
|
|
set DeviceDescription = ""
|
|
set ErrorControl = $(!SERVICE_ERROR_IGNORE)
|
|
|
|
;
|
|
; Only configure the driver if it is available for this
|
|
; platform (based on the list of drivers)
|
|
;
|
|
|
|
ifcontains #(MiniportDrivers, $(DriverEntry), 1) in $(MiniportDriverList)
|
|
|
|
;
|
|
; check if this is a driver we actually want to detect
|
|
;
|
|
|
|
ifint #(MiniportDrivers, $(DriverEntry), 9) == 1
|
|
set configDriver = YES
|
|
else
|
|
set configDriver = NO
|
|
endif
|
|
|
|
else
|
|
set configDriver = NO
|
|
endif
|
|
|
|
else
|
|
|
|
set DeviceDescription = $(!Option)
|
|
set ErrorControl = $(#(MiniportDrivers, $(DriverEntry), 4))
|
|
|
|
ifstr(i) $(DriverEntry) == $($)
|
|
set configDriver = YES
|
|
else
|
|
set configDriver = NO
|
|
endif
|
|
|
|
endif
|
|
|
|
ifstr(i) $(configDriver) == YES
|
|
|
|
Debug-Output "configuring the miniport driver"
|
|
|
|
set MiniportDriver = #(MiniportDrivers, $(DriverEntry), 1)
|
|
set Type = $(#(MiniportDrivers, $(DriverEntry), 2))
|
|
set Group = #(MiniportDrivers, $(DriverEntry), 3)
|
|
set InstalledDisplays = #(MiniportDrivers, $(DriverEntry), 5)
|
|
set VgaCompatible = #(MiniportDrivers, $(DriverEntry), 6)
|
|
set EventMessageFile = #(MiniportDrivers, $(DriverEntry), 7)
|
|
set TypesSupported = #(MiniportDrivers, $(DriverEntry), 8)
|
|
|
|
;
|
|
; first make a new video entry, the entry is created automatically
|
|
; enabled
|
|
;
|
|
|
|
set ServiceNode = $(DriverEntry)
|
|
set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
|
|
|
|
;
|
|
; We can enable or disable disable a driver
|
|
;
|
|
|
|
set ServicesValues = { +
|
|
{Type, 0, $(!REG_VT_DWORD), $(Type) }, +
|
|
{Group, 0, $(!REG_VT_SZ), $(Group) }, +
|
|
{ErrorControl, 0, $(!REG_VT_DWORD), $(ErrorControl) }, +
|
|
{BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary) } +
|
|
}
|
|
|
|
ifstr(i) $(DoInstall) == "YES"
|
|
|
|
set ServicesValues = >($(ServicesValues), +
|
|
{Start, 0, $(!REG_VT_DWORD), $(!SERVICE_SYSTEM_START) })
|
|
|
|
else
|
|
|
|
set ServicesValues = >($(ServicesValues), +
|
|
{Start, 0, $(!REG_VT_DWORD), $(!SERVICE_DISABLED) })
|
|
|
|
endif
|
|
|
|
;
|
|
; Get the right parameters written, with the optional
|
|
; parameter if necessary.
|
|
;
|
|
|
|
;
|
|
; We also set the DefaultSettings back to zero so that when a
|
|
; new driver is installed, and old or possibly bad set of
|
|
; values are not laying around in the registry.
|
|
; So if someone installs a bad resolution (because they did not
|
|
; use the applet properly, they can go to vga, reinstall the
|
|
; driver and delete the old resolution settings.
|
|
;
|
|
|
|
set !ParametersValues = { +
|
|
{"Device Description", 0, $(!REG_VT_SZ), $(DeviceDescription) }, +
|
|
{InstalledDisplayDrivers, 0, $(!REG_VT_MULTI_SZ), $(InstalledDisplays) }, +
|
|
{VgaCompatible, 0, $(!REG_VT_DWORD), $(VgaCompatible) }, +
|
|
{DefaultSettings.BitsPerPel, 0, $(!REG_VT_DWORD), 0 }, +
|
|
{DefaultSettings.VRefresh, 0, $(!REG_VT_DWORD), 0 }, +
|
|
{DefaultSettings.Interlaced, 0, $(!REG_VT_DWORD), 0 }, +
|
|
{DefaultSettings.XResolution, 0, $(!REG_VT_DWORD), 0 }, +
|
|
{DefaultSettings.YResolution, 0, $(!REG_VT_DWORD), 0 } +
|
|
}
|
|
|
|
;
|
|
; If we are installing the drivers, run the configuration
|
|
; code specific to the driver
|
|
;
|
|
; Only do this is this is a real install; do not run
|
|
; configuration utilities for detect ...
|
|
;
|
|
|
|
ifstr(i) $(DoInstall) == "YES"
|
|
|
|
ifstr(i) $(!Option) != "DETECT"
|
|
|
|
shell "" #(MiniportDrivers, $(DriverEntry), 11)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
set DeviceValues = {}
|
|
|
|
set EventLogValues = { +
|
|
{EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
|
|
{TypesSupported, 0, $(!REG_VT_DWORD), $(TypesSupported) } +
|
|
}
|
|
|
|
shell "registry.inf" MakeServicesEntry $(ServiceNode) +
|
|
$(ServicesValues) +
|
|
$(!ParametersValues) +
|
|
$(DeviceValues) +
|
|
$(EventLogValues) +
|
|
Device0
|
|
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
|
|
goto finish_InstallOption
|
|
endif
|
|
|
|
ifstr(i) $($R0) != STATUS_SUCCESSFUL
|
|
Debug-Output "MakeServicesEntry failed for video"
|
|
goto finish_InstallOption
|
|
endif
|
|
|
|
|
|
;
|
|
; For each display driver also check their Open GL driver
|
|
;
|
|
|
|
ForListDo $(InstalledDisplays)
|
|
|
|
ifcontains $($) in $(OpenGLDriverList)
|
|
|
|
;
|
|
; make an entry in the registry for Open GL drivers
|
|
;
|
|
|
|
set KeyPath = { +
|
|
{SOFTWARE, 0, $(MaskAllAccess)}, +
|
|
{Microsoft, 0, $(MaskAllAccess)}, +
|
|
{"Windows NT", 0, $(MaskAllAccess)}, +
|
|
{CurrentVersion, 0, $(MaskAllAccess)}, +
|
|
{OpenGLDrivers, 0, $(MaskAllAccess)} +
|
|
}
|
|
|
|
set KeyValue = { +
|
|
{$($), 0, $(!REG_VT_SZ), #(OpenGLDrivers, $($), 1) } +
|
|
}
|
|
|
|
shell "registry.inf" CreateKey $(!REG_H_LOCAL) $(KeyPath) $(KeyValue)
|
|
|
|
Debug-Output "just did an OGL section"
|
|
|
|
ifint $($ShellCode) != $(!SHELL_CODE_OK)
|
|
Debug-Output "Couldn't execute CreateKey in registry.inf"
|
|
goto endInstallOpenGLDriver
|
|
endif
|
|
|
|
ifstr(i) $($R0) != STATUS_SUCCESSFUL
|
|
Debug-Output "CreateKey failed for OGLDrivers"
|
|
goto endInstallOpenGLDriver
|
|
endif
|
|
|
|
; CloseKey something ??
|
|
|
|
Debug-Output "VIDEO.INF: success installing an ogl entry"
|
|
|
|
endif
|
|
|
|
EndForListDo
|
|
|
|
endif
|
|
|
|
EndForListDo
|
|
|
|
endif
|
|
|
|
set Status = STATUS_SUCCESSFUL
|
|
|
|
finish_InstallOption = +
|
|
ForListDo $(DrivesToFree)
|
|
LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
|
|
EndForListDo
|
|
|
|
Return $(Status)
|
|
|
|
|
|
[Install-AddCopyOption]
|
|
|
|
Debug-Output "adding to copy list"
|
|
|
|
set STF_VITAL = ""
|
|
;
|
|
; Add the files to the copy list
|
|
;
|
|
AddSectionKeyFileToCopyList Files-DisplayMiniportDrivers +
|
|
$(MiniportDriver) +
|
|
$(SrcDir) +
|
|
$(!STF_WINDOWSSYSPATH)\drivers
|
|
|
|
;
|
|
; Add any other files needed by the driver
|
|
;
|
|
|
|
ForListDo $(OtherFiles)
|
|
|
|
ifcontains $($) in $(MiniportDriverList)
|
|
|
|
Debug-Output "adding other files to copy list"
|
|
|
|
AddSectionKeyFileToCopyList Files-DisplayMiniportDrivers +
|
|
$($) +
|
|
$(SrcDir) +
|
|
$(!STF_WINDOWSSYSPATH)\drivers
|
|
|
|
endif
|
|
|
|
EndForListDo
|
|
|
|
;
|
|
; Add the display drivers.
|
|
;
|
|
|
|
ForListDo $(InstalledDisplays)
|
|
|
|
ifcontains $($) in $(DisplayDriverList)
|
|
|
|
Debug-Output "adding display driver to copy list"
|
|
|
|
AddSectionKeyFileToCopyList Files-DisplayDLLs +
|
|
$($) +
|
|
$(SrcDir) +
|
|
$(!STF_WINDOWSSYSPATH)
|
|
|
|
;
|
|
; For each display driver also check their Open GL driver
|
|
;
|
|
|
|
ifcontains $($) in $(OpenGLDriverList)
|
|
|
|
Debug-Output "adding opengl driver to copy list"
|
|
|
|
AddSectionKeyFileToCopyList Files-DisplayOpenGLDrivers +
|
|
#(OpenGLDrivers, $($), 1) +
|
|
$(SrcDir) +
|
|
$(!STF_WINDOWSSYSPATH)
|
|
|
|
endif
|
|
endif
|
|
|
|
EndForListDo
|
|
|
|
exit
|
|
|
|
|
|
[Install-AddAllCopy]
|
|
|
|
Debug-Output "adding all drivers to copy list"
|
|
|
|
set STF_VITAL = ""
|
|
;
|
|
; Add all the files to the copy list
|
|
;
|
|
|
|
AddSectionFilesToCopyList Files-DisplayMiniportDrivers +
|
|
$(SrcDir) +
|
|
$(!STF_WINDOWSSYSPATH)\drivers
|
|
|
|
AddSectionFilesToCopyList Files-DisplayDLLs +
|
|
$(SrcDir) +
|
|
$(!STF_WINDOWSSYSPATH)
|
|
exit
|
|
|
|
|
|
[Install-DoCopyOption]
|
|
|
|
;
|
|
; Copy files in the copy list
|
|
;
|
|
CopyFilesInCopyList
|
|
exit
|
|
|
|
;
|
|
; Device Specific configuration options.
|
|
;
|
|
|
|
[noconfig]
|
|
|
|
return
|
|
|
|
[ati-config]
|
|
|
|
Debug-Output "Configuring ATI miniport"
|
|
|
|
ifstr(i) $(!Option) == "ATI AST"
|
|
|
|
set !ParametersValues = >($(!ParametersValues), +
|
|
{"ATIOEM", 0, $(!REG_VT_SZ), "AST"})
|
|
|
|
endif
|
|
|
|
return
|
|
|
|
[weitekp9-config]
|
|
|
|
Debug-Output "Configuring Weitek miniport"
|
|
|
|
;
|
|
; Write something to the registry to tell the weitek miniport to
|
|
; detect when it is actually installed by the user.
|
|
;
|
|
|
|
set !ParametersValues = >($(!ParametersValues), +
|
|
{"DetectVLCards", 0, $(!REG_VT_DWORD), 1})
|
|
|
|
set-title $(FunctionTitle)
|
|
|
|
ifstr(i) $(!Option) == "Diamond Viper VLB"
|
|
read-syms viper
|
|
else-ifstr(i) $(!Option) == "Weitek P9000 Graphics Adapter"
|
|
read-syms weitekp9000
|
|
else
|
|
set !ParametersValues = >($(!ParametersValues), +
|
|
{"Membase", 0, $(!REG_VT_DWORD), 0})
|
|
return
|
|
endif
|
|
|
|
read-syms dialog
|
|
ui start "dialog"
|
|
ifstr(i) $(DLGEVENT) == "CONTINUE"
|
|
set Result = $(Combo1Out)
|
|
debug-output $(Result)
|
|
Set-HexToDec Result = $(Result)
|
|
debug-output $(Result)
|
|
set !ParametersValues = >($(!ParametersValues), +
|
|
{"Membase", 0, $(!REG_VT_DWORD), $(Result)})
|
|
|
|
else-ifstr(i) $(DLGEVENT) == "BACK"
|
|
; user hits cancel
|
|
endif
|
|
|
|
return
|
|
|
|
[viper]
|
|
Combo1List = {20000000, 80000000, A0000000}
|
|
Combo1Out = 80000000
|
|
|
|
[weitekp9000]
|
|
Combo1List = {04000000, 08000000, 0D000000, 0E000000, 0F000000, 80000000, C0000000, D0000000, E0000000, F0000000}
|
|
Combo1Out = 04000000
|
|
|
|
[dialog]
|
|
|
|
FunctionTitle = "Device Base Address"
|
|
Help = "&Help"
|
|
Continue = "Continue"
|
|
Cancel = "Cancel"
|
|
Label1 = "&Base Address:"
|
|
DlgType = "MultiCombo"
|
|
DlgTemplate = "SINGLE_COMBO"
|
|
Caption = $(FunctionTitle)
|
|
ComboListItemsIn = {Combo1List}
|
|
ComboListItemsOut = {Combo1Out}
|
|
|
|
; HelpContext = $(!IDH_DB_OEMNADE3_INS) ; help id
|