|
|
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, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, PRINTER, ...
8: ;-----------------------------------------------------------------------
9:
10: [Identification]
11: OptionType = LAYOUT
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: [Options]
36: 00000809 = kbduk.dll ; UK English
37:
38:
39:
40: ;-----------------------------------------------------------------------
41: ; OPTION TEXT SECTION
42: ; -------------------
43: ; These are text strings used to identify the option to the user. There
44: ; are separate sections for each language supported. The format of the
45: ; section name is "OptionsText" concatenated with the Language represented
46: ; by the section.
47: ;
48: ;-----------------------------------------------------------------------
49:
50: [OptionsTextENG]
51: 00000809 = "OEM UK English Keyboard Layout"
52:
53:
54: [StringsENG]
55: String1 = "Setup couldn't install the chosen keyboard layout."
56:
57: ;---------------------------------------------------------------------------
58: ; 1. Identify
59: ;
60: ; DESCRIPTION: To verify that this INF deals with the same type of options
61: ; as we are choosing currently.
62: ;
63: ; INPUT: None
64: ;
65: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
66: ; $($R1): Option Type (COMPUTER ...)
67: ; $($R2): Diskette description
68: ;---------------------------------------------------------------------------
69:
70: [Identify]
71: ;
72: ;
73: read-syms Identification
74:
75: set Status = STATUS_SUCCESSFUL
76: set Identifier = $(OptionType)
77: set Media = #("Source Media Descriptions", 1, 1)
78:
79: Return $(Status) $(Identifier) $(Media)
80:
81:
82:
83: ;------------------------------------------------------------------------
84: ; 2. ReturnOptions:
85: ;
86: ; DESCRIPTION: To return the option list supported by this INF and the
87: ; localised text list representing the options.
88: ;
89: ;
90: ; INPUT: $($0): Language used. ( ENG | FRN | ... )
91: ;
92: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
93: ; STATUS_NOLANGUAGE
94: ; STATUS_FAILED
95: ;
96: ; $($R1): Option List
97: ; $($R2): Option Text List
98: ;------------------------------------------------------------------------
99:
100: [ReturnOptions]
101: ;
102: ;
103: set Status = STATUS_FAILED
104: set OptionList = {}
105: set OptionTextList = {}
106:
107: ;
108: ; Check if the language requested is supported
109: ;
110: set LanguageList = ^(LanguagesSupported, 1)
111: Ifcontains(i) $($0) in $(LanguageList)
112: goto returnoptions
113: else
114: set Status = STATUS_NOLANGUAGE
115: goto finish_ReturnOptions
116: endif
117:
118: ;
119: ; form a list of all the options and another of the text representing
120: ;
121:
122: returnoptions = +
123: set OptionList = ^(Options, 0)
124: set OptionTextList = ^(OptionsText$($0), 1)
125: set Status = STATUS_SUCCESSFUL
126:
127: finish_ReturnOptions = +
128: Return $(Status) $(OptionList) $(OptionTextList)
129:
130:
131:
132: ;***************************************
133: ; INTERNAL INSTALL ENTRY POINT FROM INF
134: ;***************************************
135: ;
136: ; 3. InstallOption:
137: ;
138: ; FUNCTION: To copy files representing OEM Options
139: ; To configure the installed option
140: ; To update the registry for the installed option
141: ;
142: ; INPUT: $($0): Language to use
143: ; $($1): OptionID to install
144: ; $($2): SourceDirectory
145: ; $($4): AddCopy (YES | NO)
146: ; $($5): DoCopy (YES | NO)
147: ; $($6): DoConfig (YES | NO)
148: ;
149: ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
150: ; STATUS_NOLANGUAGE |
151: ; STATUS_USERCANCEL |
152: ; STATUS_FAILED
153: ;
154:
155: [InstallOption]
156:
157: ;
158: ; Set default values for
159: ;
160: set Status = STATUS_FAILED
161:
162: ;
163: ; extract parameters
164: ;
165: set Option = $($1)
166: set SrcDir = $($2)
167: set AddCopy = $($3)
168: set DoCopy = $($4)
169: set DoConfig = $($5)
170:
171: ;
172: ; Check if the language requested is supported
173: ;
174: set LanguageList = ^(LanguagesSupported, 1)
175: Ifcontains(i) $($0) in $(LanguageList)
176: else
177: set Status = STATUS_NOLANGUAGE
178: goto finish_InstallOption
179: endif
180: read-syms Strings$($0)
181:
182: ;
183: ; check to see if Option is supported.
184: ;
185:
186: set OptionList = ^(Options, 0)
187: ifcontains $(Option) in $(OptionList)
188: else
189: goto finish_InstallOption
190: endif
191: set OptionList = ""
192:
193:
194: set OptionFile = #(Options, $(Option), 1)
195:
196: installtheoption = +
197: ;
198: ; Code to add files to copy list
199: ;
200:
201: ifstr(i) $(AddCopy) == "YES"
202: install Install-AddCopyOption
203: ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
204: Debug-Output "Adding video files to copy list failed"
205: goto finish_InstallOption
206: endif
207: endif
208:
209: ifstr(i) $(DoCopy) == "YES"
210: read-syms ProgressCopy$($0)
211: install Install-DoCopyOption
212: ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
213: Debug-Output "Copying files failed"
214: goto finish_InstallOption
215: else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
216: set Status = STATUS_USERCANCEL
217: goto finish_InstallOption
218: endif
219: endif
220:
221: ifstr(i) $(DoConfig) == "YES"
222: shell "registry.inf" MakeLayoutEntry $(Option) $(OptionFile)
223:
224: ifint $($ShellCode) != $(!SHELL_CODE_OK)
225: Debug-Output "Couldn't execute MakeLayoutEntry in registry.inf"
226: shell "subroutn.inf" SetupMessage $($0) "FATAL" $(String2)
227: goto finish_InstallOption
228: endif
229:
230: ifstr(i) $($R0) != STATUS_SUCCESSFUL
231: Debug-Output "MakeLayoutEntry failed"
232: shell "subroutn.inf" SetupMessage $($0) "FATAL" $(String2)
233: goto finish_InstallOption
234: endif
235: endif
236:
237: set Status = STATUS_SUCCESSFUL
238:
239: finish_InstallOption = +
240: Return $(Status)
241:
242:
243:
244: [Install-AddCopyOption]
245:
246: set STF_VITAL = ""
247: ;
248: ; Add the files to the copy list
249: ;
250: AddSectionKeyFileToCopyList Files-Layout +
251: $(Option) +
252: $(SrcDir) +
253: $(!STF_WINDOWSSYSPATH)
254: exit
255:
256:
257: [Install-DoCopyOption]
258:
259: ;
260: ; Copy files in the copy list
261: ;
262: CopyFilesInCopyList
263: exit
264:
265: ;**************************************************************************
266: ; PROGRESS GUAGE VARIABLES
267: ;**************************************************************************
268:
269: [ProgressCopyENG]
270: ProCaption = "Windows NT Setup"
271: ProCancel = "Cancel"
272: ProCancelMsg = "Windows NT is not correcly installed. Are you sure you want "+
273: "to cancel copying files?"
274: ProCancelCap = "Setup Message"
275: ProText1 = "Copying:"
276: ProText2 = "To:"
277:
278:
279: ;***************************************************************
280: ; EXTERNAL INSTALL ENTRY POINT FROM CONTROL PANEL
281: ;***************************************************************
282:
283: ;
284:
285: ;
286: ; 4. ExternalInstallOption:
287: ;
288: ; FUNCTION: To copy files representing OEM Options
289: ; To configure the installed option
290: ; To update the registry for the installed option
291: ;
292: ; INPUT: /t STF_LANGUAGE = Language to use (ENG)
293: ; /t OPTION = Option to install (eg. 0010209)
294: ; /t ADDCOPY = YES | NO
295: ; /t DOCOPY = YES | NO
296: ; /t DOCONFIG = YES | NO
297: ;
298: ; OUTPUT: Exit code from process = 0 if okay
299: ; Anything else --> Error
300: ;
301:
302:
303: [ExternalInstallOption]
304: ;
305: ; set this to a non-zero value if you want to see debug-output statements
306: ; under ntsd
307: ;
308: Set !G:DebugOutputControl = 0
309: ;
310: ; Set up global variables needed by install option
311: ;
312: set Exit_Code = $(!SETUP_ERROR_GENERAL)
313: set DrivesToFree = {}
314: install LoadSetupLibrary
315:
316: ; check externally passed parameters
317:
318: ifstr(i) $(STF_LANGUAGE) == ""
319: goto end
320: else-ifstr(i) $(OPTION) == ""
321: goto end
322: else-ifstr(i) $(ADDCOPY) == ""
323: goto end
324: else-ifstr(i) $(DOCOPY) == ""
325: goto end
326: else-ifstr(i) $(DOCONFIG) == ""
327: goto end
328: endif
329:
330:
331: read-syms UiVars
332: detect UiVars
333:
334: set STF_SRCDIR = A:\
335: shell "registry.inf" GetNTSource
336: ifint $($ShellCode) != $(!SHELL_CODE_OK)
337: else-ifstr(i) $($R0) != STATUS_SUCCESSFUL
338: else
339: set STF_SRCDIR = $($R1)
340: endif
341:
342: ;
343: ; ask for the setup sources
344: ;
345: shell "subroutn.inf" DoAskSource $(STF_SRCDIR)
346: ifint $($ShellCode) != $(!SHELL_CODE_OK)
347: Debug-Output "shelling DoAskSource failed"
348: goto end
349: endif
350: ifstr(i) $($R0) == STATUS_SUCCESSFUL
351: set STF_SRCDIR = $($R1)
352: ifstr(i) $($R2) != ""
353: set DrivesToFree = >($(DrivesToFree), $($R2))
354: endif
355: else
356: goto end
357: endif
358:
359: ;
360: shell "" InstallOption $(STF_LANGUAGE) $(OPTION) $(STF_SRCDIR) $(ADDCOPY) $(DOCOPY) $(DOCONFIG)
361: ifint $($ShellCode) != $(!SHELL_CODE_OK)
362: Debug-Output "Execing Configuring hardware options failed"
363: goto end
364: endif
365: ifstr(i) $($R0) == STATUS_SUCCESSFUL
366: set Exit_Code = $(!SETUP_ERROR_SUCCESS)
367: else-ifstr(i) $($R0) == STATUS_USERCANCEL
368: set Exit_Code = $(!SETUP_ERROR_USERCANCEL)
369: endif
370:
371: end =+
372: ForListDo $(DrivesToFree)
373: LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
374: EndForListDo
375:
376: install FreeSetupLibrary
377: exit
378:
379: [LoadSetupLibrary]
380: LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
381: exit
382:
383: [FreeSetupLibrary]
384: FreeLibrary $(!LIBHANDLE)
385: exit
386:
387: [UiVars]
388:
389: STF_CONTROLSET = CurrentControlSet
390: STF_WINDOWSPATH = "" ? $(!LIBHANDLE) GetWindowsNtDir
391: STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
392:
393: [Source Media Descriptions]
394: 1 = "OEM DISK (LAYOUT)" , TAGFILE = laytag
395:
396: [ProductType]
397: STF_PRODUCT = Winnt
398: STF_PLATFORM = Mips
399:
400: [Files-Layout]
401: 00000809 = 1,kbduk.dll , SIZE=999
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.