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