home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 November / VPR9611B.ISO / driver / iodata / drv98120 / nta.upe / OEMSETUP.INF next >
INI File  |  1995-04-26  |  19KB  |  557 lines

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