source: trunk/tools/OdinBug/OdinBug.VRX@ 9105

Last change on this file since 9105 was 9104, checked in by sandervl, 23 years ago

new odinbug version

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