Annotation of ntddk/src/setup/inf/video/mips/oemsetup.inf, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.