home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / number9 / ntv12009 / ntv12009.exe / OEMSETUP.INF < prev    next >
INI File  |  1996-03-28  |  18KB  |  581 lines

  1. ;-----------------------------------------------------------------------
  2. ; OPTION TYPE
  3. ; -----------
  4. ; This identifies the Option type we are dealing with.  The different
  5. ; possible types are:
  6. ;
  7. ; COMPUTER, VIDEO, MOUSE, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
  8. ;-----------------------------------------------------------------------
  9.  
  10. [Identification]
  11.     OptionType = VIDEO
  12.  
  13. ;-----------------------------------------------------------------------
  14. ; LANGUAGES SUPPORTED
  15. ; -------------------
  16. ;
  17. ; The languages supported by the OEM INF, For every language supported
  18. ; we need to have a separate text section for every displayable text
  19. ; section.
  20. ;
  21. ;-----------------------------------------------------------------------
  22.  
  23. [LanguagesSupported]
  24.     ENG
  25.  
  26. ;-----------------------------------------------------------------------
  27. ; OPTION LIST
  28. ; -----------
  29. ; This section lists the OEM Option key names.  These keys are locale
  30. ; independent and used to represent the option in a locale independent
  31. ; manner.
  32. ;
  33. ;-----------------------------------------------------------------------
  34.  
  35. ;
  36. ; Option list order: Option = Miniport driver, BitsPerPel, XResolution, YResolution, VRefresh, Interlaced
  37. ;
  38. ; If you don't want to create a VRefresh or Interlaced value under the service
  39. ; parameters then use the value ""
  40. ;
  41.  
  42. [Options]
  43.     "S3 Compatible Display Adapter"        = s3,    8, 640,  480   , 60 , 0
  44.  
  45. ;
  46. ; This maps detected options into the options we support
  47. ;
  48. ; Format: DetectedOption = MappedOption
  49. ;
  50.  
  51. [MapOfOptions]
  52.     "VGA"                       = "VGA"
  53.     "COMPAQ AVGA"               = "VGA"
  54.     "COMPAQ AGB"                = "VGA"
  55.     "8514 MONITOR UNKNOWN"      = "VGA"
  56.     "8514 VGA MONITOR"          = "VGA"
  57.     "8514 8503 MONO"            = "VGA"
  58.     "8514 8514 GAD"             = "VGA"
  59.     "GENOA VGA"                 = "VGA"
  60.     "VIDEO7 VGA DRAM"           = "VIDEO7 VGA VRAM 640x480x4"
  61.     "VIDEO7 VGA VRAM"           = "VIDEO7 VGA VRAM 640x480x4"
  62.     "TRIDENT VGA"               = "VGA"
  63.     "TRIDENT VGA 9100"          = "VGA"
  64.     "PARADISE VGA"              = "VGA"
  65.     "PARADISE VGA PROM"         = "VGA"
  66.     "PARADISE VGA CHIP 1F"      = "VGA"
  67.     "ATI VGA"                   = "VGA"
  68.     "ATI VGA WONDDER3"          = "VGA"
  69.     "TSENGLAB VGA ET3000"       = "VGA"
  70.     "TSENGLAB VGA ET4000"       = "TSENGLAB VGA ET4000 640x480x4x60"
  71.     "CIRRUS VGA"                = "VGA"
  72.     "CIRRUS VGA 610-620 REVC"   = "VGA"
  73.     "XGA"                       = "XGA 640x480x8"
  74.     "DELL DGX"                  = "DELL DGX 640x480x8"
  75.     "S3 VGA"                    = "S3 VGA 640x480x8"
  76.     "PRODESIGNER II"            = "TSENGLAB VGA ET4000 640x480x4x60"
  77.  
  78.  
  79. ;
  80. ; Order of the information:
  81. ;
  82. ; Port driver = Type, Group, ErrorControl, Tag, InstalledDisplay, VgaCompatible( 0/1 ), EventMessageFile, TypesSupported
  83. ;
  84.  
  85. [MiniportDrivers]
  86.     s3   = !SERVICE_KERNEL_DRIVER, Video, !SERVICE_ERROR_NORMAL, 11,  {s3}, 0 , %SystemRoot%\System32\IoLogMsg.dll , 7
  87.  
  88.  
  89. ;-----------------------------------------------------------------------
  90. ; OPTION TEXT SECTION
  91. ; -------------------
  92. ; These are text strings used to identify the option to the user.  There
  93. ; are separate sections for each language supported.  The format of the
  94. ; section name is "OptionsText" concatenated with the Language represented
  95. ; by the section.
  96. ;
  97. ;-----------------------------------------------------------------------
  98.  
  99. [OptionsTextENG]
  100.     "S3 Compatible Display Adapter"        =  "S3 Video Driver Update 1.20.09 (Then choose Install button.)"
  101.  
  102.  
  103.  
  104. ;---------------------------------------------------------------------------
  105. ; 1. Identify
  106. ;
  107. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  108. ;                as we are choosing currently.
  109. ;
  110. ; INPUT:         None
  111. ;
  112. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  113. ;                $($R1): Option Type (COMPUTER ...)
  114. ;                $($R2): Diskette description
  115. ;---------------------------------------------------------------------------
  116.  
  117. [Identify]
  118.     ;
  119.     ;
  120.     read-syms Identification
  121.  
  122.     set Status     = STATUS_SUCCESSFUL
  123.     set Identifier = $(OptionType)
  124.     set Media      = #("Source Media Descriptions", 1, 1)
  125.  
  126.     Return $(Status) $(Identifier) $(Media)
  127.  
  128.  
  129.  
  130. ;------------------------------------------------------------------------
  131. ; 2. ReturnOptions:
  132. ;
  133. ; DESCRIPTION:   To return the option list supported by this INF and the
  134. ;                localised text list representing the options.
  135. ;
  136. ;
  137. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  138. ;
  139. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  140. ;                                STATUS_NOLANGUAGE
  141. ;                                STATUS_FAILED
  142. ;
  143. ;                $($R1): Option List
  144. ;                $($R2): Option Text List
  145. ;------------------------------------------------------------------------
  146.  
  147. [ReturnOptions]
  148.     ;
  149.     ;
  150.     set Status        = STATUS_FAILED
  151.     set OptionList     = {}
  152.     set OptionTextList = {}
  153.  
  154.     ;
  155.     ; Check if the language requested is supported
  156.     ;
  157.     set LanguageList = ^(LanguagesSupported, 1)
  158.     Ifcontains(i) $($0) in $(LanguageList)
  159.     goto returnoptions
  160.     else
  161.     set Status = STATUS_NOLANGUAGE
  162.     goto finish_ReturnOptions
  163.     endif
  164.  
  165.     ;
  166.     ; form a list of all the options and another of the text representing
  167.     ;
  168.  
  169. returnoptions = +
  170.     set OptionList     = ^(Options, 0)
  171.     set OptionTextList = ^(OptionsText$($0), 1)
  172.     set Status         = STATUS_SUCCESSFUL
  173.  
  174. finish_ReturnOptions = +
  175.     Return $(Status) $(OptionList) $(OptionTextList)
  176.  
  177.  
  178.  
  179. ;---------------------------------------------------------------------------
  180. ; MapToSupportedOption
  181. ;
  182. ; DESCRIPTION:   To map a hardware detected option to the NT Supported
  183. ;                option which represents it.
  184. ;
  185. ; INPUT:         $($0): Option
  186. ;
  187. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  188. ;                $($R1): Mapped Option
  189. ;
  190. ;---------------------------------------------------------------------------
  191.  
  192. [MapToSupportedOption]
  193.     ;
  194.     set Status = STATUS_FAILED
  195.     set MappedOption = $($0)
  196.  
  197.     ;
  198.     ; If the option is one we can support using one of our standard options
  199.     ; then map it to the standard option else map it to the default option
  200.     ; which is VGA.
  201.     ;
  202.  
  203.     set OptionList = ^(MapOfOptions, 0)
  204.     ifcontains $($0) in $(OptionList)
  205.     set MappedOption = #(MapOfOptions, $($0), 1)
  206.     else
  207.     set MappedOption = "VGA"
  208.     endif
  209.  
  210.     set Status = STATUS_SUCCESSFUL
  211.     Return $(Status) $(MappedOption)
  212.  
  213.  
  214.  
  215. [ServicesEntry]
  216.     CurrentEntry = "" ? $(!LIBHANDLE) GetDevicemapValue Video \Device\Video0
  217.  
  218.  
  219. ;
  220. ; InstallOption:
  221. ;
  222. ; FUNCTION:  To copy files representing Options
  223. ;            To configure the installed option
  224. ;            To update the registry for the installed option
  225. ;
  226. ; INPUT:     $($0):  Language to use
  227. ;            $($1):  OptionID to install
  228. ;            $($2):  SourceDirectory
  229. ;            $($3):  AddCopy  (YES | NO)
  230. ;            $($4):  DoCopy   (YES | NO)
  231. ;            $($5):  DoConfig (YES | NO)
  232. ;
  233. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  234. ;                            STATUS_NOLANGUAGE |
  235. ;                            STATUS_USERCANCEL |
  236. ;                            STATUS_FAILED
  237. ;
  238.  
  239. [InstallOption]
  240.  
  241.     ;
  242.     ; Set default values for
  243.     ;
  244.     set Status       = STATUS_FAILED
  245.     set DrivesToFree = {}
  246.  
  247.     ;
  248.     ; extract parameters
  249.     ;
  250.     set Option   = $($1)
  251.     set SrcDir   = $($2)
  252.     set AddCopy  = $($3)
  253.     set DoCopy   = $($4)
  254.     set DoConfig = $($5)
  255.  
  256.     ;
  257.     ; Check if the language requested is supported
  258.     ;
  259.     set LanguageList = ^(LanguagesSupported, 1)
  260.     Ifcontains(i) $($0) in $(LanguageList)
  261.     else
  262.     set Status = STATUS_NOLANGUAGE
  263.     goto finish_InstallOption
  264.     endif
  265.     read-syms Strings$($0)
  266.  
  267.     ;
  268.     ; check to see if Option is supported.
  269.     ;
  270.  
  271.     set OptionList = ^(Options, 0)
  272.     ifcontains $(Option) in $(OptionList)
  273.     else
  274.     goto finish_InstallOption
  275.     endif
  276.     set OptionList = ""
  277.  
  278.     ;
  279.     ; Option has been defined already
  280.     ;
  281.     set MiniportDriver    = #(Options, $(Option), 1)
  282.     set BitsPerPel        = #(Options, $(Option), 2)
  283.     set XResolution       = #(Options, $(Option), 3)
  284.     set YResolution       = #(Options, $(Option), 4)
  285.     set VRefresh          = #(Options, $(Option), 5)
  286.     set Interlaced        = #(Options, $(Option), 6)
  287.  
  288.     set Type              = $(#(MiniportDrivers, $(MiniportDriver), 1))
  289.     set Group             =   #(MiniportDrivers, $(MiniportDriver), 2)
  290.     set ErrorControl      = $(#(MiniportDrivers, $(MiniportDriver), 3))
  291.     set Tag               =   #(MiniportDrivers, $(MiniportDriver), 4)
  292.     set InstalledDisplays =   #(MiniportDrivers, $(MiniportDriver), 5)
  293.     set VgaCompatible     =   #(MiniportDrivers, $(MiniportDriver), 6)
  294.     set EventMessageFile  =   #(MiniportDrivers, $(MiniportDriver), 7)
  295.     set TypesSupported    =   #(MiniportDrivers, $(MiniportDriver), 8)
  296.  
  297.     read-syms ServicesEntry
  298.     detect    ServicesEntry
  299.  
  300. installtheoption = +
  301.  
  302.     ;
  303.     ; Code to add files to copy list
  304.     ;
  305.  
  306.     ifstr(i) $(AddCopy) == "YES"
  307.     set DoActualCopy = NO
  308.     set FileToCheck = #(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
  309.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  310.     ifstr(i) $(STATUS) == NO
  311.         set DoActualCopy = YES
  312.         goto addfiles
  313.     endif
  314.     ForListDo $(InstalledDisplays)
  315.         set FileToCheck = #(Files-DisplayDLLs, $($), 2)
  316.         LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileToCheck)
  317.         ifstr(i) $(STATUS) == NO
  318.         set DoActualCopy = YES
  319.         endif
  320.     EndForListDo
  321.  
  322. addfiles = +
  323.     ifstr(i) $(DoActualCopy) == NO
  324.         shell "subroutn.inf" DriversExist $($0) $(String1)
  325.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  326.         Debug-Output "VIDEO.INF: shelling DriversExist failed"
  327.         goto finish_InstallOption
  328.         endif
  329.  
  330.         ifstr(i) $($R0) == STATUS_CURRENT
  331.         else-ifstr(i) $($R0) == STATUS_NEW
  332.         set DoActualCopy = YES
  333.         else-ifstr(i) $($R0) == STATUS_USERCANCEL
  334.         Debug-Output "VIDEO.INF: User cancelled video installation"
  335.         goto finish_InstallOption
  336.         else
  337.         Debug-Output "VIDEO.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  338.         goto finish_InstallOption
  339.         endif
  340.     endif
  341.  
  342.     ifstr(i) $(DoActualCopy) == YES
  343.  
  344.         shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  345.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  346.         Debug-Output "VIDEO.INF: shelling DoAskSourceEx failed"
  347.         goto finish_InstallOption
  348.         endif
  349.  
  350.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  351.         set SrcDir = $($R1)
  352.         ifstr(i) $($R2) != ""
  353.             set DrivesToFree = >($(DrivesToFree), $($R2))
  354.         endif
  355.         else
  356.         Debug-Output "VIDEO.INF: User cancelled asking source."
  357.         goto finish_InstallOption
  358.         endif
  359.  
  360.         install Install-AddCopyOption
  361.         ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  362.         Debug-Output "VIDEO.INF: Adding video files to copy list failed"
  363.         goto finish_InstallOption
  364.         endif
  365.     else
  366.         set DoCopy = NO
  367.     endif
  368.  
  369.     endif
  370.  
  371.     ifstr(i) $(DoCopy) == "YES"
  372.     read-syms ProgressCopy$($0)
  373.     install Install-DoCopyOption
  374.     ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  375.         Debug-Output "Copying files failed"
  376.         goto finish_InstallOption
  377.     else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  378.         set Status = STATUS_USERCANCEL
  379.         goto finish_InstallOption
  380.     endif
  381.     endif
  382.  
  383.     ifstr(i) $(DoConfig) == "YES"
  384.  
  385.     ;
  386.     ; first run a privilege check on modifying the setup node
  387.     ;
  388.  
  389.     shell "registry.inf" CheckSetupModify
  390.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  391.         goto finish_InstallOption
  392.     endif
  393.  
  394.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  395.         goto finish_InstallOption
  396.     endif
  397.  
  398.     ;
  399.     ; first make a new video entry, the entry is created automatically
  400.     ; enabled
  401.     ;
  402.  
  403.     set ServiceNode   = $(MiniportDriver)
  404.     set ServiceBinary = %SystemRoot%\System32\drivers\#(Files-DisplayMiniportDrivers, $(MiniportDriver), 2)
  405.  
  406.     set ServicesValues   = { +
  407.         {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  408.         {Start,          0, $(!REG_VT_DWORD),     $(!SERVICE_SYSTEM_START) }, +
  409.         {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  410.         {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  411.         {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  412.         {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }  +
  413.         }
  414.  
  415.     ; Added Device Description below -BBD
  416. ;       set DeviceDescription = $(!Option)
  417.     set DeviceDescription = "S3 Compatible Display Adapter"
  418.  
  419.     set ParametersValues = { +
  420.         {"Device Description",        0, $(!REG_VT_SZ),       $(DeviceDescription) }, +
  421.         {InstalledDisplayDrivers,     0, $(!REG_VT_MULTI_SZ), $(InstalledDisplays) }, +
  422.         {VgaCompatible,               0, $(!REG_VT_DWORD),    $(VgaCompatible)     }, +
  423.         {DefaultSettings.BitsPerPel,  0, $(!REG_VT_DWORD),    $(BitsPerPel)        }, +
  424.         {DefaultSettings.XResolution, 0, $(!REG_VT_DWORD),    $(XResolution)       }, +
  425.         {DefaultSettings.YResolution, 0, $(!REG_VT_DWORD),    $(YResolution)       }  +
  426.         }
  427.  
  428.     ifstr(i) $(VRefresh) != ""
  429.         set VRefreshValue = {DefaultSettings.VRefresh, 0, $(!REG_VT_DWORD), $(VRefresh)}
  430.         set ParametersValue = >($(ParametersValue), $(VRefreshValue))
  431.     endif
  432.  
  433.     ifstr(i) $(Interlaced) != ""
  434.         set InterlacedValue = {DefaultSettings.Interlaced, 0, $(!REG_VT_DWORD), $(Interlaced)}
  435.         set ParametersValue = >($(ParametersValue), $(InterlacedValue))
  436.     endif
  437.  
  438.     set DeviceValues     = {}
  439.     set EventLogValues   = { +
  440.         {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  441.         {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  442.         }
  443.  
  444.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  445.                         $(ServicesValues)   +
  446.                         $(ParametersValues) +
  447.                         $(DeviceValues)     +
  448.                         $(EventLogValues)   +
  449.                         Device0
  450.  
  451.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  452.         Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  453.         goto finish_InstallOption
  454.     endif
  455.  
  456.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  457.         Debug-Output "MakeServicesEntry failed for video"
  458.         goto finish_InstallOption
  459.     endif
  460.  
  461.     ;
  462.     ;
  463.     ; then disable the previous video entry
  464.     ;
  465.  
  466.     ifstr(i) $(CurrentEntry) != $(MiniportDriver)
  467.         ifstr(i) $(CurrentEntry) != VGA
  468.         ifstr(i) $(CurrentEntry) != ""
  469.             shell "registry.inf" ModifyServicesEntry $(CurrentEntry) $(!SERVICE_DISABLED)
  470.  
  471.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  472.             Debug-Output "Couldn't find DisableServicesEntry in registry.inf"
  473.             goto errorconfig
  474.             endif
  475.  
  476.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  477.             Debug-Output "DisableServices entry failed"
  478.             endif
  479.         endif
  480.         endif
  481.     endif
  482.  
  483.     goto configdone
  484.  
  485. errorconfig = +
  486.     ifstr(i) $(CurrentEntry) != $(MiniportDriver)
  487.         shell "registry.inf" ModifyServicesEntry $(MiniportDriver) $(!SERVICE_DISABLED)
  488.         ifstr(i) $(CurrentEntry) != ""
  489.         shell "registry.inf" ModifyServicesEntry $(CurrentEntry) $(!SERVICE_SYSTEM_START)
  490.         endif
  491.     endif
  492.     goto finish_InstallOption
  493.  
  494. configdone = +
  495.  
  496.     endif
  497.  
  498.     set Status = STATUS_SUCCESSFUL
  499.  
  500. finish_InstallOption = +
  501.     ForListDo $(DrivesToFree)
  502.     LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  503.     EndForListDo
  504.  
  505.     Return $(Status)
  506.  
  507.  
  508. [Install-AddCopyOption]
  509.  
  510.     set STF_VITAL = ""
  511.     ;
  512.     ; Add the files to the copy list
  513.     ;
  514.     AddSectionKeyFileToCopyList   Files-DisplayMiniportDrivers   +
  515.                   $(MiniportDriver)              +
  516.                   $(SrcDir)                      +
  517.                   $(!STF_WINDOWSSYSPATH)\drivers
  518.  
  519.     ForListDo $(InstalledDisplays)
  520.     AddSectionKeyFileToCopyList   Files-DisplayDLLs          +
  521.                       $($)                       +
  522.                       $(SrcDir)                  +
  523.                       $(!STF_WINDOWSSYSPATH)
  524.  
  525.     EndForListDo
  526.  
  527.     exit
  528.  
  529.  
  530. [Install-DoCopyOption]
  531.  
  532.     ;
  533.     ; Copy files in the copy list
  534.     ;
  535.     CopyFilesInCopyList
  536.     exit
  537.  
  538. ;**************************************************************************
  539. ; PROGRESS GUAGE VARIABLES
  540. ;**************************************************************************
  541.  
  542. [ProgressCopyENG]
  543.     ProCaption   = "Windows NT Setup"
  544.     ProCancel    = "Cancel"
  545.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  546.            "to cancel copying files?"
  547.     ProCancelCap = "Setup Message"
  548.     ProText1     = "Copying:"
  549.     ProText2     = "To:"
  550.  
  551. [StringsENG]
  552.     String1 = "Display"
  553.     String2 = "Please enter the full path to the S3 Display "+
  554.           "driver files.  Then choose Continue."
  555.  
  556. ;-----------------------------------------------------------------------
  557. ; SOURCE MEDIA DESCRIPTIONS
  558. ; -------------------------
  559. ; The OEM should list all the diskette labels here.  The source media
  560. ; description is used during copy to prompt the user for a diskette
  561. ; if the source is diskettes.
  562. ;
  563. ; Use 1 = "Diskette 1 Label" , TAGFILE = disk1
  564. ;     2 = "Diskette 2 Label" , TAGFILE = disk2
  565. ;     ...
  566. ;-----------------------------------------------------------------------
  567.  
  568. ;--------------------------------------------------------------------
  569. ; THE SECTIONS BELOW SHOULD BE AUTOMATICALLY GENERATED BY THE EXCEL
  570. ; SPREAD SHEETS
  571. ;--------------------------------------------------------------------
  572.  
  573. [Source Media Descriptions]
  574.     1  = "S3 Video Driver Update"  , TAGFILE = disk1
  575.  
  576. [Files-DisplayDLLs]
  577. s3 = 1,s3.dll , SIZE=999
  578.  
  579. [Files-DisplayMiniportDrivers]
  580. s3 = 1,s3.sys , SIZE=999
  581.