Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
5.0 KiB

  1. [MCAOptions]
  2. [MCAFilename]
  3. [MCAOptionsTextENG]
  4. [ISAOptions]
  5. [ISAFilename]
  6. [ISAOptionsTextENG]
  7. [EISAOptions]
  8. [EISAFilename]
  9. [EISAOptionsTextENG]
  10. [Jazz-Internal BusOptions]
  11. [Jazz-Internal BusFilename]
  12. [Jazz-Internal BusOptionsTextENG]
  13. [Identification]
  14. OptionType = NetAdapter
  15. [Identify]
  16. read-syms Identification
  17. set Status = STATUS_SUCCESSFUL
  18. set Identifier = $(OptionType)
  19. set Media = #("Source Media Descriptions", 1, 1)
  20. Return $(Status) $(Identifier) $(Media)
  21. [ReturnOptions]
  22. set Status = STATUS_FAILED
  23. set OptionList = {}
  24. set OptionTextList = {}
  25. set LanguageList = ^(LanguagesSupported, 1)
  26. Ifcontains(i) $($0) in $(LanguageList)
  27. ifstr(i) $($1) == ""
  28. goto returnoptions
  29. endif
  30. else
  31. set Status = STATUS_NOLANGUAGE
  32. goto finish_ReturnOptions
  33. endif
  34. returnoptions = +
  35. set OptionList = ^($($1)Options, 1)
  36. set OptionTextList = ^($($1)OptionsText$($0), 1)
  37. set Status = STATUS_SUCCESSFUL
  38. finish_ReturnOptions = +
  39. Return $(Status) $(OptionList) $(OptionTextList)
  40. [FileConstants]
  41. UtilityInf = "UTILITY.INF"
  42. ParamInf = "NCPARAM.INF"
  43. subroutineinf = "SUBROUTN.INF"
  44. SoftwareType = "driver"
  45. Exit_Code = 0
  46. [GeneralConstants]
  47. from = ""
  48. to = ""
  49. ExitCodeOk = 0
  50. ExitCodeCancel = 1
  51. ExitCodeFatal = 2
  52. KeyNull = ""
  53. MAXIMUM_ALLOWED = 33554432
  54. RegistryErrorIndex = NO_ERROR
  55. KeyProduct = ""
  56. KeyParameters = ""
  57. TRUE = 1
  58. FALSE = 0
  59. NoTitle = 0
  60. ExitState = "Active"
  61. OldVersionExisted = $(FALSE)
  62. DriverPath = $(!STF_NTPATH)\drivers
  63. [InstallOption]
  64. set Option = $($1)
  65. set SrcDir = $($2)
  66. set AddCopy = $($3)
  67. set DoCopy = $($4)
  68. set DoConfig = $($5)
  69. set LanguageList = ^(LanguagesSupported, 1)
  70. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  71. Return STATUS_NOLANGUAGE
  72. endif
  73. set-subst LF = "\n"
  74. read-syms GeneralConstants
  75. read-syms FileConstants
  76. ForListDo $(!STF_BUSTYPELIST)
  77. set OptionList = ^($($)Options,1)
  78. set FileNameList = ^($($)Filename,1)
  79. ifint ~($(OptionList),$(Option)) != 0
  80. goto FoundBus
  81. endif
  82. EndForListDo
  83. FoundBus = +
  84. debug-output *($(FileNameList), ~($(OptionList), $(Option)))
  85. Shell "ntlanman.inf" RemoveOldInfFile $(Option), "NetAdapter", "oemnad", "oemnadzz.inf"
  86. set Num = 0
  87. nextinf = +
  88. ifint $(Num) < 99
  89. set OemFileName = "oemnad"$(Num)".inf"
  90. set FileToCheck = $(!STF_WINDOWSSYSPATH)"\"$(OemFileName)
  91. install Install-SeeIfFileIsPresent
  92. ifstr(i) $(STATUS) == "YES"
  93. set-add Num = $(Num) 1
  94. goto nextinf
  95. else
  96. goto copyinf
  97. endif
  98. endif
  99. goto finish
  100. copyinf = +
  101. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  102. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  103. Goto ShellCodeError
  104. Else-Ifstr(i) $($R0) == STATUS_FAILED
  105. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  106. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  107. goto ShellCodeError
  108. endif
  109. set Error = $($R0)
  110. Goto fatal
  111. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  112. Goto finish
  113. Endif
  114. Split-String $($R1), "\", DiskLocationInfo
  115. Set SrcDir = ""
  116. ifstr(i) *($(DiskLocationInfo),1) == "\"
  117. ifstr(i) *($(DiskLocationInfo),2) == "\"
  118. set SrcDir = "\\"*($(DiskLocationInfo),3)"\"*($(DiskLocationInfo),5)
  119. endif
  120. else
  121. Set SrcDir = *($(DiskLocationInfo),1)
  122. endif
  123. debug-output $(SrcDir)
  124. set OemSrc = $(SrcDir)*($(FileNameList), ~($(OptionList), $(Option)))
  125. set OemDst = $(!STF_WINDOWSSYSPATH)"\"$(OemFileName)
  126. install Install-OemINF
  127. Split-String $(OemSrc), "\", OemSrcInfo
  128. QueryListSize ListSize $(OemSrcInfo)
  129. set-sub ListSize = $(ListSize) 2
  130. set Count = 0
  131. set SrcDir = ""
  132. SrcDirLoop = +
  133. set-add Count = $(Count) 1
  134. set SrcDir = $(SrcDir)*($(OemSrcInfo),$(Count))
  135. ifint $(Count) != $(ListSize)
  136. goto SrcDirLoop
  137. endif
  138. debug-output $(SrcDir)
  139. set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  140. Shell $(OemDst) "InstallOption" +
  141. $(!STF_LANGUAGE) $(Option) +
  142. $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  143. finish = +
  144. return STATUS_SUCCESSFUL
  145. ShellCodeError = +
  146. set DlgType = "MessageBox"
  147. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  148. set STF_MB_TEXT = $(ShellCodeErrorText)
  149. set STF_MB_TYPE = 1
  150. set STF_MB_ICON = 3
  151. set STF_MB_DEF = 1
  152. ui start "Error Message"
  153. setfailed = +
  154. set CommonStatus = STATUS_FAILED
  155. term = +
  156. Return $(CommonStatus)
  157. [Source Media Descriptions]
  158. 1 = "Windows NT Setup Disk #1" , TAGFILE = disk1.s
  159. 2 = "Windows NT Setup CD-ROM Disk" , TAGFILE = disk2.s
  160. [ProductType]
  161. STF_PRODUCT = WinNT
  162. STF_PLATFORM = Alpha
  163. [LanguagesSupported]
  164. ENG
  165. [Install-SeeIfFileIsPresent]
  166. LibraryProcedure STATUS,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)
  167. exit
  168. [Install-OemINF]
  169. LibraryProcedure STATUS,$(!LIBHANDLE), CopySingleFile $(OemSrc) $(OemDst)
  170. exit