1 | /*:VRX Main
|
---|
2 | */
|
---|
3 | /* Main
|
---|
4 | */
|
---|
5 | ok = VRRedirectStdIO('OFF')
|
---|
6 | Main:
|
---|
7 | /* Process the arguments.
|
---|
8 | Get the parent window.
|
---|
9 | */
|
---|
10 | parse source . calledAs .
|
---|
11 | parent = ""
|
---|
12 | argCount = arg()
|
---|
13 | argOff = 0
|
---|
14 | if( calledAs \= "COMMAND" )then do
|
---|
15 | if argCount >= 1 then do
|
---|
16 | parent = arg(1)
|
---|
17 | argCount = argCount - 1
|
---|
18 | argOff = 1
|
---|
19 | end
|
---|
20 | end; else do
|
---|
21 | call VROptions 'ImplicitNames'
|
---|
22 | call VROptions 'NoEchoQuit'
|
---|
23 | end
|
---|
24 | InitArgs.0 = argCount
|
---|
25 | if( argCount > 0 )then do i = 1 to argCount
|
---|
26 | InitArgs.i = arg( i + argOff )
|
---|
27 | end
|
---|
28 | drop calledAs argCount argOff
|
---|
29 |
|
---|
30 | /* Load the windows
|
---|
31 | */
|
---|
32 | call VRInit
|
---|
33 | parse source . . spec
|
---|
34 | _VREPrimaryWindowPath = ,
|
---|
35 | VRParseFileName( spec, "dpn" ) || ".VRW"
|
---|
36 | _VREPrimaryWindow = ,
|
---|
37 | VRLoad( parent, _VREPrimaryWindowPath )
|
---|
38 | drop parent spec
|
---|
39 | if( _VREPrimaryWindow == "" )then do
|
---|
40 | call VRMessage "", "Cannot load window:" VRError(), ,
|
---|
41 | "Error!"
|
---|
42 | _VREReturnValue = 32000
|
---|
43 | signal _VRELeaveMain
|
---|
44 | end
|
---|
45 |
|
---|
46 | /* Process events
|
---|
47 | */
|
---|
48 | call Init
|
---|
49 | signal on halt
|
---|
50 | do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
|
---|
51 | _VREEvent = VREvent()
|
---|
52 | interpret _VREEvent
|
---|
53 | end
|
---|
54 | _VREHalt:
|
---|
55 | _VREReturnValue = Fini()
|
---|
56 | call VRDestroy _VREPrimaryWindow
|
---|
57 | _VRELeaveMain:
|
---|
58 | call VRFini
|
---|
59 | exit _VREReturnValue
|
---|
60 |
|
---|
61 | VRLoadSecondary:
|
---|
62 | __vrlsWait = abbrev( 'WAIT', translate(arg(2)), 1 )
|
---|
63 | if __vrlsWait then do
|
---|
64 | call VRFlush
|
---|
65 | end
|
---|
66 | __vrlsHWnd = VRLoad( VRWindow(), VRWindowPath(), arg(1) )
|
---|
67 | if __vrlsHWnd = '' then signal __vrlsDone
|
---|
68 | if __vrlsWait \= 1 then signal __vrlsDone
|
---|
69 | call VRSet __vrlsHWnd, 'WindowMode', 'Modal'
|
---|
70 | __vrlsTmp = __vrlsWindows.0
|
---|
71 | if( DataType(__vrlsTmp) \= 'NUM' ) then do
|
---|
72 | __vrlsTmp = 1
|
---|
73 | end
|
---|
74 | else do
|
---|
75 | __vrlsTmp = __vrlsTmp + 1
|
---|
76 | end
|
---|
77 | __vrlsWindows.__vrlsTmp = VRWindow( __vrlsHWnd )
|
---|
78 | __vrlsWindows.0 = __vrlsTmp
|
---|
79 | do while( VRIsValidObject( VRWindow() ) = 1 )
|
---|
80 | __vrlsEvent = VREvent()
|
---|
81 | interpret __vrlsEvent
|
---|
82 | end
|
---|
83 | __vrlsTmp = __vrlsWindows.0
|
---|
84 | __vrlsWindows.0 = __vrlsTmp - 1
|
---|
85 | call VRWindow __vrlsWindows.__vrlsTmp
|
---|
86 | __vrlsHWnd = ''
|
---|
87 | __vrlsDone:
|
---|
88 | return __vrlsHWnd
|
---|
89 |
|
---|
90 | /*:VRX _AnalyseConfigSys
|
---|
91 | */
|
---|
92 | _AnalyseConfigSys:
|
---|
93 | /* From CONFIG.SYS we get the information, if
|
---|
94 | XF86SUP.SYS is installed
|
---|
95 | WIN32K.SYS is installed (currently)
|
---|
96 | which display driver is installed
|
---|
97 | */
|
---|
98 | ConfigSys = SysBootDrive()'\CONFIG.SYS'
|
---|
99 | do while lines(ConfigSys) > 0
|
---|
100 | ConfigLine = translate(strip(Linein(ConfigSys)))
|
---|
101 | if left(ConfigLine,3) <> 'REM' then do
|
---|
102 | select
|
---|
103 | when Pos('XF86SUP.SYS', ConfigLine) > 0 then do
|
---|
104 | Foundxf86supsys = 1
|
---|
105 | xf86supsysLine = substr(ConfigLine,pos(':',ConfigLine)-1)
|
---|
106 | xf86supsysLine = left(xf86supsysLine, pos('SYS', xf86supsysLine) + 3)
|
---|
107 | end
|
---|
108 | when Pos('WIN32K.SYS', ConfigLine) > 0 then do
|
---|
109 | Win32Kparm = substr(ConfigLine,pos("WIN32K.SYS", ConfigLine) + 11)
|
---|
110 | FoundWin32KSysNow = 1
|
---|
111 | end
|
---|
112 | when Pos('SDDGRADD', ConfigLine) > 0 then do
|
---|
113 | Driver = "Scitech Display Doctor"
|
---|
114 | FoundScitech = 1
|
---|
115 | end
|
---|
116 | when Pos('MGAX64', ConfigLine) > 0 then Driver = "Matrox Driver"
|
---|
117 | when Pos('GENGRADD', ConfigLine) > 0 then Driver = "Generic GRADD"
|
---|
118 | when Pos('ATIGRADD', ConfigLine) > 0 then Driver = "ATI GRADD"
|
---|
119 | when Pos('CHPGRADD', ConfigLine) > 0 then Driver = "CHP GRADD"
|
---|
120 | when Pos('DYNGRADD', ConfigLine) > 0 then Driver = "DYN GRADD"
|
---|
121 | when Pos('G_VGRADD', ConfigLine) > 0 then Driver = "G_V GRADD"
|
---|
122 | when Pos('MGAGRADD', ConfigLine) > 0 then Driver = "Matrox GRADD"
|
---|
123 | when Pos('NMGRADD', ConfigLine) > 0 then Driver = "NeoMagic GRADD"
|
---|
124 | when Pos('S3GRADD', ConfigLine) > 0 then Driver = "S3 GRADD"
|
---|
125 | when Pos('TRIGRADD', ConfigLine) > 0 then Driver = "Trident GRADD"
|
---|
126 | when Pos('VIRGEGRADD', ConfigLine) > 0 then Driver = "S3 ViRGE GRADD"
|
---|
127 | when Pos('VGAGRADD', ConfigLine) > 0 then Driver = "VGA GRADD"
|
---|
128 | /* add other display drivers here */
|
---|
129 | otherwise nop
|
---|
130 | end
|
---|
131 | end
|
---|
132 | end
|
---|
133 | call lineout(ConfigSys)
|
---|
134 | return
|
---|
135 | /*:VRX _AnalyseKernel32DLL
|
---|
136 | */
|
---|
137 | _AnalyseKernel32DLL:
|
---|
138 | /* we get build level information
|
---|
139 | from Kernel32.DLL by spawning
|
---|
140 | BLDLEVEL.EXE, redirecting the
|
---|
141 | output and analysing it */
|
---|
142 |
|
---|
143 | /* return if we do not have a valid directory */
|
---|
144 | if OdinSysDir = '' then return
|
---|
145 |
|
---|
146 | /* get Kernel32 version */
|
---|
147 | BldInfo = 'BldInfo.TXT'
|
---|
148 |
|
---|
149 | 'BLDLevel 'OdinSysDir'Kernel32.DLL >'BldInfo
|
---|
150 | do until lines(BldInfo) = 0
|
---|
151 | BldLine = translate(linein(BldInfo))
|
---|
152 | if pos('FILE VERSION',BldLine) > 0 then do
|
---|
153 | Kernel32Ver = word(BldLine,3)
|
---|
154 | end
|
---|
155 | if pos('DATE/TIME',BldLine) > 0 then do
|
---|
156 | Kernel32Date = word(BldLine,4)||right('0'||_xmonth(word(BldLine,3)),2)||right('0'||word(BldLine,2),2)
|
---|
157 | end
|
---|
158 | end
|
---|
159 | call lineout BldInfo
|
---|
160 | ok = SysFileDelete(BldInfo)
|
---|
161 | return
|
---|
162 |
|
---|
163 | /*:VRX _AnalyseOdin32_xLog
|
---|
164 | */
|
---|
165 | _AnalyseOdin32_xLog:
|
---|
166 | /* We get the information about
|
---|
167 | WIN32K.SYS installed (when bug occured)
|
---|
168 | Odin directory
|
---|
169 | Odin\System directory
|
---|
170 | Commandline of Win32 program
|
---|
171 | location of Odin.INI
|
---|
172 | we have a visible progressbar,
|
---|
173 | this analysis is usually done after
|
---|
174 | reading 50 lines or so of the logfile
|
---|
175 | */
|
---|
176 | If LogFileName = '' then return
|
---|
177 |
|
---|
178 | /* clear variables */
|
---|
179 | OdinWinDir = ''
|
---|
180 | OdinSysDir = ''
|
---|
181 | ExeFile = ''
|
---|
182 | FoundWinDir = 0
|
---|
183 | FoundSysDir = 0
|
---|
184 | FoundExe = 0
|
---|
185 | FoundOdinIni = 0
|
---|
186 |
|
---|
187 | ExceptFilename = filespec('D',LogFileName)||filespec('P',LogFileName)||'Except.$$$'
|
---|
188 |
|
---|
189 | LogFileSize = stream(LogfileName,'c','QUERY SIZE')
|
---|
190 | ApproxLines = LogFileSize % 41
|
---|
191 | call _InitProgress
|
---|
192 | LogLine = ''
|
---|
193 | do J = 1 to 5 until FoundWin32KSysAtBugTime = 1
|
---|
194 | LogLine = linein(LogFileName)
|
---|
195 | if pos('WIN32K - INSTALLED',translate(LogLine)) > 0 then do
|
---|
196 | FoundWin32KSysAtBugTime = 1
|
---|
197 | Win32KLogLine = LogLine
|
---|
198 | end
|
---|
199 | end
|
---|
200 | do until lines(LogFileName) = 0
|
---|
201 | LogLine = linein(LogFileName)
|
---|
202 | select
|
---|
203 | when pos('Windows dir:',LogLine) > 0 then do
|
---|
204 | OdinWinDir = strip(Substr(LogLine,pos('Windows dir:',LogLine)+14))'\'
|
---|
205 | FoundWinDir = 1
|
---|
206 | end
|
---|
207 | when pos('System32 dir:',LogLine) > 0 then do
|
---|
208 | OdinSysDir = strip(Substr(LogLine,pos('System32 dir:',LogLine)+14))'\'
|
---|
209 | FoundSysDir = 1
|
---|
210 | end
|
---|
211 | when pos('Cmd line:',LogLine) > 0 then do
|
---|
212 | EXEFile = strip(Substr(LogLine,pos('Cmd line:',LogLine)+10))
|
---|
213 | FoundExe = 1
|
---|
214 | end
|
---|
215 | when pos('GetCommandLineA:',LogLine) > 0 then do
|
---|
216 | ExeFile = strip(Substr(LogLine,pos('GetCommandLineA:',LogLine)+16))
|
---|
217 | FoundExe = 1
|
---|
218 | end
|
---|
219 | when pos('Odin ini loaded:',LogLine) > 0 then do
|
---|
220 | OdinINI = strip(Substr(LogLine,pos('Odin ini loaded:',LogLine)+16))
|
---|
221 | FoundOdinIni = 1
|
---|
222 | end
|
---|
223 | otherwise do
|
---|
224 | I = I + 1
|
---|
225 | if I // 1000 = 0 then do
|
---|
226 | call _CheckForEvent
|
---|
227 | Progress = I * 100 % ApproxLines
|
---|
228 | ok = VRSet("SL_Progress","Percentile",Progress)
|
---|
229 | end
|
---|
230 | end
|
---|
231 | if FoundWinDir & FoundSysDir & FoundExe & FoundOdinIni then leave
|
---|
232 | end
|
---|
233 | end
|
---|
234 | ok = VRSet("Progress","Visible", 0)
|
---|
235 | call lineout(LogFileName)
|
---|
236 | return
|
---|
237 | /*:VRX _AnalyseOdinIni
|
---|
238 | */
|
---|
239 | _AnalyseOdinIni:
|
---|
240 | /* we get the INSTALLDATE information from Odin.INI */
|
---|
241 |
|
---|
242 | /* old method to locate Odin.INI - obsolete,
|
---|
243 | now we get Odin.Ini from the Logfile
|
---|
244 | Odin_INI = value('ODIN_INI',,'OS2ENVIRONMENT') */
|
---|
245 |
|
---|
246 | do until lines(OdinINI) = 0
|
---|
247 | OdinIniLine = translate(linein(OdinINI))
|
---|
248 | if pos('INSTALLDATE',OdinIniLine) > 0 then do
|
---|
249 | OdinInstLine = strip(substr(OdinIniLine,pos('=',OdinIniLine)+1))
|
---|
250 | OdinInstDoW = word(OdinInstLine,1)
|
---|
251 | OdinInstMonth = _xmonth(word(OdinInstLine,2))
|
---|
252 | OdinInstDay = right('0'||word(OdinInstLine,3),2)
|
---|
253 | OdinInstTime = word(OdinInstLine,4)
|
---|
254 | OdinInstYear = word(OdinInstLine,5)
|
---|
255 | OdinInstDate = OdinInstDay'.'OdinInstMonth'.'OdinInstYear
|
---|
256 | OdinInstDate2 = OdinInstYear||right('0'||OdinInstMonth,2)||right('0'||odinInstday,2)
|
---|
257 | leave
|
---|
258 | end
|
---|
259 | end
|
---|
260 | call lineout(OdinIni)
|
---|
261 | LastOdinInst=OdinInstDate' at 'OdinInstTime', current version 'OdinInstVer
|
---|
262 | ok = VRSet("EF_LastOdinInst","Value",LastOdinInst)
|
---|
263 | if OdinInstDate2 < builddate & builddate <> '' then do
|
---|
264 | Msg.Text = "You did not run OdinInst.EXE after your last installation. Run OdinInst.EXE, and rerun your program before submitting an Odin Bug Report!"
|
---|
265 | Msg.Type = "Error"
|
---|
266 | call _ShowMsg
|
---|
267 | ok = VRSet("PB_CreateReport","Visible", 0)
|
---|
268 | end
|
---|
269 | return
|
---|
270 |
|
---|
271 | /*:VRX _AnalyseOdininst
|
---|
272 | */
|
---|
273 | _AnalyseOdininst:
|
---|
274 | /* we get build level information
|
---|
275 | from OdinInst.EXE by spawning
|
---|
276 | BLDLEVEL.EXE, redirecting the
|
---|
277 | output and analysing it */
|
---|
278 |
|
---|
279 | /* get OdinInst Version */
|
---|
280 | BldInfo = 'BldInfo.TXT'
|
---|
281 |
|
---|
282 | 'BLDLevel 'OdinSysDir'OdinInst.exe >'BldInfo
|
---|
283 | do until lines(BldInfo) = 0
|
---|
284 | BldLine = translate(linein(BldInfo))
|
---|
285 | if pos('FILE VERSION',BldLine) > 0 then do
|
---|
286 | OdinInstVer = word(BldLine,3)
|
---|
287 | leave
|
---|
288 | end
|
---|
289 | end
|
---|
290 | call lineout BldInfo
|
---|
291 | ok = SysFileDelete(BldInfo)
|
---|
292 | return
|
---|
293 |
|
---|
294 | /*:VRX _AnalyseScitechDD
|
---|
295 | */
|
---|
296 | _AnalyseScitechDD:
|
---|
297 | /* we know that we have have a Scitech Driver
|
---|
298 | now lets determine which one. We analyse
|
---|
299 | SDDHELP.SYS and GRAPHICS.LOG */
|
---|
300 |
|
---|
301 | SDDHelpSys = SysBootDrive()'\OS2\SDDHELP.SYS'
|
---|
302 |
|
---|
303 | LogLine = ''
|
---|
304 | do until lines(SDDHelpSys) = 0
|
---|
305 | LogLine = translate(linein(SDDHelpSys),' ', d2c(0))
|
---|
306 | if pos('build',logline) > 0 then do
|
---|
307 | SddBuildNr = substr(LogLine,pos('build',logline),10)
|
---|
308 | end
|
---|
309 | end
|
---|
310 | ok = stream(SDDHelpSys,'c','CLOSE')
|
---|
311 |
|
---|
312 | GraphicsLog = SysBootDrive()'\OS2\DRIVERS\NUCLEUS\CONFIG\GRAPHICS.LOG'
|
---|
313 | License = linein(GraphicsLog)
|
---|
314 | select
|
---|
315 | when word(License,1)= 'Valid' & word(License,2) = 'IHV' then Driver = 'Scitech Display Doctor/SE'
|
---|
316 | when word(License,1)= 'Registered' & word(License,2) = 'end' then Driver = 'Scitech Display Doctor/Pro'
|
---|
317 | otherwise Driver = 'Scitech DD/Demo'
|
---|
318 | end
|
---|
319 |
|
---|
320 | LogLine = ''
|
---|
321 | do until pos('Chipset...',LogLine) > 0 | lines(GraphicsLog) = 0
|
---|
322 | LogLine = linein(GraphicsLog)
|
---|
323 | end
|
---|
324 | ChipSet = ''
|
---|
325 | if lines(graphicslog) = 0 then ChipSet = "Detection failed!"
|
---|
326 | else do I = 2 to words(logline)
|
---|
327 | ChipSet = Chipset||word(Logline,I)||' '
|
---|
328 | end
|
---|
329 | ok = stream(GraphicsLog,'c','CLOSE')
|
---|
330 | return
|
---|
331 |
|
---|
332 | /*:VRX _AnalyseSyslevelFPK
|
---|
333 | */
|
---|
334 | _AnalyseSyslevelFPK:
|
---|
335 | sys_os2 = SysSearchPath('path', 'syslevel.FPK')
|
---|
336 | if sys_os2 = '' then do
|
---|
337 | fpk_level = '(none)'
|
---|
338 | return
|
---|
339 | end
|
---|
340 | sys_info = translate(Charin(sys_os2, 1, 150),' ','00'x)
|
---|
341 | Parse Var sys_info . 45 fpk_level 141 os_comp 150
|
---|
342 | fpk_level = left(fpk_level,7)
|
---|
343 | ok = stream(sys_os2,'c','CLOSE')
|
---|
344 | return
|
---|
345 |
|
---|
346 | /*:VRX _AnalyseSysLevelOS2
|
---|
347 | */
|
---|
348 | _AnalyseSysLevelOS2:
|
---|
349 | sys_os2 = SysSearchPath('path', 'syslevel.os2')
|
---|
350 | sys_info = Charin(sys_os2, 1, 150)
|
---|
351 | Parse Var sys_info . 61 os_name 141 os_comp 150
|
---|
352 | os_name = Strip(os_name, 't', '00'x)
|
---|
353 | os_ver = SysOS2Ver()
|
---|
354 | if os_ver = 2.30 then OS2Type = "OS/2 Warp 3 (not supported)"
|
---|
355 | select
|
---|
356 | when os_comp = '5639A6100' then do
|
---|
357 | if os_ver = 2.40 then OS2Type = "OS/2 Warp 4"
|
---|
358 | if os_ver = 2.45 then OS2Type = "OS/2 Warp 4.5"
|
---|
359 | end
|
---|
360 | when os_comp = '5639A6101' then OS2Type = "OS/2 4.51 MCP or eComStation"
|
---|
361 | when os_comp = '5639A6150' then OS2Type = "OS/2 WSeB uni"
|
---|
362 | when os_comp = '5639A5550' then OS2Type = "OS/2 WSeB smp"
|
---|
363 | otherwise do
|
---|
364 | end
|
---|
365 | end
|
---|
366 | ok = stream(sys_os2,'c','CLOSE')
|
---|
367 |
|
---|
368 | /* get Kernel Version */
|
---|
369 | BldInfo = 'BldInfo.TXT'
|
---|
370 | 'BLDLevel 'SysBootDrive()'\os2krnl >'BldInfo
|
---|
371 | do until lines(BldInfo) = 0
|
---|
372 | BldLine = linein(BldInfo)
|
---|
373 | if pos('Signature',BldLine) > 0 then do
|
---|
374 | KrnlBuildVer = translate(word(BldLine,2),' ','#@:')
|
---|
375 | KrnlBuildVer = word(KrnlBuildVer,2)||word(KrnlBuildVer,3)
|
---|
376 | leave
|
---|
377 | end
|
---|
378 | end
|
---|
379 | call lineout BldInfo
|
---|
380 | ok = SysFileDelete(BldInfo)
|
---|
381 | return
|
---|
382 |
|
---|
383 | /*:VRX _AnalyseWarpINdatabase
|
---|
384 | */
|
---|
385 | _AnalyseWarpINdatabase:
|
---|
386 | FoundWarpIN = 1
|
---|
387 |
|
---|
388 | WarpINDir = strip(VRGetIni( "WarpIN", "Path", "User" ),,d2c(0))
|
---|
389 | if WarpINDir = '' then do
|
---|
390 | Msg.Text = "WarpIN directory not found!"
|
---|
391 | Msg.Type = "Warning"
|
---|
392 | call _ShowMsg
|
---|
393 | FoundWarpIN = 0
|
---|
394 | return
|
---|
395 | end
|
---|
396 | BDL = left(SysBootDrive(),1)
|
---|
397 | ok = SysFileTree(WarpInDir||'\DATBAS_'BDL'.INI',WarpINDB., 'FO')
|
---|
398 | select
|
---|
399 | when WarpINDB.0 = 0 then do
|
---|
400 | Msg.Text = "No WarpIN database file found!"
|
---|
401 | Msg.Type = "Warning"
|
---|
402 | call _ShowMsg
|
---|
403 | FoundWarpIN = 0
|
---|
404 | end
|
---|
405 | when WarpINDB.0 = 1 then do
|
---|
406 | WarpINDB = WarpINDB.1
|
---|
407 | end
|
---|
408 | /* when WarpINDB.0 > 1 then do
|
---|
409 | Msg.Text = "You appear to have more than one WarpIN database! Choosing biggest!"
|
---|
410 | Msg.Type = "Warning"
|
---|
411 | call _ShowMsg
|
---|
412 | MaxSize = 0
|
---|
413 | do I = 1 to WarpINDB.0
|
---|
414 | CurrSize = query(WarpinDB.I,'c','query size')
|
---|
415 | if CurrSize >= MaxSize then do
|
---|
416 | WarpINDB = WarpINDB.I
|
---|
417 | MaxSize = CurrSize
|
---|
418 | end
|
---|
419 | end
|
---|
420 | end */
|
---|
421 | otherwise do
|
---|
422 | msg.Text = 'Something weird has happened! You should not see this message!'
|
---|
423 | msg.Type = "Error"
|
---|
424 | call _ShowMsg
|
---|
425 | FoundWarpIN = 0
|
---|
426 | end
|
---|
427 | end
|
---|
428 |
|
---|
429 | /* WarpINDB = WarpInDir||'\DATBAS_E.INI' /* '\DATBAS_D.INI' */ */
|
---|
430 |
|
---|
431 | if FoundWarpIN then do
|
---|
432 | ok = SysIni(WarpInDB,'All:',"Apps")
|
---|
433 | if apps.0 = 0 then do
|
---|
434 | Msg.Text = "WarpIN database "WarpINDB" reported no applications!"
|
---|
435 | Msg.Type = "Warning"
|
---|
436 | call _ShowMsg
|
---|
437 | FoundWarpIN = 0
|
---|
438 | return
|
---|
439 | end
|
---|
440 |
|
---|
441 | ok = VRset("EF_LastWarpIN","HintText","Last time Odin was installed using WarpIN due to "WarpINDB)
|
---|
442 | OdinCoreDateTime = ''
|
---|
443 | OdinSYsDateTime = ''
|
---|
444 | do I = 1 to apps.0
|
---|
445 | select
|
---|
446 | when pos('Odin System',apps.I) > 0 then do
|
---|
447 | OdinSysDateTime = c2x(strip(VRGetIni( apps.I, "InstallDateTime", WarpINDB ),,d2c(0)))
|
---|
448 | OdinSysDir = strip(VRGetIni( apps.I, "TargetPath", WarpINDB ),,d2c(0))||'\'
|
---|
449 | OdinSysVer = apps.I
|
---|
450 | OdinINI = OdinSysDir||'Odin.INI'
|
---|
451 | end
|
---|
452 | when pos('Odin Core',apps.I) > 0 then do
|
---|
453 | OdinCoreDateTime = c2x(strip(VRGetIni( apps.I, "InstallDateTime", WarpINDB ),,d2c(0)))
|
---|
454 | OdinWinDir = strip(VRGetIni( apps.I, "TargetPath", WarpINDB ),,d2c(0))||'\'
|
---|
455 | OdinCoreVer = apps.I
|
---|
456 | end
|
---|
457 | otherwise nop
|
---|
458 | end
|
---|
459 | end
|
---|
460 | if OdinCoreDateTime = '' | OdinSysDateTime = '' then do
|
---|
461 | Msg.Text = 'Could not find last WarpIN install info!'
|
---|
462 | Msg.Type = "Warning"
|
---|
463 | call _ShowMsg
|
---|
464 | LastWarpIN = 'Maybe never!'
|
---|
465 | end
|
---|
466 | else do
|
---|
467 | OdinCoretime = _xtime(substr(OdinCoreDateTime,1,6))
|
---|
468 | OdinSysTime = _xtime(substr(OdinSYsDateTime,1,6))
|
---|
469 | OdinCoreDate = _xdate(substr(OdinCoreDateTime,9,8))
|
---|
470 | OdinSysDate = _xdate(substr(OdinSYsDateTime,9,8))
|
---|
471 | OdinCoreVer = translate(substr(OdinCoreVer,pos('Core Files',OdinCoreVer)+11),'.','\')
|
---|
472 | OdinSysVer = translate(substr(OdinSysVer,pos('System Files',OdinSysVer)+13),'.','\')
|
---|
473 | LastWarpIN = OdinSysDate' at 'OdinSysTime', it was version 'OdinSysVer
|
---|
474 | end
|
---|
475 | end
|
---|
476 | return
|
---|
477 |
|
---|
478 | /*:VRX _AnalyseXF86SupSys
|
---|
479 | */
|
---|
480 | _AnalyseXF86SupSys:
|
---|
481 | /* we get build level information
|
---|
482 | from XF86Sup.SYS by spawning
|
---|
483 | BLDLEVEL.EXE, redirecting the
|
---|
484 | output and analysing it */
|
---|
485 |
|
---|
486 | /* get XF86Sup.Sys Version */
|
---|
487 | BldInfo = 'BldInfo.TXT'
|
---|
488 |
|
---|
489 | 'BLDLevel 'xf86supsysLine' >'BldInfo
|
---|
490 | do until lines(BldInfo) = 0
|
---|
491 | BldLine = translate(linein(BldInfo))
|
---|
492 | if pos('FILE VERSION',BldLine) > 0 then do
|
---|
493 | XF86supVersion = word(BldLine,3)
|
---|
494 | leave
|
---|
495 | end
|
---|
496 | end
|
---|
497 | call lineout BldInfo
|
---|
498 | ok = SysFileDelete(BldInfo)
|
---|
499 | return
|
---|
500 |
|
---|
501 | /*:VRX _CheckForEvent
|
---|
502 | */
|
---|
503 | _CheckForEvent:
|
---|
504 | /* check and process event queue */
|
---|
505 | EventString = ''
|
---|
506 | do until EventString = 'nop'
|
---|
507 | EventString = VREvent('N')
|
---|
508 | if EventString <> 'nop' then do
|
---|
509 | interpret EventString
|
---|
510 | end
|
---|
511 | end
|
---|
512 | /* if UseRxNap then ok = RxNap(1) */
|
---|
513 | return
|
---|
514 |
|
---|
515 | /*:VRX _CheckForExpiredBuild
|
---|
516 | */
|
---|
517 | _CheckForExpiredBuild:
|
---|
518 | if BuildFile = '' then return 0
|
---|
519 | AllowReport = 0
|
---|
520 | buildYear = substr(BuildFile,11,4)
|
---|
521 | buildmonth = substr(BuildFile,15,2)
|
---|
522 | buildday = substr(BuildFile,17,2)
|
---|
523 | builddate = substr(BuildFile,11,8)
|
---|
524 |
|
---|
525 | todayYear = left(date('S'),4)
|
---|
526 | todayMonth = substr(date('S'),5,2)
|
---|
527 | todayDay = right(date('S'),2)
|
---|
528 |
|
---|
529 | if datatype(buildyear) <> 'NUM' |datatype(buildmonth) <> 'NUM' |datatype(buildday) <> 'NUM' then do
|
---|
530 | Msg.Text = "Invalid buildfilename! - Please enter a valid buildfilename!"
|
---|
531 | Msg.Type = "Warning"
|
---|
532 | call _ShowMsg
|
---|
533 | return 0
|
---|
534 | end
|
---|
535 | datenumber = BuildYear*365+BuildMonth*30+BuildDay
|
---|
536 | todaynumber = TodayYear*365+TodayMonth*30+TodayDay
|
---|
537 | select
|
---|
538 | when todaynumber - datenumber > TooOld then do
|
---|
539 | Msg.Text = "You have to try a newer build before submitting this bug report! Your bug might have been fixed already !"
|
---|
540 | Msg.Type = "Error"
|
---|
541 | call _ShowMsg
|
---|
542 | if OverRideTooOld then do
|
---|
543 | AllowReport = 1
|
---|
544 | AgeOfBuild = todaynumber - datenumber
|
---|
545 | TooOldMsg = 1
|
---|
546 | end
|
---|
547 | end
|
---|
548 | when todaynumber - datenumber > WarnOld then do
|
---|
549 | Msg.Text = "Before submitting this bug report, please try a newer build! Your bug might have been fixed already!"
|
---|
550 | Msg.Type = "Warning"
|
---|
551 | call _ShowMsg
|
---|
552 | AllowReport = 1
|
---|
553 | end
|
---|
554 | otherwise AllowReport = 1
|
---|
555 | end
|
---|
556 | return AllowReport
|
---|
557 | /*:VRX _CheckInvalidreport
|
---|
558 | */
|
---|
559 | _CheckInvalidreport:
|
---|
560 | Invalidreport = 0
|
---|
561 | InvalidReport = InvalidReport + (VRGet("EF_Build","value") = "")
|
---|
562 | InvalidReport = InvalidReport + (VRGet("DDCB_InstallType","value") = "")
|
---|
563 | InvalidReport = InvalidReport + (VRGet("DDCB_LaunchType","value") = "")
|
---|
564 | InvalidReport = InvalidReport + (VRGet("DDCB_OS2Version","value") = "")
|
---|
565 | InvalidReport = InvalidReport + (VRGet("DDCB_FPK","value") = "")
|
---|
566 | InvalidReport = InvalidReport + (VRGet("DDCB_DD","value") = "")
|
---|
567 | InvalidReport = InvalidReport + (VRGet("EF_LogFile","value") = "")
|
---|
568 | InvalidReport = InvalidReport + (VRGet("EF_EXEFile","value") = "")
|
---|
569 | InvalidReport = InvalidReport + (VRGet("EF_Appname","value") = "")
|
---|
570 | InvalidReport = InvalidReport + (VRGet("EF_OdinWinDir","value") = "")
|
---|
571 | InvalidReport = InvalidReport + (VRGet("EF_OdinWinSysDir","value") = "")
|
---|
572 | InvalidReport = InvalidReport + (VRGet("MLE_OwnWords","value") = "")
|
---|
573 | InvalidReport = InvalidReport + (VRGet("EF_LastWarpIN","value") = "")
|
---|
574 | InvalidReport = InvalidReport + (VRGet("EF_LastOdinInst","value") = "")
|
---|
575 | if \ExceptionSearchDone then do
|
---|
576 | ok = SysFileTree(ExceptFileName, ExceptDone., 'FO')
|
---|
577 | if ExceptDone.0 = 0 then InvalidReport = 1
|
---|
578 | else do
|
---|
579 | ExceptionSearchDone = 1
|
---|
580 | call _FillPageException
|
---|
581 | ok = VRSet("EF_LogFile","Enabled", 1)
|
---|
582 | ok = VRSet("PB_SearchLogFile","Enabled", 1)
|
---|
583 | end
|
---|
584 | end
|
---|
585 | if AllowBugReport = 0 & OverRideTooOld = 0 then InvalidReport = 1
|
---|
586 | return sign(InvalidReport)
|
---|
587 |
|
---|
588 | /*:VRX _CommandLineParse
|
---|
589 | */
|
---|
590 | _CommandLineParse:
|
---|
591 | if TestAppDir <> CurDirectory then do
|
---|
592 | ok = SysFileTree(TestAppDir'Odin32_?.LOG',TestAppDirLogFile.,'FO')
|
---|
593 | ok = SysFileTree(CurDirectory'Odin32_?.LOG',CurDirectoryLogFile.,'FO')
|
---|
594 | if CurDirectoryLogFile.0 > 0 & TestAppDirLogFile.0 > 0 then do
|
---|
595 | Msg.Type = "W"
|
---|
596 | Msg.Text = "Logfiles found in "CurDirectory" and "TestAppDir". Be sure to choose the right one!"
|
---|
597 | call _ShowMsg
|
---|
598 | end
|
---|
599 | end
|
---|
600 | if translate(VRGet("Application","Commandline")) = '/INSTALLONLY' then do
|
---|
601 | call _InstallWPSObjects
|
---|
602 | call Quit
|
---|
603 | end
|
---|
604 | else do
|
---|
605 | if VRGet("Application","Commandline") <> '' then do
|
---|
606 | ok = SysFileTree(strip(VRGet("Application","Commandline"),'B','"'),Odin32Log., 'FO')
|
---|
607 | if Odin32Log.0 = 1 then do
|
---|
608 | LogFilename = Odin32Log.1
|
---|
609 | TestAppDir = strip(VRParseFileName( Odin32Log.1, "DP" ),'T','\') || '\'
|
---|
610 | end
|
---|
611 | else do
|
---|
612 | Msg.Text = 'Unrecognized parameter ("'||VRGet("Application","Commandline")||'") - ignored!'
|
---|
613 | Msg.Type = "Warning"
|
---|
614 | call _ShowMsg
|
---|
615 | end
|
---|
616 | end
|
---|
617 | end
|
---|
618 | return
|
---|
619 |
|
---|
620 | /*:VRX _CreateExceptionAndStackDump
|
---|
621 | */
|
---|
622 | _CreateExceptionAndStackDump:
|
---|
623 | call lineout RptFileName, 'Exception information and stack dump:'
|
---|
624 | call lineout RptFileName, ' '
|
---|
625 | do until lines(ExceptFileName) = 0
|
---|
626 | call lineout RptFileName, linein(ExceptFileName)
|
---|
627 | end
|
---|
628 | ok = lineout(ExceptFileName)
|
---|
629 | return
|
---|
630 |
|
---|
631 | /*
|
---|
632 | call lineout RptFileName, 'Exception information and stack dump:'
|
---|
633 | call lineout RptFileName, ' '
|
---|
634 | LogFileName = VRget("EF_LogFile","Value")
|
---|
635 | if LogFileName = '' then return
|
---|
636 | Buffer.0 = VRGet("SPIN_BufferSize","Value")
|
---|
637 | LogFileSize = stream(LogfileName,'c','QUERY SIZE')
|
---|
638 | call _InitProgress
|
---|
639 | ApproxLines = LogFileSize % 41
|
---|
640 |
|
---|
641 | I = 0
|
---|
642 | do while pos('Exception Information',LogLine) = 0 & lines(LogFileName) <> 0
|
---|
643 | LogLine = linein(LogFileName)
|
---|
644 | I = I + 1
|
---|
645 | idx = I // 10 + 1
|
---|
646 | Buffer.idx = LogLine
|
---|
647 | if I // 1000 = 0 then do
|
---|
648 | call _CheckForEvent
|
---|
649 | Progress = I * 100 % ApproxLines
|
---|
650 | ok = VRSet("SL_Progress","Percentile",Progress)
|
---|
651 | end
|
---|
652 | end
|
---|
653 | if lines(LogFileName) = 0 then do
|
---|
654 | call lineout RptFileName, 'No exception found in logfile!'
|
---|
655 | end
|
---|
656 | else do /* we had an exception lets create the dump */
|
---|
657 | do J = idx+1 to 10
|
---|
658 | call lineout RptFileName, Buffer.J
|
---|
659 | end
|
---|
660 | do J = 1 to idx
|
---|
661 | call lineout RptFileName, Buffer.J
|
---|
662 | end
|
---|
663 | LogLine = linein(LogFileName)
|
---|
664 | do until pos('End Of Exception Information',LogLine) > 0 | lines(LogFileName) = 0
|
---|
665 | LogLine = linein(LogFileName)
|
---|
666 | call lineout RptFileName, LogLine
|
---|
667 | end
|
---|
668 |
|
---|
669 | do while pos('** BEGIN STACK DUMP **',LogLine) = 0 & lines(LogFileName) <> 0
|
---|
670 | LogLine = linein(LogFileName)
|
---|
671 | I = I + 1
|
---|
672 | Progress = I * 100 % ApproxLines
|
---|
673 | ok = VRSet("SL_Progress","Percentile",Progress)
|
---|
674 | end
|
---|
675 | call lineout RptFileName, LogLine
|
---|
676 | do until pos('** END OF STACK DUMP **',LogLine) > 0 | lines(LogFileName) = 0
|
---|
677 | LogLine = linein(LogFileName)
|
---|
678 | call lineout RptFileName,LogLine
|
---|
679 | end
|
---|
680 | end
|
---|
681 | call lineout(LogFileName)
|
---|
682 | ok = VRSet("Progress","Visible", 0) */
|
---|
683 |
|
---|
684 | /*:VRX _CreateObject
|
---|
685 | */
|
---|
686 | _CreateObject: procedure
|
---|
687 | Parse Arg Class, Title, Location, Setup, Collision
|
---|
688 | /* Say 'Creating ['Title']' */
|
---|
689 | rc = SysCreateObject( Class, Title, Location, Setup, Collision )
|
---|
690 | If rc <> 1 Then do
|
---|
691 | Msg.Text = ' > failed to create ['Title' | 'Class'] at location ['Location']'
|
---|
692 | Msg.Type = 'Error'
|
---|
693 | call _ShowMsg
|
---|
694 | end
|
---|
695 | return rc
|
---|
696 |
|
---|
697 | /*:VRX _CreateReport
|
---|
698 | */
|
---|
699 | _CreateReport:
|
---|
700 | RPTFileName = VRFileDialog( VRWindow(), "Save Odin Bug report to...", "Save", TestAppDir || "ODINBUG.RPT", , , )
|
---|
701 | if RPTFilename = '' then return 0 /* not created */
|
---|
702 | ok = SysFileTree(RPTFileName,Exists.,'FO')
|
---|
703 | if Exists.0 = 1 then do
|
---|
704 | Buttons.1 = "~Overwrite"
|
---|
705 | Buttons.2 = "~Append"
|
---|
706 | Buttons.0 = 2
|
---|
707 | id = VRMessage( VRWindow(), RPTFileName||" exists!", "Odin Bug Report Generator", "Query", "Buttons.", buttons.1, buttons.2 )
|
---|
708 | if id = 1 then do
|
---|
709 | rc = SysFileDelete(RptFileName)
|
---|
710 | if rc > 3 then do
|
---|
711 | Msg.Type = "E"
|
---|
712 | Msg.Text = "Could not open "RPTFileName" for writing! Aborting..."
|
---|
713 | call _showMsg
|
---|
714 | return 0 /* not created */
|
---|
715 | end
|
---|
716 | end
|
---|
717 | end
|
---|
718 |
|
---|
719 | if VRGet("RB_OtherEmailClient","set") then call lineout RptFileName, '<sendto: 'EMail'>'
|
---|
720 | call lineout RptFileName, '--------------------- Begin of Odin Bug Report ----------------------'
|
---|
721 | if TooOldMsg then call lineout RptFileName, ' for an expired build ('AgeOfBuild'days old)'
|
---|
722 | call lineout RptFileName, ' '
|
---|
723 | call lineout RptFileName, 'Odin build information:'
|
---|
724 | call lineout RptFileName, ' '
|
---|
725 | call lineout RptFileName, ' Current Odin build: 'VRGet("EF_Build","value")', version 'Kernel32Ver
|
---|
726 | call lineout RptFileName, ' Installation method: 'VRGet("DDCB_InstallType","value")
|
---|
727 | call charout RptFileName, ' Launching method: 'VRGet("DDCB_LaunchType","value")
|
---|
728 | if FoundWin32KSysNow & FoundWin32KSysAtBugTime then do
|
---|
729 | call lineout RptFileName, ', Win32K-parameters: 'VRGet("EF_Win32Kparm","Value")
|
---|
730 | end
|
---|
731 | else call lineout RptFileName, ' '
|
---|
732 | call lineout RptFileName, ' Last WarpIN install: 'VRGet("EF_LastWarpIN","Value")
|
---|
733 | call lineout RptFileName, ' Last OdinInst install: 'VRGet("EF_LastOdinInst","Value")
|
---|
734 | call lineout RptFileName, ' Odin "Windows" dir: 'VRget("EF_OdinWinDir","Value")
|
---|
735 | call lineout RptFileName, ' Odin "System32" dir: 'VRget("EF_OdinWinSysDir","Value")
|
---|
736 | call lineout RptFileName, ' Evaluated Odin.INI: 'VRGet("EF_OdinINI","Value")
|
---|
737 | call lineout RptFileName, ' '
|
---|
738 | call lineout RptFileName, 'General system information:'
|
---|
739 | call lineout RptFileName, ' '
|
---|
740 | call lineout RptFileName, ' OS/2 version: 'VRGet("DDCB_OS2Version","value")
|
---|
741 | call lineout RptFileName, ' OS/2 reports version: 'VRGet("EF_Version","Value")', kernel revision: 'VRget("EF_KrnlBuildVer","Value")
|
---|
742 | call lineout RptFileName, ' FixPack Level: 'VRGet("DDCB_FPK","value")
|
---|
743 | call charout RptFileName, ' Is xf86sup.sys loaded? '
|
---|
744 | if Foundxf86supsys then call lineout RptFileName, 'Yes, version 'XF86SupVersion
|
---|
745 | else call lineout RptFileName, 'No'
|
---|
746 | call lineout RptFileName, ' Display driver: 'VRGet("DDCB_DD","value")' 'VRGet("DDCB_DDVer","Value")
|
---|
747 | call lineout RptFileName, ' Video Chipset: 'VRGet("DDCB_chipset","Value")
|
---|
748 | call lineout RptFileName, ' '
|
---|
749 | call lineout RptFileName, 'Win32 program information:'
|
---|
750 | call lineout RptFileName, ' '
|
---|
751 | call lineout RptFileName, ' Odin logfile: 'VRget("EF_LogFile","Value")
|
---|
752 | call lineout RptFileName, ' Windows executable: 'VRget("EF_EXEFile","Value")
|
---|
753 | call lineout RptFileName, ' Application name: 'VRget("EF_AppName","Value")
|
---|
754 | call lineout RptFileName, ' Application version: 'VRget("EF_AppVersion","Value")
|
---|
755 | call lineout RptFileName, ' Available from: 'VRget("DDCB_URL","Value")
|
---|
756 | call lineout RptFileName, ' '
|
---|
757 | call lineout RptFileName, 'Verbal problem description:'
|
---|
758 | call lineout RptFileName, ' '
|
---|
759 | call lineout RptFileName, VRGet("MLE_OwnWords","Value")
|
---|
760 | if OhNooo then do
|
---|
761 | call lineout RptFileName, 'An "Oh, nooo!"-message box was displayed. '
|
---|
762 | end
|
---|
763 | call lineout RptFileName, ' '
|
---|
764 | if AddException then call _CreateExceptionAndStackDump
|
---|
765 | else call lineout RptFileName, 'No exception information and stack dump added by user request!'
|
---|
766 | call lineout RptFileName, ' '
|
---|
767 | call lineout RptFileName, 'ODIN.INI information:'
|
---|
768 | call lineout RptFileName, ' '
|
---|
769 | do until lines(OdinIni) = 0
|
---|
770 | call lineout RptFileName, linein(OdinIni)
|
---|
771 | end
|
---|
772 | call lineout OdinInI
|
---|
773 | call lineout RptFileName, '---------------------- End of Odin Bug Report -----------------------'
|
---|
774 | call lineout RptFileName, 'Created by OdinBug version 'word(VRGet("OdinBugReport","HintText"),2)' on 'date()' at 'time()
|
---|
775 | call lineout RptFileName
|
---|
776 | return 1 /* success */
|
---|
777 |
|
---|
778 | /*:VRX _EMailGeneric
|
---|
779 | */
|
---|
780 | _EMailGeneric:
|
---|
781 | if MessengerDir <> '' then do
|
---|
782 | olddir = directory()
|
---|
783 | call directory strip(MessengerDir,'T','\')
|
---|
784 | end
|
---|
785 | 'start 'messenger' "mailto:'EMail'?subject=Odin Bug Report: 'VRget("EF_AppName","Value")' 'VRget("EF_AppVersion","Value")'"' /* &body= */
|
---|
786 | if MessengerDir <> '' then ok = directory(oldDir)
|
---|
787 | CompleteReport = ''
|
---|
788 | do until lines(RPTFileName) = 0
|
---|
789 | CompleteReport = CompleteReport||CRLF||linein(RPTFileName)
|
---|
790 | end
|
---|
791 | call lineout RPTFileName
|
---|
792 | ok = VRMethod("Application","PutClipBoard",CompleteReport)
|
---|
793 | Msg.Text = "Report was copied to the clipboard! You may paste it into the body of your email now!"
|
---|
794 | Msg.Type = "Information"
|
---|
795 | call _ShowMsg
|
---|
796 | return
|
---|
797 |
|
---|
798 | /*:VRX _EMailMR2ICE
|
---|
799 | */
|
---|
800 | _EMailMR2ICE:
|
---|
801 | TempFile = strip(value('TEMP',,'OS2ENVIRONMENT'),'T','\')||'\OdinBug.$$$'
|
---|
802 | ok = SysFileDelete(TempFile)
|
---|
803 | ok = lineout(TempFile, 'To: 'EMail)
|
---|
804 | ok = lineout(TempFile, 'Subject: Odin Bug Report: 'VRget("EF_AppName","Value")' 'VRget("EF_AppVersion","Value"))
|
---|
805 | ok = lineout(TempFile, 'Content-Type: text/plain; charset=us-ascii')
|
---|
806 | ok = lineout(TempFile, 'Content-Transfer-Encoding: 7bit')
|
---|
807 | ok = charout(TempFile, CRLF)
|
---|
808 | do until lines(RPTFileName) = 0
|
---|
809 | ok = lineout(TempFile, linein(RPTFileName))
|
---|
810 | end
|
---|
811 | ok = Lineout(TempFile)
|
---|
812 | ok = lineout(RPTFileName)
|
---|
813 | if MessengerDir <> '' then do
|
---|
814 | olddir = directory()
|
---|
815 | call directory strip(MessengerDir,'T','\')
|
---|
816 | end
|
---|
817 | /* ok = VRRedirectStdio('ON')
|
---|
818 | say 'start 'MESSENGER' /Q 'TempFile */
|
---|
819 | 'start 'MESSENGER' /O'TempFile
|
---|
820 | if MessengerDir <> '' then ok = directory(oldDir)
|
---|
821 | return
|
---|
822 |
|
---|
823 | /*:VRX _EMailNetscape
|
---|
824 | */
|
---|
825 | _EMailNetscape:
|
---|
826 | TempFile = strip(value('TEMP',,'OS2ENVIRONMENT'),'T','\')||'\OdinBug.$$$'
|
---|
827 | ok = SysFileDelete(TempFile)
|
---|
828 | ok = lineout(TempFile, 'To: 'EMail)
|
---|
829 | ok = lineout(TempFile, 'Subject: Odin Bug Report: 'VRget("EF_AppName","Value")' 'VRget("EF_AppVersion","Value"))
|
---|
830 | ok = lineout(TempFile, 'Content-Type: text/plain; charset=us-ascii')
|
---|
831 | ok = lineout(TempFile, 'Content-Transfer-Encoding: 7bit')
|
---|
832 | ok = charout(TempFile, CRLF)
|
---|
833 | do until lines(RPTFileName) = 0
|
---|
834 | ok = lineout(TempFile, linein(RPTFileName))
|
---|
835 | end
|
---|
836 | ok = Lineout(TempFile)
|
---|
837 | ok = lineout(RPTFileName)
|
---|
838 | if MessengerDir <> '' then do
|
---|
839 | olddir = directory()
|
---|
840 | call directory strip(MessengerDir,'T','\')
|
---|
841 | end
|
---|
842 | 'start 'messenger' -compose 'TempFile
|
---|
843 | if MessengerDir <> '' then ok = directory(oldDir)
|
---|
844 | return
|
---|
845 |
|
---|
846 | /*:VRX _EMailPMMSend
|
---|
847 | */
|
---|
848 | _EMailPMMSend:
|
---|
849 | if MessengerDir <> '' then do
|
---|
850 | olddir = directory()
|
---|
851 | call directory strip(MessengerDir,'T','\')
|
---|
852 | end
|
---|
853 | ok = SysfileTree(MessengerDir'TEMP',TempDir., 'DO')
|
---|
854 | if TempDir.0 = 0 then call _LaunchPMMail
|
---|
855 | ok = SysfileTree(MessengerDir'TEMP',TempDir., 'DO')
|
---|
856 | if TempDir.0 = 0 then do
|
---|
857 | Msg.Type = 'Warning'
|
---|
858 | Msg.Text = 'Failed to start PMMail! Please, check your email settings!'
|
---|
859 | call _ShowMsg
|
---|
860 | end
|
---|
861 | 'start /MIN /C 'messenger' /M "'RPTFileName'" "'left(EMail,pos('@',EMail)-1)' <'EMail'>" "Odin Bug Report: 'VRget("EF_AppName","Value")' 'VRget("EF_AppVersion","Value")'" "'VRGet("EF_Account","Value")'"'
|
---|
862 | if MessengerDir <> '' then ok = directory(oldDir)
|
---|
863 | return
|
---|
864 |
|
---|
865 | /*
|
---|
866 |
|
---|
867 | */
|
---|
868 |
|
---|
869 | /* PMMSend Syntax:
|
---|
870 |
|
---|
871 | USAGE: PMMSend <OPTION> <File To Send> <To E-Mail Address> <Subject>
|
---|
872 | <Account Directory To Send From> <body file (/a option only)>
|
---|
873 |
|
---|
874 | Where <OPTION> is one of the following:
|
---|
875 |
|
---|
876 | /a Attachment option. In this case the file to send will be an
|
---|
877 | attachment. Note that the attachment type
|
---|
878 | will be read from the account config.
|
---|
879 | When using this option, you may specify
|
---|
880 | a text file to be used as the body of the
|
---|
881 | message.
|
---|
882 | /f FAX option. In this case the file to send will be a tiff
|
---|
883 | or other data file.
|
---|
884 | /m Message option. In this case the file to send will be a
|
---|
885 | message body.
|
---|
886 |
|
---|
887 | EXAMPLE: PMMSEND /F c:\mydir\fax.tif "User <user@domain.com>"
|
---|
888 | "A Fax For You" USER_D1.ACT
|
---|
889 |
|
---|
890 | Options Must Begin With A Slash '/' */
|
---|
891 | /*:VRX _EMailPolarbar
|
---|
892 | */
|
---|
893 | _EMailPolarbar:
|
---|
894 | EMailFile = SysTempFileName(Account||'\OdinB???.POP')
|
---|
895 | ok = lineout(EMailFile, 'To: 'EMail)
|
---|
896 | ok = lineout(EMailFile, 'Subject: Odin Bug Report: 'VRget("EF_AppName","Value")' 'VRget("EF_AppVersion","Value"))
|
---|
897 | ok = lineout(EMailFile, 'Content-Type: text/plain; charset=us-ascii')
|
---|
898 | ok = lineout(EMailFile, 'Content-Transfer-Encoding: 7bit')
|
---|
899 | ok = charout(EMailFile, CRLF)
|
---|
900 | do until lines(RPTFileName) = 0
|
---|
901 | ok = lineout(EMailFile, linein(RPTFileName))
|
---|
902 | end
|
---|
903 | ok = Lineout(EMailFile)
|
---|
904 | ok = lineout(RPTFileName)
|
---|
905 | ok = VRMethod( "Screen", "ListWindows", "window." )
|
---|
906 | PolarBarRunning = 0
|
---|
907 | if ok = 1 then do
|
---|
908 | do i = 1 to window.0
|
---|
909 | if pos("Polarbar",VRGet( word( window.i, 1 ),"Caption" )) > 0 then do
|
---|
910 | PolarBarRunning = 1
|
---|
911 | leave
|
---|
912 | end
|
---|
913 | end
|
---|
914 | end
|
---|
915 | if PolarBarRunning then do
|
---|
916 | Msg.Type = 'I'
|
---|
917 | Msg.Text = 'PolarBar is running. Please, reindex your outbox now to retrieve the bugreport!'
|
---|
918 | call _ShowMsg
|
---|
919 | end
|
---|
920 | else do /* Start PolarBar */
|
---|
921 | if MessengerDir <> '' then do
|
---|
922 | olddir = directory()
|
---|
923 | call directory strip(MessengerDir,'T','\')
|
---|
924 | end
|
---|
925 | 'start /min /c 'messenger
|
---|
926 | if MessengerDir <> '' then ok = directory(oldDir)
|
---|
927 | end
|
---|
928 | return
|
---|
929 | /*:VRX _FillPageException
|
---|
930 | */
|
---|
931 | _FillPageException:
|
---|
932 | ok = VRMethod( "LB_Exception", "Reset" )
|
---|
933 | I = 1
|
---|
934 | do until lines(ExceptFilename) = 0
|
---|
935 | ExcLine.I = linein(ExceptFileName)
|
---|
936 | I = I + 1
|
---|
937 | end
|
---|
938 | ExcLine.0 = I
|
---|
939 | ok = stream(ExceptFilename,"c", "close")
|
---|
940 | ok = VRMethod("LB_Exception", "AddStringList", "ExcLine.")
|
---|
941 | return
|
---|
942 |
|
---|
943 | /*:VRX _GetException
|
---|
944 | */
|
---|
945 | _GetException:
|
---|
946 | threadID = VRMethod( "Application", "StartThread", "GetExcpt", LogFileName)
|
---|
947 | return
|
---|
948 |
|
---|
949 | /*:VRX _GotNewLogfileName
|
---|
950 | */
|
---|
951 | _GotNewLogfileName:
|
---|
952 | ok = VRSet("PB_CreateReport","Visible", 1)
|
---|
953 | ok = VRset("EF_LogFile","Value",LogFilename)
|
---|
954 | TestAppDir = strip(VRParseFileName( LogFileName, "DP" ),'T','\') || '\'
|
---|
955 | ok = VRset("EF_TestAppDir","Value",TestAppDir)
|
---|
956 | ok = SysFileDelete(ExceptFileName)
|
---|
957 | ExceptionSearchDone = 0
|
---|
958 | ok = VRSet("EF_LogFile","Enabled", 0)
|
---|
959 | ok = VRSet("PB_SearchLogFile","Enabled", 0)
|
---|
960 | ok = VRMethod("LB_Exception","Reset")
|
---|
961 |
|
---|
962 | call _AnalyseOdin32_xLog
|
---|
963 | call _AnalyseKernel32DLL
|
---|
964 | call _GUIRedraw2
|
---|
965 | call _GetException
|
---|
966 | ok = VRSet("PB_BrowseLogFile","Enabled",1)
|
---|
967 | ok = VRSet("TM_CheckValid","Enabled",1)
|
---|
968 | return
|
---|
969 |
|
---|
970 | /*:VRX _GUIEMailInit
|
---|
971 | */
|
---|
972 | _GUIEMailInit:
|
---|
973 | select
|
---|
974 | when translate(Messenger) = 'MR2I.EXE' then do
|
---|
975 | ok = VRSEt("RB_MR2ICE","set",1)
|
---|
976 | EMailSearchDirMask = Messenger
|
---|
977 | if MessengerDir = "" then do
|
---|
978 | ok = VRset("PB_SearchMessengerDir","Visible", 0)
|
---|
979 | ok = VRset("DT_MessengerDir","Visible", 0)
|
---|
980 | ok = VRset("EF_MessengerDir","Visible", 0)
|
---|
981 | end
|
---|
982 | else do
|
---|
983 | ok = VRset("PB_SearchMessengerDir","Visible", 1)
|
---|
984 | ok = VRset("DT_MessengerDir","Caption", "MR/2 ICE directory")
|
---|
985 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
986 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
987 | end
|
---|
988 | ok = VRset("DDCB_Messenger","Visible", 0)
|
---|
989 | ok = VRset("DT_Messenger","Visible", 0)
|
---|
990 | ok = VRset("EF_Account","Visible", 0)
|
---|
991 | ok = VRset("DT_Account","Visible", 0)
|
---|
992 | end
|
---|
993 | when translate(Messenger) = 'NETSCAPE.EXE' then do
|
---|
994 | ok = VRSEt("RB_Messenger461","set",1)
|
---|
995 | EMailSearchDirMask = Messenger
|
---|
996 | if MessengerDir = "" then do
|
---|
997 | ok = VRset("PB_SearchMessengerDir","Visible", 0)
|
---|
998 | ok = VRset("DT_MessengerDir","Visible", 0)
|
---|
999 | ok = VRset("EF_MessengerDir","Visible", 0)
|
---|
1000 | end
|
---|
1001 | else do
|
---|
1002 | ok = VRset("PB_SearchMessengerDir","Visible", 1)
|
---|
1003 | ok = VRset("DT_MessengerDir","Caption", "Netscape directory")
|
---|
1004 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
1005 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
1006 | end
|
---|
1007 | ok = VRset("DDCB_Messenger","Visible", 0)
|
---|
1008 | ok = VRset("DT_Messenger","Visible", 0)
|
---|
1009 | ok = VRset("EF_Account","Visible", 0)
|
---|
1010 | ok = VRset("DT_Account","Visible", 0)
|
---|
1011 | end
|
---|
1012 | when translate(Messenger) = 'PMMSEND.EXE' then do
|
---|
1013 | EMailSearchDirMask = Messenger
|
---|
1014 | ok = VRSEt("RB_PMMail","set",1)
|
---|
1015 | ok = VRset("DT_MessengerDir","Caption", "PMMail directory")
|
---|
1016 | ok = VRset("DDCB_Messenger","Visible", 0)
|
---|
1017 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
1018 | ok = VRset("EF_Account","Visible", 1)
|
---|
1019 | ok = VRset("DT_Messenger","Visible", 0)
|
---|
1020 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
1021 | ok = VRset("PB_SearchMessengerDir","Visible", 1)
|
---|
1022 | ok = VRset("DT_Account","Caption", "Account name")
|
---|
1023 | ok = VRset("DT_Account","Visible", 1)
|
---|
1024 | end
|
---|
1025 | when _xlower(Messenger) = 'jre.exe -cp polarbar.zip org.polarbar.mailer' then do
|
---|
1026 | Messenger = _xlower(Messenger)
|
---|
1027 | EMailSearchDirMask = 'polarbar.zip'
|
---|
1028 | ok = VRset("DDCB_Messenger","Value", Messenger)
|
---|
1029 | ok = VRSEt("RB_Polarbar","set",1)
|
---|
1030 | ok = VRset("DDCB_Messenger","Visible", 0)
|
---|
1031 | ok = VRset("PB_SearchMessengerDir","Visible", 1)
|
---|
1032 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
1033 | ok = VRset("EF_Account","Visible", 1)
|
---|
1034 | ok = VRset("DT_Messenger","Visible", 0)
|
---|
1035 | ok = VRset("DT_MessengerDir","Caption", "Polarbar directory")
|
---|
1036 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
1037 | ok = VRset("DT_Account","Caption", "Outbox directory")
|
---|
1038 | ok = VRset("DT_Account","Visible", 1)
|
---|
1039 | end
|
---|
1040 | otherwise do
|
---|
1041 | ok = VRSEt("RB_OtherEmailClient","set",1)
|
---|
1042 | ok = VRset("DDCB_Messenger","Visible", 1)
|
---|
1043 | ok = VRset("PB_SearchMessengerDir","Visible", 1)
|
---|
1044 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
1045 | ok = VRset("EF_Account","Visible", 0)
|
---|
1046 | ok = VRset("DT_Messenger","Visible", 1)
|
---|
1047 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
1048 | ok = VRset("DT_Account","Visible", 0)
|
---|
1049 | end
|
---|
1050 | end
|
---|
1051 | return
|
---|
1052 | /*:VRX _GUIInit
|
---|
1053 | */
|
---|
1054 | _GUIInit:
|
---|
1055 | /* Odin Page */
|
---|
1056 | if WIN32LOG_ENABLED \= '' then ok = VRSet("CB_WIN32LOG_ENABLED","set",1)
|
---|
1057 | else ok = VRSet("CB_WIN32LOG_ENABLED","set",0)
|
---|
1058 |
|
---|
1059 | ok = VRSet( "GB_Settings", "HintText", "Currently using "our_ini)
|
---|
1060 | ok = VRSet( "EF_BuildDir", "Value", BuildDir )
|
---|
1061 | ok = VRSet( "EF_TestAppDir", "Value", TestAppDir )
|
---|
1062 | ok = VRSet( "EF_LogFileBrowser", "Value", LogFileBrowser )
|
---|
1063 | ok = VRSet( "SPIN_BufferSize", "Value", BufferSize )
|
---|
1064 | ok = VRSet( "CB_AddException", "set", AddException )
|
---|
1065 | ok = VRSet( "CB_DontSaveAppDir", "set", DontSaveAppDir )
|
---|
1066 | ok = VRSet( "CB_AskDeleteLog", "set", AskDeleteLog )
|
---|
1067 | ok = VRset( "CB_xf86supsys", "set", 0)
|
---|
1068 |
|
---|
1069 | /* EMail Page */
|
---|
1070 |
|
---|
1071 | ok = VRSet( "DDCB_EMail", "Value", EMail )
|
---|
1072 | ok = VRSet( "DDCB_Messenger", "Value", Messenger )
|
---|
1073 | ok = VRSet( "EF_MessengerDir", "Value", MessengerDir )
|
---|
1074 | ok = VRSet( "EF_Account", "Value", Account )
|
---|
1075 |
|
---|
1076 | call _GUIEMailInit
|
---|
1077 |
|
---|
1078 | /* enter help file */
|
---|
1079 | ok = VRSet("OdinBugReport", "HelpFile", base_dir"OdinBug.HLP")
|
---|
1080 | ok = VRSet("PageApplication", "HelpFile", base_dir"OdinBug.HLP")
|
---|
1081 | ok = VRSet("PageOdin", "HelpFile", base_dir"OdinBug.HLP")
|
---|
1082 | ok = VRSet("PageSystem", "HelpFile", base_dir"OdinBug.HLP")
|
---|
1083 | ok = VRSet("PageSettings", "HelpFile", base_dir"OdinBug.HLP")
|
---|
1084 | ok = VRSet("PageEMail", "HelpFile", base_dir"OdinBug.HLP")
|
---|
1085 | return
|
---|
1086 |
|
---|
1087 | /*:VRX _GUIRedraw
|
---|
1088 | */
|
---|
1089 | _GUIRedraw:
|
---|
1090 | ok = VRset("CB_xf86supsys","set", Foundxf86supsys)
|
---|
1091 | if FoundWin32KSysNow then ok = VRset("DDCB_LaunchType","Value", "Win32K.SYS")
|
---|
1092 | else ok = VRSet("EF_Win32KParm","Value","Win32K.SYS is currently not installed!")
|
---|
1093 | ok = VRset("DDCB_DD","Value", Driver)
|
---|
1094 | /* ok = VRSet("DDCB_DDVer","Value","unknown") */
|
---|
1095 | ok = VRSet("DDCB_OS2Version","value", OS2Type)
|
---|
1096 | ok = VRSet("EF_KrnlBuildVer","value", KrnlBuildVer)
|
---|
1097 | ok = VRSet("EF_Version","Value",os_ver)
|
---|
1098 | ok = VRSet("DDCB_FPK","Value",fpk_level)
|
---|
1099 | if FoundScitech then do
|
---|
1100 | Ok = VRSet("DDCB_DDVer","Value",SddBuildNr)
|
---|
1101 | ok = VRSet("DDCB_ChipSet","value",Chipset)
|
---|
1102 | end
|
---|
1103 | if FoundXf86SupSys
|
---|
1104 | then ok = VRSet( "EF_XF86supVersion", "Value", XF86supVersion )
|
---|
1105 | else ok = VRSet( "EF_XF86supVersion", "Visible", 0 )
|
---|
1106 | ok = VRSet("EF_LastWarpIN","Value",LastWarpIN)
|
---|
1107 | return
|
---|
1108 |
|
---|
1109 | /*:VRX _GUIRedraw2
|
---|
1110 | */
|
---|
1111 | _GUIRedraw2:
|
---|
1112 | if \FoundWin32KSysNow & FoundWin32KSysAtBugTime then do
|
---|
1113 | ok = VRset("DDCB_LaunchType","Value", "Win32K.SYS was installed, when the bug occured, but it is not now!")
|
---|
1114 | end
|
---|
1115 | if FoundWin32KSysNow & \FoundWin32KSysAtBugTime then do
|
---|
1116 | ok = VRset("DDCB_LaunchType","Value", "Win32K.SYS is installed now, but was not, when the bug occured!")
|
---|
1117 | end
|
---|
1118 | if \FoundWin32KSysNow & \FoundWin32KSysAtBugTime then do
|
---|
1119 | ok = VRset("DDCB_LaunchType","Value", "PE.EXE")
|
---|
1120 | end
|
---|
1121 | if FoundWin32KSysNow & FoundWin32KSysAtBugTime then do
|
---|
1122 | ok = VRSet("EF_Win32KParm","value",Win32Kparm)
|
---|
1123 | end
|
---|
1124 | ok = VRset("EF_OdinWindir","value",OdinWinDir)
|
---|
1125 | ok = VRset("EF_OdinWinSysdir","value",OdinSysDir)
|
---|
1126 | ok = VRset("EF_EXEFile","value",EXEFile)
|
---|
1127 | ok = VRset("EF_OdinINI","value",OdinINI)
|
---|
1128 | ok = VRMethod("EF_Appname","SetFocus")
|
---|
1129 | return
|
---|
1130 |
|
---|
1131 | /*:VRX _INIRead
|
---|
1132 | */
|
---|
1133 | _INIRead: /* Initialize variables, read values from INI file */
|
---|
1134 | /* Show our window */
|
---|
1135 | if translate(VRGet("Application","Commandline")) <> '/INSTALLONLY' then do
|
---|
1136 | ok = VRSet("OdinBugReport","Visible", 1)
|
---|
1137 | end
|
---|
1138 |
|
---|
1139 | /* delete old and obsolete files */
|
---|
1140 | ok = SysFileDelete('OdinBug.err')
|
---|
1141 | ok = SysFileDelete('OdinBug.CF')
|
---|
1142 | ok = SysFileDelete('OdinBug.CFG')
|
---|
1143 |
|
---|
1144 | /* Disable obsolete RxNap support */
|
---|
1145 | UseRxNap = 0 /* \RxFuncQuery(RxNap) */
|
---|
1146 |
|
---|
1147 | /* Msg.Title = default title for message boxes */
|
---|
1148 | Msg.Title = 'Odin Bug Report Generator'
|
---|
1149 |
|
---|
1150 | /* Initialize variables - former undocumented cfg switches */
|
---|
1151 | WarnOld = 10 /* days */
|
---|
1152 | TooOld = 20 /* days */
|
---|
1153 | OverrideTooOld = 0
|
---|
1154 | TooOldMsg = 0
|
---|
1155 | AgeOfBuild = 0
|
---|
1156 | AllowBugReport = 0
|
---|
1157 | TempFile = ''
|
---|
1158 | ExceptionSearchDone = 0
|
---|
1159 | DestroyWPS = 0
|
---|
1160 |
|
---|
1161 | /* for abbreviation purposes */
|
---|
1162 | CRLF = d2c(13)||d2c(10)
|
---|
1163 |
|
---|
1164 | /* ConfigSys vars */
|
---|
1165 | FoundWin32KSysNow = 0
|
---|
1166 | Win32KConfigSys = ''
|
---|
1167 | FoundScitech = 0
|
---|
1168 | Foundxf86supsys = 0
|
---|
1169 | XF86supVersion = '(init)'
|
---|
1170 | Driver = ''
|
---|
1171 |
|
---|
1172 | /* odin32_?.log vars */
|
---|
1173 | LogFileName = ''
|
---|
1174 | FoundWinDir = 0
|
---|
1175 | FoundSysDir = 0
|
---|
1176 | FoundExe = 0
|
---|
1177 | FoundOdinIni = 0
|
---|
1178 | FoundWin32KSysAtBugTime = 0
|
---|
1179 | EXEFile = ''
|
---|
1180 | OdinSysDir = ''
|
---|
1181 | OdinWinDir = ''
|
---|
1182 | OhNooo = 0
|
---|
1183 |
|
---|
1184 | /* Odin.INI */
|
---|
1185 | OdinInstLine = '(not found)'
|
---|
1186 | OdinInstDate = '(?)'
|
---|
1187 | OdinInstTime = '(?)'
|
---|
1188 | LastOdinInst = ''
|
---|
1189 | InstallType = ''
|
---|
1190 | OdinINI = ''
|
---|
1191 | buildDate = ''
|
---|
1192 |
|
---|
1193 | /* OdinInst.EXE */
|
---|
1194 | OdinInstVer = '(unknown)'
|
---|
1195 |
|
---|
1196 | /* Kernel32.DLL */
|
---|
1197 | Kernel32Ver = '(unknown)'
|
---|
1198 | Kernel32Date = ''
|
---|
1199 |
|
---|
1200 | /* Scitech driver */
|
---|
1201 | SddBuildNr = '(unknown)'
|
---|
1202 |
|
---|
1203 | /* OS/2 type */
|
---|
1204 | KrnlBuildVer = '(unknown)'
|
---|
1205 |
|
---|
1206 | /* WarpIN stuff */
|
---|
1207 | LastWarpIN = ''
|
---|
1208 | WarpINDB = ''
|
---|
1209 |
|
---|
1210 | /* save current directory */
|
---|
1211 | CurDirectory = strip(directory(),'T','\') || '\'
|
---|
1212 |
|
---|
1213 | /* Get logging status for current session - read only */
|
---|
1214 | win32log_enabled = Value('WIN32LOG_ENABLED',,'OS2ENVIRONMENT')
|
---|
1215 |
|
---|
1216 | /* locate the base directory for INIfile */
|
---|
1217 | ok = SysFileTree('OdinBug.EXE',exe_file.,'FO')
|
---|
1218 | if exe_file.0 = 1 then exe_file = exe_file.1
|
---|
1219 | else exe_file = SysSearchPath('PATH','OdinBug.EXE')
|
---|
1220 |
|
---|
1221 | /* This does not seem to be reliable...
|
---|
1222 | exe_file = VRGet("Application","Program")
|
---|
1223 | */
|
---|
1224 | base_dir = strip(VRParseFileName( exe_file, "DP" ),'T','\') || '\'
|
---|
1225 | our_ini = base_dir || 'OdinBug.INI'
|
---|
1226 |
|
---|
1227 | /* read settings from our_ini */
|
---|
1228 | BuildDir = VRGetIni( "OdinBug", "BuildDir", our_ini, 'NoClose' )
|
---|
1229 | TestAppDir = VRGetIni( "OdinBug", "TestAppDir", our_ini, 'NoClose' )
|
---|
1230 | LogFileBrowser = VRGetIni( "OdinBug", "LogFileBrowser", our_ini, 'NoClose' )
|
---|
1231 | DontSaveAppDir = VRGetIni( "OdinBug", "DontSaveAppDir", our_ini, 'NoClose' )
|
---|
1232 | AskDeleteLog = VRGetIni( "OdinBug", "AskDeleteLog", our_ini, 'NoClose' )
|
---|
1233 | EMail = VRGetIni( "OdinBug", "EMail", our_ini, 'NoClose' )
|
---|
1234 | Messenger = translate(VRGetIni( "OdinBug", "Messenger", our_ini, 'NoClose' ))
|
---|
1235 | MessengerDir = VRGetIni( "OdinBug", "MessengerDir", our_ini, 'NoClose' )
|
---|
1236 | Account = VRGetIni( "OdinBug", "Account", our_ini, 'NoClose' )
|
---|
1237 | BufferSize = VRGetIni( "OdinBug", "BufferSize", our_ini, 'NoClose' )
|
---|
1238 | AddException = VRGetIni( "OdinBug", "AddException", our_ini, 'NoClose' )
|
---|
1239 | OdinBugVersion = VRGetIni( "OdinBug", "Version", our_ini )
|
---|
1240 |
|
---|
1241 | /* we need this in order to determine the email client directory */
|
---|
1242 | EMailSearchDirMask = ''
|
---|
1243 |
|
---|
1244 | /* new version ? Update WPS objects! */
|
---|
1245 | if (OdinBugVersion = '' | OdinBugVersion < word(VRGet("OdinBugReport","HintText"),2)) & translate(VRGet("Application","Commandline")) <> '/INSTALLONLY' then do
|
---|
1246 | call _InstallWPSObjects
|
---|
1247 | call PB_Help_Click
|
---|
1248 | end
|
---|
1249 |
|
---|
1250 | if OdinBugVersion > word(VRGet("OdinBugReport","HintText"),2) then do
|
---|
1251 | Msg.Type = "W"
|
---|
1252 | Msg.Text = "You have used a newer version of OdinBug recently ("OdinBugVersion")! This version ("word(VRGet("OdinBugReport","HintText"),2)") might not have all features that you expect!"
|
---|
1253 | call _ShowMsg
|
---|
1254 | end
|
---|
1255 |
|
---|
1256 | /* set default values */
|
---|
1257 | if BuildDir = '' then Builddir = strip(directory(),'T','\')||'\'
|
---|
1258 | if DontSaveAppDir = '' then DontSaveAppDir = 1
|
---|
1259 | if AskDeleteLog = '' then AskDeleteLog = 0
|
---|
1260 | if TestAppDir = '' then TestAppDir = strip(directory(),'T','\')||'\'
|
---|
1261 | if EMail = '' then EMail = 'odinusers@yahoogroups.com'
|
---|
1262 | if Messenger = '' then Messenger = 'NETSCAPE.EXE'
|
---|
1263 | /* MessengerDir stays empty if empty */
|
---|
1264 | /* Account stays empty if empty */
|
---|
1265 | /* LogFileBrowser stays empty if empty */
|
---|
1266 | if BufferSize = '' then BufferSize = 10
|
---|
1267 | if AddException = '' then AddException = 1
|
---|
1268 |
|
---|
1269 | /* Now let us process the commandline */
|
---|
1270 | call _CommandLineParse
|
---|
1271 | return
|
---|
1272 |
|
---|
1273 | /*:VRX _InitProgress
|
---|
1274 | */
|
---|
1275 | _InitProgress: /* Initialize the progress bar */
|
---|
1276 | ok = VRSet("Progress","Visible", 1)
|
---|
1277 | ok = VRSet("DT_Progress","Visible", 0)
|
---|
1278 | ok = VRSet("SL_Progress","Percentile",0)
|
---|
1279 | return
|
---|
1280 |
|
---|
1281 | /*:VRX _INIWrite
|
---|
1282 | */
|
---|
1283 | _INIWrite: /* Write settings to INI file */
|
---|
1284 | ok = VRSetIni( "OdinBug", "BuildDir", BuildDir, our_ini, 'NoClose' )
|
---|
1285 | ok = VRSetIni( "OdinBug", "DontSaveAppDir", DontSaveAppDir, our_ini, 'NoClose' )
|
---|
1286 | if \DontSaveAppDir then ok = VRSetIni( "OdinBug", "TestAppDir", TestAppDir, our_ini, 'NoClose' )
|
---|
1287 | ok = VRSetIni( "OdinBug", "AskDeleteLog", AskDeleteLog, our_ini, 'NoClose' )
|
---|
1288 | ok = VRSetIni( "OdinBug", "EMail", EMail, our_ini, 'NoClose' )
|
---|
1289 | ok = VRSetIni( "OdinBug", "Messenger", Messenger, our_ini, 'NoClose' )
|
---|
1290 | ok = VRSetIni( "OdinBug", "MessengerDir", MessengerDir, our_ini, 'NoClose' )
|
---|
1291 | ok = VRSetIni( "OdinBug", "LogFileBrowser", LogFileBrowser, our_ini, 'NoClose' )
|
---|
1292 | ok = VRSetIni( "OdinBug", "Account", Account, our_ini, 'NoClose' )
|
---|
1293 | ok = VRSetIni( "OdinBug", "BufferSize", BufferSize, our_ini, 'NoClose' )
|
---|
1294 | ok = VRSetIni( "OdinBug", "AddException", AddException, our_ini, 'NoClose' )
|
---|
1295 | ok = VRSetIni( "OdinBug", "Version", OdinBugVersion , our_ini )
|
---|
1296 | return
|
---|
1297 |
|
---|
1298 | /*:VRX _InstallWPSObjects
|
---|
1299 | */
|
---|
1300 | _InstallWPSObjects:
|
---|
1301 | /* write new version number to disk */
|
---|
1302 | OdinBugVersion = word(VRGet("OdinBugReport","HintText"),2)
|
---|
1303 | ok = VRSetIni( "OdinBug", "Version", OdinBugVersion , our_ini )
|
---|
1304 |
|
---|
1305 | /* destroy old obsolete OdinBug object */
|
---|
1306 | ok = SysDestroyObject("<OdinBug>")
|
---|
1307 |
|
---|
1308 | /* Set Creation Disposition - we are polite and update always */
|
---|
1309 | CreateCollision = 'Update'
|
---|
1310 |
|
---|
1311 | rc1 = _CreateObject( 'WPFolder','Odin','<WP_PROGRAMSFOLDER>',,
|
---|
1312 | 'HIDEBUTTON=DEFAULT;'||,
|
---|
1313 | 'MINWIN=DEFAULT;'||,
|
---|
1314 | 'CCVIEW=DEFAULT;'||,
|
---|
1315 | 'DEFAULTVIEW=DEFAULT;'||,
|
---|
1316 | 'OBJECTID=<ODINFOLDER>',,
|
---|
1317 | CreateCollision )
|
---|
1318 |
|
---|
1319 | rc2 = _CreateObject( 'WPProgram','OdinBug','<ODINFOLDER>',,
|
---|
1320 | 'EXENAME='||exe_file||';'||,
|
---|
1321 | 'PROGTYPE=PM;'||,
|
---|
1322 | 'TITLE=Report Odin Bugs;'||,
|
---|
1323 | 'ASSOCTYPE=Odin-Logfiles,,;'||,
|
---|
1324 | 'ASSOCFILTER=odin32_?.log,,;'||,
|
---|
1325 | 'NOPRINT=YES;'||,
|
---|
1326 | 'HIDEBUTTON=DEFAULT;'||,
|
---|
1327 | 'MINWIN=DEFAULT;'||,
|
---|
1328 | 'CCVIEW=DEFAULT;'||,
|
---|
1329 | 'DEFAULTVIEW=DEFAULT;'||,
|
---|
1330 | 'OBJECTID=<Report_Odin_Bugs>',,
|
---|
1331 | CreateCollision )
|
---|
1332 |
|
---|
1333 | rc3 = _CreateObject( 'WPProgram','Report Odin Bugs Manual','<ODINFOLDER>',,
|
---|
1334 | 'EXENAME=VIEW.EXE;'||,
|
---|
1335 | 'PROGTYPE=PM;'||,
|
---|
1336 | 'PARAMETERS='||base_dir||'ODINBUG.HLP Introduction;'||,
|
---|
1337 | 'TITLE=Report Odin Bugs^Manual;'||,
|
---|
1338 | 'NOPRINT=YES;'||,
|
---|
1339 | 'HIDEBUTTON=DEFAULT;'||,
|
---|
1340 | 'MINWIN=DEFAULT;'||,
|
---|
1341 | 'CCVIEW=DEFAULT;'||,
|
---|
1342 | 'DEFAULTVIEW=DEFAULT;'||,
|
---|
1343 | 'OBJECTID=<Report_Odin_Bugs_Help>',,
|
---|
1344 | CreateCollision )
|
---|
1345 | rc4 = _CreateObject( 'WPProgram','Report Odin Bugs Readme','<ODINFOLDER>',,
|
---|
1346 | 'EXENAME=E.EXE;'||,
|
---|
1347 | 'PROGTYPE=PM;'||,
|
---|
1348 | 'PARAMETERS='||base_dir||'Readme.ODINBUG;'||,
|
---|
1349 | 'TITLE=Report Odin Bugs^ReadMe;'||,
|
---|
1350 | 'NOPRINT=YES;'||,
|
---|
1351 | 'HIDEBUTTON=DEFAULT;'||,
|
---|
1352 | 'MINWIN=DEFAULT;'||,
|
---|
1353 | 'CCVIEW=DEFAULT;'||,
|
---|
1354 | 'DEFAULTVIEW=DEFAULT;'||,
|
---|
1355 | 'OBJECTID=<Report_Odin_Bugs_ReadMe>',,
|
---|
1356 | CreateCollision )
|
---|
1357 | rc5 = _CreateObject( 'WPUrl','Subscribe to odinusers mailing list','<ODINFOLDER>',,
|
---|
1358 | 'TITLE=Subscribe to^odinusers mailing list;'||,
|
---|
1359 | 'URL=http://groups.yahoo.com/group/odinusers/join;'||,
|
---|
1360 | 'HIDEBUTTON=DEFAULT;'||,
|
---|
1361 | 'MINWIN=DEFAULT;'||,
|
---|
1362 | 'CCVIEW=DEFAULT;'||,
|
---|
1363 | 'DEFAULTVIEW=ICON;'||,
|
---|
1364 | 'OBJECTID=<Subscribe_odinusers@yahoogroups>',,
|
---|
1365 | CreateCollision )
|
---|
1366 | rc6 = _CreateObject( 'WPProgram','Project Odin User''s Manual','<ODINFOLDER>',,
|
---|
1367 | 'EXENAME=VIEW.EXE;'||,
|
---|
1368 | 'PROGTYPE=PM;'||,
|
---|
1369 | 'PARAMETERS='||base_dir||'ODINUSER.INF Introduction;'||,
|
---|
1370 | 'TITLE=Project Odin^User''s Manual;'||,
|
---|
1371 | 'NOPRINT=YES;'||,
|
---|
1372 | 'HIDEBUTTON=DEFAULT;'||,
|
---|
1373 | 'MINWIN=DEFAULT;'||,
|
---|
1374 | 'CCVIEW=DEFAULT;'||,
|
---|
1375 | 'DEFAULTVIEW=DEFAULT;'||,
|
---|
1376 | 'OBJECTID=<Project_Odin_Users_Manual>',,
|
---|
1377 | CreateCollision )
|
---|
1378 |
|
---|
1379 | rc7 = _CreateObject( 'WPUrl','Subscribe to win32os2-wai mailing list^(for developers)','<ODINFOLDER>',,
|
---|
1380 | 'TITLE=Subscribe to^win32os2-wai mailing list^(for developers);'||,
|
---|
1381 | 'URL=http://groups.yahoo.com/group/win32os2-wai/join;'||,
|
---|
1382 | 'HIDEBUTTON=DEFAULT;'||,
|
---|
1383 | 'MINWIN=DEFAULT;'||,
|
---|
1384 | 'CCVIEW=DEFAULT;'||,
|
---|
1385 | 'DEFAULTVIEW=ICON;'||,
|
---|
1386 | 'OBJECTID=<Subscribe_win32os2wai@yahoogroups>',,
|
---|
1387 | CreateCollision )
|
---|
1388 |
|
---|
1389 | if rc1 + rc2 + rc3 + rc4 + rc5 + rc6 + rc7 = 7 & translate(VRGet("Application","Commandline")) <> '/INSTALLONLY' then do
|
---|
1390 | msg.Text = 'All OdinBug object(s) created/updated sucessfully!'
|
---|
1391 | msg.Type = 'Info'
|
---|
1392 | call _ShowMsg
|
---|
1393 | end
|
---|
1394 | if rc1 + rc2 + rc3 + rc4 + rc5 + rc6 + rc7 <> 7 then do
|
---|
1395 | msg.Text = 'Error creating OdinBug object(s)!'
|
---|
1396 | msg.Type = 'Error'
|
---|
1397 | call _ShowMsg
|
---|
1398 | end
|
---|
1399 | return
|
---|
1400 | /*:VRX _LaunchPMMail
|
---|
1401 | */
|
---|
1402 | _LaunchPMMail:
|
---|
1403 | ok = VRSEt("SL_Progress","Visible", 0)
|
---|
1404 | ok = VRSEt("DT_Progress","Visible", 1)
|
---|
1405 | ok = VRSet("DT_Progress","Caption", "Trying to start PMMail. Please wait...")
|
---|
1406 | ok = VRSet("Progress","Visible", 1)
|
---|
1407 | 'start PMMAIL.EXE'
|
---|
1408 | ok = SysfileTree(MessengerDir'TEMP',TempDir., 'DO')
|
---|
1409 | Ctd = 10
|
---|
1410 | do while (TempDir.0 = 0) & (Ctd > 0)
|
---|
1411 | ok = SysSleep(1)
|
---|
1412 | Ctd = Ctd - 1
|
---|
1413 | ok = SysfileTree(MessengerDir'TEMP',TempDir., 'DO')
|
---|
1414 | end
|
---|
1415 | ok = VRSet("Progress","Visible", 0)
|
---|
1416 | ok = VRSEt("SL_Progress","Visible", 1)
|
---|
1417 | ok = VRSEt("DT_Progress","Visible", 0)
|
---|
1418 | return
|
---|
1419 |
|
---|
1420 | /*:VRX _LoadOtherFuncs
|
---|
1421 | */
|
---|
1422 | _LoadOtherFuncs:
|
---|
1423 | /* Register RexxUtil-API */
|
---|
1424 | call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
|
---|
1425 | call SysLoadFuncs
|
---|
1426 | return
|
---|
1427 |
|
---|
1428 | /*:VRX _ProcessHotKeys
|
---|
1429 | */
|
---|
1430 | _ProcessHotKeys:
|
---|
1431 | KeyObj = VRInfo( "Object" )
|
---|
1432 | KeyStr = VRGet( KeyObj, "KeyString" )
|
---|
1433 | select
|
---|
1434 | when KeyStr = "{Alt}c" then call PB_CreateReport_Click
|
---|
1435 | when KeyStr = "{Alt}m" then call PB_Email_Click
|
---|
1436 | when KeyStr = "{Alt}o" then call PB_OpenReport_Click
|
---|
1437 | when KeyStr = "{Alt}b" then call PB_BrowseLogFile_Click
|
---|
1438 | when KeyStr = "{Alt}h" then call PB_Help_Click
|
---|
1439 | when KeyStr = "{Alt}x" then call PB_Exit_Click
|
---|
1440 | otherwise ok = VRSet(KeyObj, "KeyString", Keystr)
|
---|
1441 | end
|
---|
1442 | return
|
---|
1443 |
|
---|
1444 | /*:VRX _ShowMsg
|
---|
1445 | */
|
---|
1446 | _ShowMsg:
|
---|
1447 | Buttons.1 = "OK"
|
---|
1448 | Buttons.0 = 1
|
---|
1449 | id = VRMessage( VRWindow(), Msg.Text, Msg.Title, Msg.Type, "Buttons.", buttons.1, buttons.1 )
|
---|
1450 | return
|
---|
1451 |
|
---|
1452 | /*:VRX _StartUp
|
---|
1453 | */
|
---|
1454 | _StartUp:
|
---|
1455 | call _GUIInit
|
---|
1456 | call _AnalyseConfigSys
|
---|
1457 | call _AnalyseSysLevelOs2
|
---|
1458 | if Foundxf86supsys then call _AnalyseXF86SupSys
|
---|
1459 | call _AnalyseSysLevelFPK
|
---|
1460 | if FoundScitech then call _AnalyseScitechDD
|
---|
1461 | call _AnalyseWarpINdatabase
|
---|
1462 | call _GUIRedraw
|
---|
1463 | if LogFileName = ''
|
---|
1464 | then call PB_SearchLogFile_Click
|
---|
1465 | else call _GotNewLogfileName
|
---|
1466 |
|
---|
1467 | isStartup = 1
|
---|
1468 | call PB_SearchBuild_Click
|
---|
1469 | return
|
---|
1470 |
|
---|
1471 | /*:VRX _UnInstallWPSObjects
|
---|
1472 | */
|
---|
1473 | _UnInstallWPSObjects:
|
---|
1474 | msg.Text = 'Really remove all OdinBug objects?'
|
---|
1475 | msg.Type = 'Q'
|
---|
1476 | Buttons.1 = "Yes"
|
---|
1477 | Buttons.2 = "No"
|
---|
1478 | Buttons.0 = 2
|
---|
1479 | id = VRMessage( VRWindow(), "Really remove all OdinBug objects?", Msg.Title, "Query", "Buttons.", buttons.2, buttons.2 )
|
---|
1480 | if id = 1 then do
|
---|
1481 | ok = SysDestroyObject("<Report_Odin_Bugs_Help>")
|
---|
1482 | ok = SysDestroyObject("<Report_Odin_Bugs_ReadMe>")
|
---|
1483 | ok = SysDestroyObject("<Subscribe_odinusers@yahoogroups>")
|
---|
1484 | DestroyWPS = 1
|
---|
1485 | msg.Text = 'All OdinBug object(s) destroyed!'
|
---|
1486 | msg.Type = 'Info'
|
---|
1487 | call _ShowMsg
|
---|
1488 | end
|
---|
1489 | return
|
---|
1490 |
|
---|
1491 | /*:VRX _xdate
|
---|
1492 | */
|
---|
1493 | _xdate: procedure
|
---|
1494 | parse arg datestring
|
---|
1495 | hdate = ''
|
---|
1496 | do I = 1 to 2
|
---|
1497 | J = I * 2 - 1
|
---|
1498 | hdate = hdate||right('0'||x2d(substr(datestring,J,2)),2)'.'
|
---|
1499 | end
|
---|
1500 | Jahr = x2d(substr(datestring,5,2)) + x2d(substr(datestring,7,2)) *256
|
---|
1501 | hdate= hdate||Jahr
|
---|
1502 | return hdate
|
---|
1503 |
|
---|
1504 | /*:VRX _xlower
|
---|
1505 | */
|
---|
1506 | _xlower: procedure
|
---|
1507 | Tstring = arg(1)
|
---|
1508 | RString = translate(TString, xrange('a','z'), xrange('A','Z'))
|
---|
1509 | return RString
|
---|
1510 |
|
---|
1511 | /*:VRX _xmonth
|
---|
1512 | */
|
---|
1513 | _xmonth: procedure
|
---|
1514 | parse upper arg TextMonth
|
---|
1515 | select
|
---|
1516 | when left(TextMonth,3) = 'JAN' |,
|
---|
1517 | left(TextMonth,3) = 'JN' then NumMonth = 1
|
---|
1518 | when left(TextMonth,3) = 'FEB' then NumMonth = 2
|
---|
1519 | when left(TextMonth,3) = 'MAR' |,
|
---|
1520 | left(TextMonth,3) = 'MR' then NumMonth = 3
|
---|
1521 | when left(TextMonth,3) = 'APR' then NumMonth = 4
|
---|
1522 | when left(TextMonth,3) = 'MAY' |,
|
---|
1523 | left(TextMonth,3) = 'MAI' then NumMonth = 5
|
---|
1524 | when left(TextMonth,3) = 'JUN' then NumMonth = 6
|
---|
1525 | when left(TextMonth,3) = 'JUL' then NumMonth = 7
|
---|
1526 | when left(TextMonth,3) = 'AUG' then NumMonth = 8
|
---|
1527 | when left(TextMonth,3) = 'SEP' then NumMonth = 9
|
---|
1528 | when left(TextMonth,3) = 'OCT' |,
|
---|
1529 | left(TextMonth,3) = 'OKT' then NumMonth = 10
|
---|
1530 | when left(TextMonth,3) = 'NOV' then NumMonth = 11
|
---|
1531 | when left(TextMonth,2) = 'DE' then NumMonth = 12
|
---|
1532 | otherwise NumMonth = 0 /* this indicates something went wrong... */
|
---|
1533 | end
|
---|
1534 | NumMonth = right('0'||NumMonth,2)
|
---|
1535 | return NumMonth
|
---|
1536 |
|
---|
1537 | /*:VRX _xtime
|
---|
1538 | */
|
---|
1539 | _xtime: procedure
|
---|
1540 | parse arg timestring
|
---|
1541 | htime = ''
|
---|
1542 | do I = 1 to length(timestring)/2
|
---|
1543 | J = I * 2 - 1
|
---|
1544 | htime = htime||right('0'||x2d(substr(timestring,J,2)),2)':'
|
---|
1545 | end
|
---|
1546 | htime = strip(htime,'T',':')
|
---|
1547 | return htime
|
---|
1548 |
|
---|
1549 | /*:VRX AboutPage_Close
|
---|
1550 | */
|
---|
1551 | AboutPage_Close:
|
---|
1552 | call AboutPage_Fini
|
---|
1553 | return
|
---|
1554 |
|
---|
1555 | /*:VRX AboutPage_Create
|
---|
1556 | */
|
---|
1557 | AboutPage_Create:
|
---|
1558 | call AboutPage_Init
|
---|
1559 | ok = VRSet("DT_AboutText","Caption","OdinBug Version "word(VRget("OdinBugReport","HintText"),2)||CRLF||"(c) 2001-2002 by Herwig Bauernfeind")
|
---|
1560 | return
|
---|
1561 |
|
---|
1562 | /*:VRX AboutPage_Fini
|
---|
1563 | */
|
---|
1564 | AboutPage_Fini:
|
---|
1565 | window = VRInfo( "Window" )
|
---|
1566 | call VRDestroy window
|
---|
1567 | drop window
|
---|
1568 | return
|
---|
1569 | /*:VRX AboutPage_Init
|
---|
1570 | */
|
---|
1571 | AboutPage_Init:
|
---|
1572 | window = VRInfo( "Object" )
|
---|
1573 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
1574 | call VRMethod window, "CenterWindow"
|
---|
1575 | call VRSet window, "Visible", 1
|
---|
1576 | call VRMethod window, "Activate"
|
---|
1577 | end
|
---|
1578 | drop window
|
---|
1579 | return
|
---|
1580 |
|
---|
1581 | /*:VRX CB_AddException_Click
|
---|
1582 | */
|
---|
1583 | CB_AddException_Click:
|
---|
1584 | AddException = VRget("CB_AddException","Set")
|
---|
1585 | return
|
---|
1586 |
|
---|
1587 | /*:VRX CB_AskDeleteLog_Click
|
---|
1588 | */
|
---|
1589 | CB_AskDeleteLog_Click:
|
---|
1590 | AskDeleteLog = VRget("CB_AskDeleteLog","set")
|
---|
1591 | return
|
---|
1592 |
|
---|
1593 | /*:VRX CB_DontSaveAppDir_Click
|
---|
1594 | */
|
---|
1595 | CB_DontSaveAppDir_Click:
|
---|
1596 | DontSaveAppDir = VRget("CB_DontSaveAppDir","set")
|
---|
1597 | return
|
---|
1598 |
|
---|
1599 | /*:VRX CB_OhNooo_Click
|
---|
1600 | */
|
---|
1601 | CB_OhNooo_Click:
|
---|
1602 | OhNooo = VRGet("CB_OhNooo","set")
|
---|
1603 | return
|
---|
1604 |
|
---|
1605 | /*:VRX CB_OverRideTooOld_Click
|
---|
1606 | */
|
---|
1607 | CB_OverRideTooOld_Click:
|
---|
1608 | OverRideTooOld = VRGet("CB_OverRideTooOld","set")
|
---|
1609 | return
|
---|
1610 |
|
---|
1611 | /*:VRX CB_UseRxNap_Click
|
---|
1612 | */
|
---|
1613 | CB_UseRxNap_Click:
|
---|
1614 | UseRxNap then ok = VRGet("CB_UseRxNap","Set")
|
---|
1615 | return
|
---|
1616 |
|
---|
1617 | /*:VRX CB_WIN32LOG_ENABLED_Click
|
---|
1618 | */
|
---|
1619 | CB_WIN32LOG_ENABLED_Click:
|
---|
1620 | if WIN32LOG_ENABLED \= '' then ok = VRSet("CB_WIN32LOG_ENABLED","set",1)
|
---|
1621 | else ok = VRSet("CB_WIN32LOG_ENABLED","set",0)
|
---|
1622 | return
|
---|
1623 |
|
---|
1624 | /*:VRX CB_xf86supsys_Click
|
---|
1625 | */
|
---|
1626 | CB_xf86supsys_Click:
|
---|
1627 | ok = VRSet("CB_xf86supsys","Set",Foundxf86supsys)
|
---|
1628 | return
|
---|
1629 |
|
---|
1630 | /*:VRX DDCB_EMail_Change
|
---|
1631 | */
|
---|
1632 | DDCB_EMail_Change:
|
---|
1633 | if pos("@",VRGet("DDCB_EMail","Value")) = 0 then return
|
---|
1634 | EMail = VRGet("DDCB_EMail","Value")
|
---|
1635 | return
|
---|
1636 |
|
---|
1637 | /*:VRX DDCB_LaunchType_Change
|
---|
1638 | */
|
---|
1639 | DDCB_LaunchType_Change:
|
---|
1640 | if FoundWin32KSysNow & FoundWin32KSysAtBugTime & VRGet("DDCB_LaunchType","value") = 'PE.EXE' then do
|
---|
1641 | Msg.Type = "W"
|
---|
1642 | Msg.Text = "Usage of PE.EXE is not recommended, if Win32K.SYS is installed!"
|
---|
1643 | call _ShowMsg
|
---|
1644 | end
|
---|
1645 | return
|
---|
1646 |
|
---|
1647 | /*:VRX DDCB_Messenger_Change
|
---|
1648 | */
|
---|
1649 | DDCB_Messenger_Change:
|
---|
1650 | if pos(".EXE",translate(VRGet("DDCB_Messenger","Value"))) = 0 then return
|
---|
1651 | Messenger = VRGet("DDCB_Messenger","Value")
|
---|
1652 | return
|
---|
1653 |
|
---|
1654 | /*:VRX EF_Account_Change
|
---|
1655 | */
|
---|
1656 | EF_Account_Change:
|
---|
1657 | Account = VRget("EF_Account","Value")
|
---|
1658 | return
|
---|
1659 |
|
---|
1660 | /*:VRX EF_AppName_Change
|
---|
1661 | */
|
---|
1662 | EF_AppName_Change:
|
---|
1663 | if left(VRGet("EF_AppName","Value"),1) = '#' then do
|
---|
1664 | ok = VRset("EF_Appname","Value","Odin Bug Test")
|
---|
1665 | ok = VRset("EF_AppVersion","Value","9.9.9")
|
---|
1666 | ok = VRset("DDCB_URL","Value","www.odinbugtest.net")
|
---|
1667 | ok = VRSet("MLE_OwnWords","Value","This is test data. It is not intended to be sent to Team Odin support sites. The above website does not exist!")
|
---|
1668 | end
|
---|
1669 | return
|
---|
1670 |
|
---|
1671 | /*:VRX EF_BuildDir_Change
|
---|
1672 | */
|
---|
1673 | EF_BuildDir_Change:
|
---|
1674 | BuildDir = VRGet("EF_BuildDir","Value")
|
---|
1675 | if Right(BuildDir,1) <> '\' then do
|
---|
1676 | BuildDir = BuildDir || '\'
|
---|
1677 | /* ok = VRSet("EF_BuildDir","Value", BuildDir) */
|
---|
1678 | end
|
---|
1679 | return
|
---|
1680 |
|
---|
1681 | /*:VRX EF_LogFileBrowser_Change
|
---|
1682 | */
|
---|
1683 | EF_LogFileBrowser_Change:
|
---|
1684 | LogFileBrowser = VRget("EF_LogFileBrowser","Value")
|
---|
1685 | return
|
---|
1686 |
|
---|
1687 | /*:VRX EF_MessengerDir_Change
|
---|
1688 | */
|
---|
1689 | EF_MessengerDir_Change:
|
---|
1690 | MessengerDir = VRget("EF_MessengerDir","Value")
|
---|
1691 | if Right(MessengerDir,1) <> '\' & MessengerDir <> '' then do
|
---|
1692 | MessengerDir = MessengerDir || '\'
|
---|
1693 | /* ok = VRSet("EF_MessengerDir","Value", MessengerDir) */
|
---|
1694 | end
|
---|
1695 | return
|
---|
1696 |
|
---|
1697 | /*:VRX EF_OdinINI_Change
|
---|
1698 | */
|
---|
1699 | EF_OdinINI_Change:
|
---|
1700 | if translate(right(VRGet("EF_OdinINI","Value"),8)) <> 'ODIN.INI' then return
|
---|
1701 | ok = SysFileTree(VRGet("EF_OdinINI","Value"),OdinIniFile.,"FO")
|
---|
1702 | if OdinINiFile.0 = 0 then return
|
---|
1703 | OdinINI = VRGet("EF_OdinINI","Value")
|
---|
1704 | call _AnalyseOdininst
|
---|
1705 | call _AnalyseOdinINI
|
---|
1706 | return
|
---|
1707 |
|
---|
1708 | /*:VRX EF_OdinWinSysDir_Change
|
---|
1709 | */
|
---|
1710 | EF_OdinWinSysDir_Change:
|
---|
1711 | if right(VRGet("EF_OdinWinSysDir","Value"),1) <> '\' then return
|
---|
1712 | ok = SysFileTree(strip(VRGet("EF_OdinWinSysDir","Value"),'T','\'),OdinWinSysDir.,"DO")
|
---|
1713 | if OdinWinSysDir.0 = 0 then return
|
---|
1714 | OdinSysDir = VRGet("EF_OdinWinSysDir","Value")
|
---|
1715 | call _AnalyseOdininst
|
---|
1716 | return
|
---|
1717 |
|
---|
1718 | /*:VRX EF_TestAppDir_Change
|
---|
1719 | */
|
---|
1720 | EF_TestAppDir_Change:
|
---|
1721 | TestAppDir = VRget("EF_TestAppDir","Value")
|
---|
1722 | if Right(TestAppDir,1) <> '\' then do
|
---|
1723 | TestAppDir = TestAppDir || '\'
|
---|
1724 | /* ok = VRSet("EF_TestAppDir","Value", TestAppDir) */
|
---|
1725 | end
|
---|
1726 | return
|
---|
1727 |
|
---|
1728 | /*:VRX Fini
|
---|
1729 | */
|
---|
1730 | Fini:
|
---|
1731 | window = VRWindow()
|
---|
1732 | call VRSet window, "Visible", 0
|
---|
1733 | drop window
|
---|
1734 | return 0
|
---|
1735 |
|
---|
1736 | /*:VRX Halt
|
---|
1737 | */
|
---|
1738 | Halt:
|
---|
1739 | signal _VREHalt
|
---|
1740 | return
|
---|
1741 |
|
---|
1742 | /*:VRX HelpWindow_Close
|
---|
1743 | */
|
---|
1744 | HelpWindow_Close:
|
---|
1745 | call HelpWindow_Fini
|
---|
1746 | return
|
---|
1747 |
|
---|
1748 | /*:VRX HelpWindow_Create
|
---|
1749 | */
|
---|
1750 | HelpWindow_Create:
|
---|
1751 | call HelpWindow_Init
|
---|
1752 | return
|
---|
1753 |
|
---|
1754 | /*:VRX HelpWindow_Fini
|
---|
1755 | */
|
---|
1756 | HelpWindow_Fini:
|
---|
1757 | window = VRInfo( "Window" )
|
---|
1758 | call VRDestroy window
|
---|
1759 | drop window
|
---|
1760 | return
|
---|
1761 | /*:VRX HelpWindow_Init
|
---|
1762 | */
|
---|
1763 | HelpWindow_Init:
|
---|
1764 | window = VRInfo( "Object" )
|
---|
1765 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
1766 | /* call VRMethod window, "CenterWindow" */
|
---|
1767 | call VRSet window, "Visible", 1
|
---|
1768 | call VRMethod window, "Activate"
|
---|
1769 | end
|
---|
1770 | drop window
|
---|
1771 | return
|
---|
1772 |
|
---|
1773 | /*:VRX Init
|
---|
1774 | */
|
---|
1775 | Init:
|
---|
1776 | window = VRWindow()
|
---|
1777 | call VRMethod window, "CenterWindow"
|
---|
1778 | call VRSet window, "Visible", 0
|
---|
1779 | call VRMethod window, "Activate"
|
---|
1780 | drop window
|
---|
1781 | return
|
---|
1782 |
|
---|
1783 | /*:VRX NB_Main_PageSelected
|
---|
1784 | */
|
---|
1785 | NB_Main_PageSelected:
|
---|
1786 | /* CurPage = VRMethod("NB_Main","GetPageWindow",VRInfo("Page")) */
|
---|
1787 | CurPage = VRInfo("Page")
|
---|
1788 | select
|
---|
1789 | when CurPage = 1 then ok = VRMethod("EF_Appname","setfocus")
|
---|
1790 | when CurPage = 2 then ok = VRMethod("LB_Exception","setfocus")
|
---|
1791 | when CurPage = 3 then ok = VRMethod("EF_Build","setfocus")
|
---|
1792 | when CurPage = 4 then ok = VRMethod("DDCB_OS2Version","Setfocus")
|
---|
1793 | when CurPage = 5 then do
|
---|
1794 | ok = VRSet("EF_BuildDir","Value", BuildDir)
|
---|
1795 | ok = VRSet("EF_TestAppDir","Value", TestAppDir)
|
---|
1796 | ok = VRMethod("EF_BuildDir","SetFocus")
|
---|
1797 | end
|
---|
1798 | when CurPage = 6 then do
|
---|
1799 | ok = VRSet("EF_MessengerDir","Value", MessengerDir)
|
---|
1800 | ok = VRMethod("DDCB_EMail","SetFocus")
|
---|
1801 | end
|
---|
1802 | otherwise nop
|
---|
1803 | end
|
---|
1804 | return
|
---|
1805 |
|
---|
1806 | /*:VRX OdinBugReport_Close
|
---|
1807 | */
|
---|
1808 | OdinBugReport_Close:
|
---|
1809 | if AskDeleteLog & LogFileName <> '' then do
|
---|
1810 | Buttons.1 = "Yes"
|
---|
1811 | Buttons.2 = "No"
|
---|
1812 | Buttons.0 = 2
|
---|
1813 | id = VRMessage( VRWindow(), 'Delete "'LogFileName'"?', "Odin Bug Report Generator", "Query", "Buttons.", 2, 2 )
|
---|
1814 | if id = 1 then ok = SysFileDelete(LogFileName)
|
---|
1815 | end
|
---|
1816 | ok = SysFileDelete(TempFile)
|
---|
1817 | call Quit
|
---|
1818 | return
|
---|
1819 |
|
---|
1820 | /*:VRX OdinBugReport_Create
|
---|
1821 | */
|
---|
1822 | OdinBugReport_Create:
|
---|
1823 | call _LoadOtherFuncs
|
---|
1824 | window = VRLoadSecondary( "Progress" )
|
---|
1825 | call _INIRead
|
---|
1826 | return
|
---|
1827 |
|
---|
1828 | /*:VRX PageApplication_Close
|
---|
1829 | */
|
---|
1830 | PageApplication_Close:
|
---|
1831 | call PageApplication_Fini
|
---|
1832 | return
|
---|
1833 |
|
---|
1834 | /*:VRX PageApplication_Create
|
---|
1835 | */
|
---|
1836 | PageApplication_Create:
|
---|
1837 | call PageApplication_Init
|
---|
1838 | call _StartUp
|
---|
1839 | return
|
---|
1840 |
|
---|
1841 | /*:VRX PageApplication_Fini
|
---|
1842 | */
|
---|
1843 | PageApplication_Fini:
|
---|
1844 | window = VRInfo( "Window" )
|
---|
1845 | call VRDestroy window
|
---|
1846 | drop window
|
---|
1847 | return
|
---|
1848 | /*:VRX PageApplication_Init
|
---|
1849 | */
|
---|
1850 | PageApplication_Init:
|
---|
1851 | window = VRInfo( "Object" )
|
---|
1852 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
1853 | call VRMethod window, "CenterWindow"
|
---|
1854 | call VRSet window, "Visible", 1
|
---|
1855 | call VRMethod window, "Activate"
|
---|
1856 | end
|
---|
1857 | drop window
|
---|
1858 | return
|
---|
1859 |
|
---|
1860 | /*:VRX PageApplication_KeyPress
|
---|
1861 | */
|
---|
1862 | PageApplication_KeyPress:
|
---|
1863 | call _ProcessHotkeys
|
---|
1864 | return
|
---|
1865 |
|
---|
1866 | /*:VRX PageEMail_Close
|
---|
1867 | */
|
---|
1868 | PageEMail_Close:
|
---|
1869 | call PageEMail_Fini
|
---|
1870 | return
|
---|
1871 |
|
---|
1872 | /*:VRX PageEMail_Create
|
---|
1873 | */
|
---|
1874 | PageEMail_Create:
|
---|
1875 | call PageEMail_Init
|
---|
1876 | return
|
---|
1877 |
|
---|
1878 | /*:VRX PageEMail_Fini
|
---|
1879 | */
|
---|
1880 | PageEMail_Fini:
|
---|
1881 | window = VRInfo( "Window" )
|
---|
1882 | call VRDestroy window
|
---|
1883 | drop window
|
---|
1884 | return
|
---|
1885 | /*:VRX PageEMail_Init
|
---|
1886 | */
|
---|
1887 | PageEMail_Init:
|
---|
1888 | window = VRInfo( "Object" )
|
---|
1889 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
1890 | call VRMethod window, "CenterWindow"
|
---|
1891 | call VRSet window, "Visible", 1
|
---|
1892 | call VRMethod window, "Activate"
|
---|
1893 | end
|
---|
1894 | drop window
|
---|
1895 | return
|
---|
1896 |
|
---|
1897 | /*:VRX PageEMail_KeyPress
|
---|
1898 | */
|
---|
1899 | PageEMail_KeyPress:
|
---|
1900 | call _ProcessHotkeys
|
---|
1901 | return
|
---|
1902 |
|
---|
1903 | /*:VRX PageException_Close
|
---|
1904 | */
|
---|
1905 | PageException_Close:
|
---|
1906 | call PageException_Fini
|
---|
1907 | return
|
---|
1908 |
|
---|
1909 | /*:VRX PageException_Create
|
---|
1910 | */
|
---|
1911 | PageException_Create:
|
---|
1912 | call PageException_Init
|
---|
1913 | return
|
---|
1914 |
|
---|
1915 | /*:VRX PageException_Fini
|
---|
1916 | */
|
---|
1917 | PageException_Fini:
|
---|
1918 | window = VRInfo( "Window" )
|
---|
1919 | call VRDestroy window
|
---|
1920 | drop window
|
---|
1921 | return
|
---|
1922 | /*:VRX PageException_Init
|
---|
1923 | */
|
---|
1924 | PageException_Init:
|
---|
1925 | window = VRInfo( "Object" )
|
---|
1926 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
1927 | call VRMethod window, "CenterWindow"
|
---|
1928 | call VRSet window, "Visible", 1
|
---|
1929 | call VRMethod window, "Activate"
|
---|
1930 | end
|
---|
1931 | drop window
|
---|
1932 | return
|
---|
1933 |
|
---|
1934 | /*:VRX PageOdin_Close
|
---|
1935 | */
|
---|
1936 | PageOdin_Close:
|
---|
1937 | call PageOdin_Fini
|
---|
1938 | return
|
---|
1939 |
|
---|
1940 | /*:VRX PageOdin_Create
|
---|
1941 | */
|
---|
1942 | PageOdin_Create:
|
---|
1943 | call PageOdin_Init
|
---|
1944 | return
|
---|
1945 |
|
---|
1946 | /*:VRX PageOdin_Fini
|
---|
1947 | */
|
---|
1948 | PageOdin_Fini:
|
---|
1949 | window = VRInfo( "Window" )
|
---|
1950 | call VRDestroy window
|
---|
1951 | drop window
|
---|
1952 | return
|
---|
1953 | /*:VRX PageOdin_Init
|
---|
1954 | */
|
---|
1955 | PageOdin_Init:
|
---|
1956 | window = VRInfo( "Object" )
|
---|
1957 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
1958 | call VRMethod window, "CenterWindow"
|
---|
1959 | call VRSet window, "Visible", 1
|
---|
1960 | call VRMethod window, "Activate"
|
---|
1961 | end
|
---|
1962 | drop window
|
---|
1963 | return
|
---|
1964 |
|
---|
1965 | /*:VRX PageOdin_KeyPress
|
---|
1966 | */
|
---|
1967 | PageOdin_KeyPress:
|
---|
1968 | call _ProcessHotkeys
|
---|
1969 | return
|
---|
1970 |
|
---|
1971 | /*:VRX PageSettings_Close
|
---|
1972 | */
|
---|
1973 | PageSettings_Close:
|
---|
1974 | call PageSettings_Fini
|
---|
1975 | return
|
---|
1976 |
|
---|
1977 | /*:VRX PageSettings_Create
|
---|
1978 | */
|
---|
1979 | PageSettings_Create:
|
---|
1980 | call PageSettings_Init
|
---|
1981 | return
|
---|
1982 |
|
---|
1983 | /*:VRX PageSettings_Fini
|
---|
1984 | */
|
---|
1985 | PageSettings_Fini:
|
---|
1986 | window = VRInfo( "Window" )
|
---|
1987 | call VRDestroy window
|
---|
1988 | drop window
|
---|
1989 | return
|
---|
1990 | /*:VRX PageSettings_Init
|
---|
1991 | */
|
---|
1992 | PageSettings_Init:
|
---|
1993 | window = VRInfo( "Object" )
|
---|
1994 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
1995 | call VRMethod window, "CenterWindow"
|
---|
1996 | call VRSet window, "Visible", 1
|
---|
1997 | call VRMethod window, "Activate"
|
---|
1998 | end
|
---|
1999 | drop window
|
---|
2000 | return
|
---|
2001 |
|
---|
2002 | /*:VRX PageSettings_KeyPress
|
---|
2003 | */
|
---|
2004 | PageSettings_KeyPress:
|
---|
2005 | call _ProcessHotKeys
|
---|
2006 | return
|
---|
2007 |
|
---|
2008 | /*:VRX PageSystem_Close
|
---|
2009 | */
|
---|
2010 | PageSystem_Close:
|
---|
2011 | call PageSystem_Fini
|
---|
2012 | return
|
---|
2013 |
|
---|
2014 | /*:VRX PageSystem_Create
|
---|
2015 | */
|
---|
2016 | PageSystem_Create:
|
---|
2017 | call PageSystem_Init
|
---|
2018 | return
|
---|
2019 |
|
---|
2020 | /*:VRX PageSystem_Fini
|
---|
2021 | */
|
---|
2022 | PageSystem_Fini:
|
---|
2023 | window = VRInfo( "Window" )
|
---|
2024 | call VRDestroy window
|
---|
2025 | drop window
|
---|
2026 | return
|
---|
2027 | /*:VRX PageSystem_Init
|
---|
2028 | */
|
---|
2029 | PageSystem_Init:
|
---|
2030 | window = VRInfo( "Object" )
|
---|
2031 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
2032 | call VRMethod window, "CenterWindow"
|
---|
2033 | call VRSet window, "Visible", 1
|
---|
2034 | call VRMethod window, "Activate"
|
---|
2035 | end
|
---|
2036 | drop window
|
---|
2037 | return
|
---|
2038 |
|
---|
2039 | /*:VRX PageSystem_KeyPress
|
---|
2040 | */
|
---|
2041 | PageSystem_KeyPress:
|
---|
2042 | call _ProcessHotkeys
|
---|
2043 | return
|
---|
2044 |
|
---|
2045 | /*:VRX PB_About1_Click
|
---|
2046 | */
|
---|
2047 | PB_About1_Click:
|
---|
2048 | window = VRLoadSecondary( "AboutPage", "W" )
|
---|
2049 | return
|
---|
2050 |
|
---|
2051 | /*:VRX PB_About_Click
|
---|
2052 | */
|
---|
2053 | PB_About_Click:
|
---|
2054 | window = VRLoadSecondary( "AboutPage", "W" )
|
---|
2055 | return
|
---|
2056 |
|
---|
2057 | /*:VRX PB_AboutOK_Click
|
---|
2058 | */
|
---|
2059 | PB_AboutOK_Click:
|
---|
2060 | call AboutPage_Close
|
---|
2061 | return
|
---|
2062 |
|
---|
2063 | /*:VRX PB_BrowseLogFile_Click
|
---|
2064 | */
|
---|
2065 | PB_BrowseLogFile_Click:
|
---|
2066 | 'start "Browsing 'LogFileName'" /F 'LogFileBrowser' "'LogFileName'"'
|
---|
2067 | return
|
---|
2068 | /*:VRX PB_CreateReport_Click
|
---|
2069 | */
|
---|
2070 | PB_CreateReport_Click:
|
---|
2071 | ok = time('R')
|
---|
2072 | ok = VRSet("TM_CheckValid","Enabled", 0)
|
---|
2073 | ok = VRSet("PB_CreateReport","Enabled", 0)
|
---|
2074 | if _CreateReport() then do
|
---|
2075 | ok = VRSet("SL_Progress","Percentile",100)
|
---|
2076 | Msg.Text = "Created "RPTFileName" successfully ("strip(time('E'),'T','0')" sec.)!"
|
---|
2077 | Msg.Type = "Info"
|
---|
2078 | call _ShowMsg
|
---|
2079 | ok = VRSet("PB_Email","Enabled",1)
|
---|
2080 | ok = VRSet("PB_OpenReport","Enabled",1)
|
---|
2081 | end
|
---|
2082 | else ok = time('E')
|
---|
2083 | ok = VRSet("PB_CreateReport","Enabled", 1)
|
---|
2084 | ok = VRSet("TM_CheckValid","Enabled", 1)
|
---|
2085 | return
|
---|
2086 |
|
---|
2087 | /*:VRX PB_Email_Click
|
---|
2088 | */
|
---|
2089 | PB_Email_Click:
|
---|
2090 | CapMessenger = translate(filespec('Name',Messenger))
|
---|
2091 | select
|
---|
2092 | when pos('NETSCAPE',CapMessenger) > 0 then call _EMailNetscape
|
---|
2093 | when pos('PMMSEND',CapMessenger) > 0 then call _EMailPMMSend
|
---|
2094 | when pos('POLARBAR',CapMessenger) > 0 then call _EMailPolarbar
|
---|
2095 | when pos('MR2I',CapMessenger) > 0 then call _EMailMR2ICE
|
---|
2096 | otherwise call _EMailGeneric
|
---|
2097 | end
|
---|
2098 | return
|
---|
2099 |
|
---|
2100 | /*:VRX PB_ExeFile_Click
|
---|
2101 | */
|
---|
2102 | PB_ExeFile_Click:
|
---|
2103 | ExeFile = VRFileDialog( VRWindow(), "Search Windows Executable", "Open", TestAppDir"*.EXE", , , )
|
---|
2104 | call _GUIRedraw2
|
---|
2105 | return
|
---|
2106 |
|
---|
2107 | /*:VRX PB_Exit_Click
|
---|
2108 | */
|
---|
2109 | PB_Exit_Click:
|
---|
2110 | call OdinBugReport_Close
|
---|
2111 | return
|
---|
2112 | /*:VRX PB_Help_Click
|
---|
2113 | */
|
---|
2114 | PB_Help_Click:
|
---|
2115 | 'view 'base_dir"OdinBug.HLP Introduction"
|
---|
2116 | /* ok = SysSetObjectData(base_dir"OdinBug.HLP","OPEN=DEFAULT;PARAMETERS=Introduction") */
|
---|
2117 | return
|
---|
2118 | /*:VRX PB_Install1_Click
|
---|
2119 | */
|
---|
2120 | PB_Install1_Click:
|
---|
2121 | call _InstallWPSObjects
|
---|
2122 | return
|
---|
2123 | /*:VRX PB_Install_Click
|
---|
2124 | */
|
---|
2125 | PB_Install_Click:
|
---|
2126 | call _InstallWPSObjects
|
---|
2127 | return
|
---|
2128 | /*:VRX PB_OpenReport_Click
|
---|
2129 | */
|
---|
2130 | PB_OpenReport_Click:
|
---|
2131 | ok = SysSetObjectData(RPTFileName,"OPEN=DEFAULT")
|
---|
2132 | return
|
---|
2133 | /*:VRX PB_SaveSettings1_Click
|
---|
2134 | */
|
---|
2135 | PB_SaveSettings1_Click:
|
---|
2136 | call _INIWrite
|
---|
2137 | msg.Text = 'Settings saved sucessfully!'
|
---|
2138 | msg.Type = 'Info'
|
---|
2139 | call _ShowMsg
|
---|
2140 | return
|
---|
2141 |
|
---|
2142 | /*:VRX PB_SaveSettings_Click
|
---|
2143 | */
|
---|
2144 | PB_SaveSettings_Click:
|
---|
2145 | call _INIWrite
|
---|
2146 | msg.Text = 'Settings saved sucessfully!'
|
---|
2147 | msg.Type = 'Info'
|
---|
2148 | call _ShowMsg
|
---|
2149 | return
|
---|
2150 |
|
---|
2151 | /*:VRX PB_SearchBuild_Click
|
---|
2152 | */
|
---|
2153 | PB_SearchBuild_Click:
|
---|
2154 | ok = SysFileTree(BuildDir"odin32bin-"Kernel32Date"*",Builds.,"FO")
|
---|
2155 | if Builds.0 = 1 & isStartup
|
---|
2156 | then Filename = Builds.1
|
---|
2157 | else FileName = VRFileDialog( VRWindow(), "Step 2: Search Odin Build file", "Open", BuildDir"odin32bin-"Kernel32Date"*", , , )
|
---|
2158 |
|
---|
2159 | if Filename <> '' then do
|
---|
2160 | BuildFile = filespec('N',Filename)
|
---|
2161 | BuildDir = filespec('D',Filename)||filespec('P',Filename)
|
---|
2162 | if translate(right(Filename,3)) = 'WPI' then Installtype = "WarpIN"
|
---|
2163 | if translate(right(Filename,3)) = 'ZIP' then Installtype = "Manually"
|
---|
2164 |
|
---|
2165 | AllowBugReport = _CheckForExpiredBuild()
|
---|
2166 | ok = VRset("EF_Build","Value",BuildFile)
|
---|
2167 | ok = VRset("EF_BuildDir","Value",BuildDir)
|
---|
2168 | ok = VRset("DDCB_Installtype","Value",InstallType)
|
---|
2169 | if LogFileName = '' then do
|
---|
2170 | ok = VRset("EF_OdinWindir","value",OdinWinDir)
|
---|
2171 | ok = VRset("EF_OdinWinSysdir","value",OdinSysDir)
|
---|
2172 | ok = VRset("EF_OdinINI","value",OdinINI)
|
---|
2173 | end
|
---|
2174 | end
|
---|
2175 | isStartup = 0
|
---|
2176 | return
|
---|
2177 |
|
---|
2178 | /*:VRX PB_SearchLogFile_Click
|
---|
2179 | */
|
---|
2180 | PB_SearchLogFile_Click:
|
---|
2181 | LogFileName = VRFileDialog( VRWindow(), "Step 1: Search Odin Logfile", "Open", TestAppDir"odin32_?.log", , , )
|
---|
2182 | if LogFileName <> ''
|
---|
2183 | then call _GotNewLogfileName
|
---|
2184 | else ok = VRSet("PB_BrowseLogFile","Enabled",0)
|
---|
2185 | return
|
---|
2186 |
|
---|
2187 | /*:VRX PB_SearchLogFileBrowser_Click
|
---|
2188 | */
|
---|
2189 | PB_SearchLogFileBrowser_Click:
|
---|
2190 | LogFileBrowser = VRFileDialog( VRWindow(), "Search Logfile browser", "Open", "*.EXE", , , )
|
---|
2191 | if LogFileBrowser <> '' then ok = VRset("EF_LogFileBrowser","Value",LogFileBrowser)
|
---|
2192 | return
|
---|
2193 |
|
---|
2194 | /*:VRX PB_SearchMessengerDir_Click
|
---|
2195 | */
|
---|
2196 | PB_SearchMessengerDir_Click:
|
---|
2197 | MessengerDir = strip(VRParseFileName( VRFileDialog( VRWindow(), "Specify the email directory", "Open", EMailSearchDirMask, , , ), "DP" ),'T','\') ||'\'
|
---|
2198 | If MessengerDir = '\' then MessengerDir = VRGet("EF_MessengerDir","Value")
|
---|
2199 | else ok = VRSet("EF_MessengerDir","Value",MessengerDir)
|
---|
2200 | return
|
---|
2201 |
|
---|
2202 | /*:VRX PB_ThankYou_Click
|
---|
2203 | */
|
---|
2204 | PB_ThankYou_Click:
|
---|
2205 | Lines.1 = "Many thanks go to Team Odin and their efforts, especially to Sander van Leeuwen for his (almost) endless patience and to my testers Sven Stroh and Peter Weilbacher."
|
---|
2206 | Lines.2 = " "
|
---|
2207 | Lines.3 = "This program is free, but copyrighted software. The license for Odin is also valid for this program. Current source is freely available by request to the author."
|
---|
2208 | Lines.0 = 3
|
---|
2209 | Buttons.1 = "OK"
|
---|
2210 | Buttons.0 = 1
|
---|
2211 | id = VRMessageStem( VRWindow(), "Lines.", "Thank you", "Information", "Buttons.", buttons.1, buttons.1 )
|
---|
2212 | return
|
---|
2213 |
|
---|
2214 | /*:VRX PB_UnInstall1_Click
|
---|
2215 | */
|
---|
2216 | PB_UnInstall1_Click:
|
---|
2217 | call _UnInstallWPSObjects
|
---|
2218 | return
|
---|
2219 | /*:VRX PB_UnInstall_Click
|
---|
2220 | */
|
---|
2221 | PB_UnInstall_Click:
|
---|
2222 | call _UnInstallWPSObjects
|
---|
2223 | return
|
---|
2224 | /*:VRX Progress_Close
|
---|
2225 | */
|
---|
2226 | Progress_Close:
|
---|
2227 | call Progress_Fini
|
---|
2228 | return
|
---|
2229 |
|
---|
2230 | /*:VRX Progress_Create
|
---|
2231 | */
|
---|
2232 | Progress_Create:
|
---|
2233 | call Progress_Init
|
---|
2234 | ok = VRSet("Progress","Top",5000)
|
---|
2235 | return
|
---|
2236 |
|
---|
2237 | /*:VRX Progress_Fini
|
---|
2238 | */
|
---|
2239 | Progress_Fini:
|
---|
2240 | window = VRInfo( "Window" )
|
---|
2241 | call VRDestroy window
|
---|
2242 | drop window
|
---|
2243 | return
|
---|
2244 | /*:VRX Progress_Init
|
---|
2245 | */
|
---|
2246 | Progress_Init:
|
---|
2247 | window = VRInfo( "Object" )
|
---|
2248 | if( \VRIsChildOf( window, "Notebook" ) ) then do
|
---|
2249 | call VRMethod window, "CenterWindow"
|
---|
2250 | call VRSet window, "Visible", 0
|
---|
2251 | call VRMethod window, "Activate"
|
---|
2252 | end
|
---|
2253 | drop window
|
---|
2254 | return
|
---|
2255 |
|
---|
2256 | /*:VRX Quit
|
---|
2257 | */
|
---|
2258 | Quit:
|
---|
2259 | ok = SysFileDelete(ExceptFileName)
|
---|
2260 | window = VRWindow()
|
---|
2261 | call VRSet window, "Shutdown", 1
|
---|
2262 | drop window
|
---|
2263 | if DestroyWPS then ok = SysDestroyObject("<Report_Odin_Bugs>")
|
---|
2264 | return
|
---|
2265 |
|
---|
2266 | /*:VRX RB_Messenger461_Click
|
---|
2267 | */
|
---|
2268 | RB_Messenger461_Click:
|
---|
2269 | if VRGet("RB_Messenger461","Set") then do
|
---|
2270 | ok = VRset("DDCB_Messenger","Value", 'NETSCAPE.EXE')
|
---|
2271 | ok = VRset("EF_MessengerDir","Value", '')
|
---|
2272 | Messenger = 'NETSCAPE.EXE'
|
---|
2273 | EMailSearchDirMask = Messenger
|
---|
2274 | CompleteMessenger = SysSearchPath("PATH",Messenger)
|
---|
2275 | if CompleteMessenger = '' then do
|
---|
2276 | Msg.Type = "W"
|
---|
2277 | Msg.Text = Messenger' could not be found in your PATH. Please, specify the EMail client directory!'
|
---|
2278 | call _ShowMsg
|
---|
2279 | ok = VRset("DT_MessengerDir","Caption", "Netscape directory")
|
---|
2280 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
2281 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
2282 | call PB_SearchMessengerDir_Click
|
---|
2283 | end
|
---|
2284 | else do
|
---|
2285 | ok = VRset("PB_SearchMessengerDir","Visible", 0)
|
---|
2286 | ok = VRset("EF_MessengerDir","Visible", 0)
|
---|
2287 | ok = VRset("DT_MessengerDir","Visible", 0)
|
---|
2288 | end
|
---|
2289 | ok = VRset("DDCB_Messenger","Visible", 0)
|
---|
2290 | ok = VRset("DT_Messenger","Visible", 0)
|
---|
2291 | ok = VRset("EF_Account", "Visible", 0)
|
---|
2292 | ok = VRset("DT_Account", "Visible", 0)
|
---|
2293 | end
|
---|
2294 | return
|
---|
2295 |
|
---|
2296 | /*:VRX RB_MR2ICE_Click
|
---|
2297 | */
|
---|
2298 | RB_MR2ICE_Click:
|
---|
2299 | if VRGet("RB_MR2ICE","Set") then do
|
---|
2300 | ok = VRset("DDCB_Messenger","Value", 'MR2I.EXE')
|
---|
2301 | ok = VRset("EF_MessengerDir","Value", '')
|
---|
2302 | Messenger = 'MR2I.EXE'
|
---|
2303 | EMailSearchDirMask = Messenger
|
---|
2304 | CompleteMessenger = SysSearchPath("PATH",Messenger)
|
---|
2305 | if CompleteMessenger = '' then do
|
---|
2306 | Msg.Type = "W"
|
---|
2307 | Msg.Text = Messenger' could not be found in your PATH. Please, specify the EMail client directory!'
|
---|
2308 | call _ShowMsg
|
---|
2309 | ok = VRset("DT_MessengerDir","Caption", "MR/2 ICE directory")
|
---|
2310 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
2311 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
2312 | call PB_SearchMessengerDir_Click
|
---|
2313 | end
|
---|
2314 | else do
|
---|
2315 | ok = VRset("PB_SearchMessengerDir","Visible", 0)
|
---|
2316 | ok = VRset("EF_MessengerDir","Visible", 0)
|
---|
2317 | ok = VRset("DT_MessengerDir","Visible", 0)
|
---|
2318 | end
|
---|
2319 | ok = VRset("DDCB_Messenger","Visible", 0)
|
---|
2320 | ok = VRset("DT_Messenger","Visible", 0)
|
---|
2321 | ok = VRset("EF_Account", "Visible", 0)
|
---|
2322 | ok = VRset("DT_Account", "Visible", 0)
|
---|
2323 | end
|
---|
2324 | return
|
---|
2325 | /*:VRX RB_OtherEmailClient_Click
|
---|
2326 | */
|
---|
2327 | RB_OtherEmailClient_Click:
|
---|
2328 | if VRget("RB_OtherEmailClient","set") then do
|
---|
2329 | EMailSearchDirMask = '*.EXE'
|
---|
2330 | ok = VRset("DDCB_Messenger","Visible", 1)
|
---|
2331 | ok = VRset("PB_SearchMessengerDir","Visible", 1)
|
---|
2332 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
2333 | ok = VRset("EF_Account","Visible", 0)
|
---|
2334 | ok = VRset("DT_Messenger","Visible", 1)
|
---|
2335 | ok = VRset("DT_MessengerDir","Caption", "EMail client directory")
|
---|
2336 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
2337 | ok = VRset("DT_Account","Visible", 0)
|
---|
2338 | end
|
---|
2339 | return
|
---|
2340 | /*:VRX RB_PMMail_Click
|
---|
2341 | */
|
---|
2342 | RB_PMMail_Click:
|
---|
2343 | if VRGet("RB_PMMail","set") then do
|
---|
2344 | ok = VRset("DDCB_Messenger","Value", 'PMMSEND.EXE')
|
---|
2345 | Messenger = 'PMMSEND.EXE'
|
---|
2346 | EMailSearchDirMask = Messenger
|
---|
2347 | CompleteMessenger = SysSearchPath("PATH",Messenger)
|
---|
2348 | if CompleteMessenger = '' then do
|
---|
2349 | Msg.Type = "W"
|
---|
2350 | Msg.Text = Messenger' could not be found in your PATH. Please, specify the EMail client directory manually!'
|
---|
2351 | call _ShowMsg
|
---|
2352 | call PB_SearchMessengerDir_Click
|
---|
2353 | end
|
---|
2354 | else do
|
---|
2355 | ok = VRset("EF_MessengerDir","Value", filespec("D",CompleteMessenger)||filespec("P",CompleteMessenger))
|
---|
2356 | end
|
---|
2357 | ok = VRset("DDCB_Messenger","Visible", 0)
|
---|
2358 | ok = VRset("DT_Messenger","Visible", 0)
|
---|
2359 | ok = VRset("DT_MessengerDir","Caption", "PMMail directory")
|
---|
2360 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
2361 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
2362 | ok = VRset("EF_Account","Visible", 1)
|
---|
2363 | ok = VRSet("DT_Account","Caption","Account name")
|
---|
2364 | ok = VRset("DT_Account","Visible", 1)
|
---|
2365 | end
|
---|
2366 | return
|
---|
2367 |
|
---|
2368 | /*:VRX RB_Polarbar_Click
|
---|
2369 | */
|
---|
2370 | RB_Polarbar_Click:
|
---|
2371 | if VRGet("RB_Polarbar","set") then do
|
---|
2372 | ok = VRset("DDCB_Messenger","Value", 'jre.exe -cp polarbar.zip org.polarbar.mailer')
|
---|
2373 | Messenger = 'jre.exe -cp polarbar.zip org.polarbar.mailer'
|
---|
2374 | EMailSearchDirMask = 'polarbar.zip'
|
---|
2375 | Msg.Type = "W"
|
---|
2376 | Msg.Text = 'Please, specify the Polarbar directory manually!'
|
---|
2377 | call _ShowMsg
|
---|
2378 | ok = VRset("DDCB_Messenger","Visible", 0)
|
---|
2379 | ok = VRset("DT_Messenger","Visible", 0)
|
---|
2380 | ok = VRset("PB_SearchMessengerDir","Visible", 1)
|
---|
2381 | ok = VRset("EF_MessengerDir","Visible", 1)
|
---|
2382 | ok = VRset("DT_MessengerDir","Caption", "Polarbar directory")
|
---|
2383 | ok = VRset("DT_MessengerDir","Visible", 1)
|
---|
2384 | ok = VRset("EF_Account","Visible", 1)
|
---|
2385 | ok = VRset("DT_Account","Caption", "Outbox directory")
|
---|
2386 | ok = VRset("DT_Account","Visible", 1)
|
---|
2387 | call PB_SearchMessengerDir_Click
|
---|
2388 | end
|
---|
2389 | return
|
---|
2390 | /*:VRX SPIN_BufferSize_Change
|
---|
2391 | */
|
---|
2392 | SPIN_BufferSize_Change:
|
---|
2393 | BufferSize = VRget("SPIN_BufferSize","value")
|
---|
2394 | return
|
---|
2395 |
|
---|
2396 | /*:VRX TM_CheckValid_Trigger
|
---|
2397 | */
|
---|
2398 | TM_CheckValid_Trigger:
|
---|
2399 | ok = VRSet("PB_CreateReport","Enabled",\_CheckInvalidReport())
|
---|
2400 | return
|
---|
2401 |
|
---|