/*:VRX Main */ /* Main */ ok = VRRedirectStdIO('OFF') Main: /* Process the arguments. Get the parent window. */ parse source . calledAs . parent = "" argCount = arg() argOff = 0 if( calledAs \= "COMMAND" )then do if argCount >= 1 then do parent = arg(1) argCount = argCount - 1 argOff = 1 end end; else do call VROptions 'ImplicitNames' call VROptions 'NoEchoQuit' end InitArgs.0 = argCount if( argCount > 0 )then do i = 1 to argCount InitArgs.i = arg( i + argOff ) end drop calledAs argCount argOff /* Load the windows */ call VRInit parse source . . spec _VREPrimaryWindowPath = , VRParseFileName( spec, "dpn" ) || ".VRW" _VREPrimaryWindow = , VRLoad( parent, _VREPrimaryWindowPath ) drop parent spec if( _VREPrimaryWindow == "" )then do call VRMessage "", "Cannot load window:" VRError(), , "Error!" _VREReturnValue = 32000 signal _VRELeaveMain end /* Process events */ call Init signal on halt do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) ) _VREEvent = VREvent() interpret _VREEvent end _VREHalt: _VREReturnValue = Fini() call VRDestroy _VREPrimaryWindow _VRELeaveMain: call VRFini exit _VREReturnValue VRLoadSecondary: __vrlsWait = abbrev( 'WAIT', translate(arg(2)), 1 ) if __vrlsWait then do call VRFlush end __vrlsHWnd = VRLoad( VRWindow(), VRWindowPath(), arg(1) ) if __vrlsHWnd = '' then signal __vrlsDone if __vrlsWait \= 1 then signal __vrlsDone call VRSet __vrlsHWnd, 'WindowMode', 'Modal' __vrlsTmp = __vrlsWindows.0 if( DataType(__vrlsTmp) \= 'NUM' ) then do __vrlsTmp = 1 end else do __vrlsTmp = __vrlsTmp + 1 end __vrlsWindows.__vrlsTmp = VRWindow( __vrlsHWnd ) __vrlsWindows.0 = __vrlsTmp do while( VRIsValidObject( VRWindow() ) = 1 ) __vrlsEvent = VREvent() interpret __vrlsEvent end __vrlsTmp = __vrlsWindows.0 __vrlsWindows.0 = __vrlsTmp - 1 call VRWindow __vrlsWindows.__vrlsTmp __vrlsHWnd = '' __vrlsDone: return __vrlsHWnd /*:VRX _AnalyseConfigSys */ _AnalyseConfigSys: /* From CONFIG.SYS we get the information, if XF86SUP.SYS is installed WIN32K.SYS is installed (currently) which display driver is installed */ FoundWin32KSysNow = 0 ConfigSys = SysBootDrive()'\CONFIG.SYS' do while lines(ConfigSys) > 0 ConfigLine = translate(strip(Linein(ConfigSys))) if left(ConfigLine,3) <> 'REM' then do select when Pos('XF86SUP.SYS', ConfigLine) > 0 then do Foundxf86supsys = 1 xf86supsysLine = substr(ConfigLine,pos(':',ConfigLine)-1) xf86supsysLine = left(xf86supsysLine, pos('SYS', xf86supsysLine) + 3) end when Pos('WIN32K.SYS', ConfigLine) > 0 then do Win32Kparm = substr(ConfigLine,pos("WIN32K.SYS", ConfigLine) + 11) FoundWin32KSysNow = 1 end when Pos('SDDGRADD', ConfigLine) > 0 then do Driver = "Scitech Display Doctor" FoundScitech = 1 end when Pos('SDDHELP.SYS',ConfigLine) > 0 then SDDHelpSys=strip(substr(ConfigLine,8)) when Pos('MGAX64', ConfigLine) > 0 then Driver = "Matrox Driver" when Pos('GENGRADD', ConfigLine) > 0 then Driver = "Generic GRADD" when Pos('ATIGRADD', ConfigLine) > 0 then Driver = "ATI GRADD" when Pos('CHPGRADD', ConfigLine) > 0 then Driver = "CHP GRADD" when Pos('DYNGRADD', ConfigLine) > 0 then Driver = "DYN GRADD" when Pos('G_VGRADD', ConfigLine) > 0 then Driver = "G_V GRADD" when Pos('MGAGRADD', ConfigLine) > 0 then Driver = "Matrox GRADD" when Pos('NMGRADD', ConfigLine) > 0 then Driver = "NeoMagic GRADD" when Pos('S3GRADD', ConfigLine) > 0 then Driver = "S3 GRADD" when Pos('TRIGRADD', ConfigLine) > 0 then Driver = "Trident GRADD" when Pos('VIRGEGRADD', ConfigLine) > 0 then Driver = "S3 ViRGE GRADD" when Pos('VGAGRADD', ConfigLine) > 0 then Driver = "VGA GRADD" /* add other display drivers here */ otherwise nop end end end call lineout(ConfigSys) return /*:VRX _AnalyseKernel32DLL */ _AnalyseKernel32DLL: /* we get build level information from Kernel32.DLL by spawning BLDLEVEL.EXE, redirecting the output and analysing it */ /* return if we do not have a valid directory */ if OdinSysDir = '' then return /* get Kernel32 version */ BldInfo = 'BldInfo.TXT' 'BLDLevel 'OdinSysDir'Kernel32.DLL >'BldInfo do until lines(BldInfo) = 0 BldLine = translate(linein(BldInfo)) if pos('FILE VERSION',BldLine) > 0 then do Kernel32Ver = word(BldLine,3) end if pos('DATE/TIME',BldLine) > 0 then do Kernel32Date = word(BldLine,4)||right('0'||_xmonth(word(BldLine,3)),2)||right('0'||word(BldLine,2),2) end end call lineout BldInfo ok = SysFileDelete(BldInfo) return /*:VRX _AnalyseOdin32_xLog */ _AnalyseOdin32_xLog: /* We get the information about WIN32K.SYS installed (when bug occured) Odin directory Odin\System directory Commandline of Win32 program location of Odin.INI we have a visible progressbar, this analysis is usually done after reading 50 lines or so of the logfile */ If LogFileName = '' then return /* clear variables */ OdinWinDir = '' OdinSysDir = '' ExeFile = '' FoundWinDir = 0 FoundSysDir = 0 FoundExe = 0 FoundOdinIni = 0 ExceptFilename = filespec('D',LogFileName)||filespec('P',LogFileName)||'Except.$$$' LogFileSize = stream(LogfileName,'c','QUERY SIZE') ApproxLines = LogFileSize % 41 call _InitProgress LogLine = '' do J = 1 to 5 until FoundWin32KSysAtBugTime = 1 LogLine = linein(LogFileName) if pos('WIN32K - INSTALLED',translate(LogLine)) > 0 then do FoundWin32KSysAtBugTime = 1 Win32KLogLine = LogLine end end do until lines(LogFileName) = 0 LogLine = linein(LogFileName) select when pos('Windows dir:',LogLine) > 0 then do OdinWinDir = strip(Substr(LogLine,pos('Windows dir:',LogLine)+14))'\' FoundWinDir = 1 end when pos('System32 dir:',LogLine) > 0 then do OdinSysDir = strip(Substr(LogLine,pos('System32 dir:',LogLine)+14))'\' FoundSysDir = 1 end when pos('Cmd line:',LogLine) > 0 then do EXEFile = strip(Substr(LogLine,pos('Cmd line:',LogLine)+10)) FoundExe = 1 end when pos('GetCommandLineA:',LogLine) > 0 then do ExeFile = strip(Substr(LogLine,pos('GetCommandLineA:',LogLine)+16)) FoundExe = 1 end when pos('Odin ini loaded:',LogLine) > 0 then do OdinINI = strip(Substr(LogLine,pos('Odin ini loaded:',LogLine)+16)) FoundOdinIni = 1 end otherwise do I = I + 1 if I // 1000 = 0 then do call _CheckForEvent Progress = I * 100 % ApproxLines ok = VRSet("SL_Progress","Percentile",Progress) end end if FoundWinDir & FoundSysDir & FoundExe & FoundOdinIni then leave end end ok = VRSet("Progress","Visible", 0) call lineout(LogFileName) return /*:VRX _AnalyseOdinIni */ _AnalyseOdinIni: /* we get the INSTALLDATE information from Odin.INI */ /* old method to locate Odin.INI - obsolete, now we get Odin.Ini from the Logfile Odin_INI = value('ODIN_INI',,'OS2ENVIRONMENT') */ do until lines(OdinINI) = 0 OdinIniLine = translate(linein(OdinINI)) if pos('INSTALLDATE',OdinIniLine) > 0 then do OdinInstLine = strip(substr(OdinIniLine,pos('=',OdinIniLine)+1)) OdinInstDoW = word(OdinInstLine,1) OdinInstMonth = _xmonth(word(OdinInstLine,2)) OdinInstDay = right('0'||word(OdinInstLine,3),2) OdinInstTime = word(OdinInstLine,4) OdinInstYear = word(OdinInstLine,5) OdinInstDate = OdinInstDay'.'OdinInstMonth'.'OdinInstYear OdinInstDate2 = OdinInstYear||right('0'||OdinInstMonth,2)||right('0'||odinInstday,2) leave end end call lineout(OdinIni) LastOdinInst=OdinInstDate' at 'OdinInstTime', current version 'OdinInstVer ok = VRSet("EF_LastOdinInst","Value",LastOdinInst) if OdinInstDate2 < builddate & builddate <> '' then do 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!" Msg.Type = "Error" call _ShowMsg ok = VRSet("PB_CreateReport","Visible", 0) end return /*:VRX _AnalyseOdininst */ _AnalyseOdininst: /* we get build level information from OdinInst.EXE by spawning BLDLEVEL.EXE, redirecting the output and analysing it */ /* get OdinInst Version */ BldInfo = 'BldInfo.TXT' 'BLDLevel 'OdinSysDir'OdinInst.exe >'BldInfo do until lines(BldInfo) = 0 BldLine = translate(linein(BldInfo)) if pos('FILE VERSION',BldLine) > 0 then do OdinInstVer = word(BldLine,3) leave end end call lineout BldInfo ok = SysFileDelete(BldInfo) return /*:VRX _AnalyseScitechDD */ _AnalyseScitechDD: /* we know that we have have a Scitech Driver now lets determine which one. We analyse SDDHELP.SYS and GRAPHICS.LOG */ /* we get SDDHelpSys from Config.Sys now SDDHelpSys = SysBootDrive()'\OS2\SDDHELP.SYS' */ /* our new PREXX30 compliant SNAP detector */ isSNAP = 0 do until chars(SDDHelpSYS) = 0 C = charin(SDDHELPSYS) select when C = 'b' then do SddBuildNr = C||charin(SDDHELPSYS,,8) if translate(word(SDDBuildNr,1)) <> 'BUILD' then iterate else leave end when C = 'S' then do SciTechType = C||charin(SDDHELPSYS,,3) if translate(SciTechType) <> 'SNAP' then iterate else isSNAP = 1 end when C = 'D' then do SciTechType = C||charin(SDDHELPSYS,,5) if translate(ScitechType) <> 'DOCTOR' then iterate else isSNAP = 0 end otherwise iterate end end ok = stream(SDDHelpsys,'c','close') NUCLEUS_PATH = value('NUCLEUS_PATH',,'OS2ENVIRONMENT') if Nucleus_Path = '' then Nucleus_Path = SysBootDrive()'\OS2\DRIVERS\NUCLEUS\CONFIG' GraphicsLog = Nucleus_Path'\GRAPHICS.LOG' License = linein(GraphicsLog) select when (word(License,1)= 'Valid') & (word(License,2) = 'IHV') & (\IsSNAP) then Driver = 'Scitech Display Doctor/SE' when (word(License,1)= 'Valid') & (word(License,2) = 'IHV') & (IsSNAP) then Driver = 'Scitech SNAP/OEM' when (word(License,1)= 'Registered') & (word(License,2) = 'end') & (\IsSNAP) then Driver = 'Scitech Display Doctor/Pro' when (word(License,1)= 'Registered') & (word(License,2) = 'end') & (IsSNAP) then Driver = 'Scitech SNAP' otherwise if IsSNAP then Driver = 'Scitech SNAP/Demo' else Driver = 'Scitech Display Doctor/Demo' end LogLine = '' do until pos('Chipset...',LogLine) > 0 | lines(GraphicsLog) = 0 LogLine = linein(GraphicsLog) end ChipSet = '' if lines(graphicslog) = 0 then ChipSet = "Detection failed!" else do I = 2 to words(logline) ChipSet = Chipset||word(Logline,I)||' ' end ok = stream(GraphicsLog,'c','CLOSE') return /* old SDD LogLine = '' IsSNAP = 0 LC = 0 do until lines(SDDHelpSys) = 0 LogLine = translate(linein(SDDHelpSys),' ', d2c(0)) LC = LC + 1 if pos('build',logline) > 0 then do SddBuildNr = substr(LogLine,pos('build',logline),10) IsSNAP = sign(Pos('SNAP',LogLine)) leave end end ok = stream(SDDHelpSys,'c','CLOSE') do until chars(SDDHELPSYS)=0 */ /*:VRX _AnalyseSyslevelFPK */ _AnalyseSyslevelFPK: sys_os2 = SysSearchPath('path', 'syslevel.FPK') if sys_os2 = '' then do fpk_level = '(none)' return end sys_info = translate(Charin(sys_os2, 1, 150),' ','00'x) Parse Var sys_info . 45 fpk_level 141 os_comp 150 fpk_level = left(fpk_level,7) ok = stream(sys_os2,'c','CLOSE') return /*:VRX _AnalyseSysLevelOS2 */ _AnalyseSysLevelOS2: sys_os2 = SysSearchPath('path', 'syslevel.os2') sys_info = Charin(sys_os2, 1, 150) Parse Var sys_info . 53 os_type 61 os_name 141 os_comp 150 os_name = Strip(os_name, 't', '00'x) os_type = Strip(os_type, 't', '_') parse var os_type . 4 major 6 minor os_ver = SysOS2Ver() if os_ver = 2.30 then OS2Type = "OS/2 Warp 3.0x (not supported)" select when os_comp = '5639A6100' then do if os_ver = 2.40 then OS2Type = "OS/2 Warp 4.00" if os_ver = 2.45 then OS2Type = "OS/2 Warp 4.50" end when os_comp = '5639A6101' & minor = '01' then OS2Type = "OS/2 Warp 4.51 (MCP1)" when os_comp = '5639A6101' & minor = '02' then OS2Type = "OS/2 Warp 4.52 (MCP2)" when os_comp = '5639A6150' & minor = '00' then OS2Type = "OS/2 WSeB 4.50 uni" when os_comp = '5639A6150' & minor = '01' then OS2Type = "OS/2 WSeB 4.51 uni (ACP1)" when os_comp = '5639A6150' & minor = '02' then OS2Type = "OS/2 WSeB 4.52 uni (ACP2)" when os_comp = '5639A5550' & minor = '00' then OS2Type = "OS/2 WSeB 4.50 smp" when os_comp = '5639A5550' & minor = '01' then OS2Type = "OS/2 WSeB 4.51 smp (ACP1)" when os_comp = '5639A5550' & minor = '02' then OS2Type = "OS/2 WSeB 4.52 smp (ACP2)" otherwise do end end ok = stream(sys_os2,'c','CLOSE') /* detect eComStation - a very simplicistic approach */ ecs = 1 ok = SysFileTree(SysBootDrive()'\WiseMachine.fit',ecs.,'FO') ecs = ecs * ecs.0 ok = SysFileTree(SysBootDrive()'\eCS',ecs.,'DO') ecs = ecs * ecs.0 ok = SysFileTree(SysBootDrive()'\TVoice',ecs.,'DO') ecs = ecs * ecs.0 if ecs then OS2Type = 'eComStation (Base: 'substr(OS2Type,10)')' /* get Kernel Version */ BldInfo = 'BldInfo.TXT' 'BLDLevel 'SysBootDrive()'\os2krnl >'BldInfo do until lines(BldInfo) = 0 BldLine = linein(BldInfo) if pos('Signature',BldLine) > 0 then do KrnlBuildVer = translate(word(BldLine,2),' ','#@:') KrnlBuildVer = word(KrnlBuildVer,2)||word(KrnlBuildVer,3) leave end end call lineout BldInfo ok = SysFileDelete(BldInfo) return /*:VRX _AnalyseWarpINdatabase */ _AnalyseWarpINdatabase: FoundWarpIN = 1 WarpINDir = strip(VRGetIni( "WarpIN", "Path", "User" ),,d2c(0)) if WarpINDir = '' then do Msg.Text = "WarpIN directory not found!" Msg.Type = "Warning" call _ShowMsg FoundWarpIN = 0 return end BDL = left(SysBootDrive(),1) ok = SysFileTree(WarpInDir||'\DATBAS_'BDL'.INI',WarpINDB., 'FO') select when WarpINDB.0 = 0 then do Msg.Text = "No WarpIN database file found!" Msg.Type = "Warning" call _ShowMsg FoundWarpIN = 0 end when WarpINDB.0 = 1 then do WarpINDB = WarpINDB.1 end /* when WarpINDB.0 > 1 then do Msg.Text = "You appear to have more than one WarpIN database! Choosing biggest!" Msg.Type = "Warning" call _ShowMsg MaxSize = 0 do I = 1 to WarpINDB.0 CurrSize = query(WarpinDB.I,'c','query size') if CurrSize >= MaxSize then do WarpINDB = WarpINDB.I MaxSize = CurrSize end end end */ otherwise do msg.Text = 'Something weird has happened! You should not see this message!' msg.Type = "Error" call _ShowMsg FoundWarpIN = 0 end end /* WarpINDB = WarpInDir||'\DATBAS_E.INI' /* '\DATBAS_D.INI' */ */ if FoundWarpIN then do ok = SysIni(WarpInDB,'All:',"Apps") if apps.0 = 0 then do Msg.Text = "WarpIN database "WarpINDB" reported no applications!" Msg.Type = "Warning" call _ShowMsg FoundWarpIN = 0 return end ok = VRset("EF_LastWarpIN","HintText","Last time Odin was installed using WarpIN due to "WarpINDB) OdinCoreDateTime = '' OdinSYsDateTime = '' do I = 1 to apps.0 select when pos('Odin System',apps.I) > 0 then do OdinSysDateTime = c2x(strip(VRGetIni( apps.I, "InstallDateTime", WarpINDB ),,d2c(0))) OdinSysDir = strip(VRGetIni( apps.I, "TargetPath", WarpINDB ),,d2c(0))||'\' OdinSysVer = apps.I OdinINI = OdinSysDir||'Odin.INI' end when pos('Odin Core',apps.I) > 0 then do OdinCoreDateTime = c2x(strip(VRGetIni( apps.I, "InstallDateTime", WarpINDB ),,d2c(0))) OdinWinDir = strip(VRGetIni( apps.I, "TargetPath", WarpINDB ),,d2c(0))||'\' OdinCoreVer = apps.I end otherwise nop end end if OdinCoreDateTime = '' | OdinSysDateTime = '' then do Msg.Text = 'Could not find last WarpIN install info!' Msg.Type = "Warning" call _ShowMsg LastWarpIN = 'Maybe never!' end else do OdinCoretime = _xtime(substr(OdinCoreDateTime,1,6)) OdinSysTime = _xtime(substr(OdinSYsDateTime,1,6)) OdinCoreDate = _xdate(substr(OdinCoreDateTime,9,8)) OdinSysDate = _xdate(substr(OdinSYsDateTime,9,8)) OdinCoreVer = translate(substr(OdinCoreVer,pos('Core Files',OdinCoreVer)+11),'.','\') OdinSysVer = translate(substr(OdinSysVer,pos('System Files',OdinSysVer)+13),'.','\') LastWarpIN = OdinSysDate' at 'OdinSysTime', it was version 'OdinSysVer end end return /*:VRX _AnalyseXF86SupSys */ _AnalyseXF86SupSys: /* we get build level information from XF86Sup.SYS by spawning BLDLEVEL.EXE, redirecting the output and analysing it */ /* get XF86Sup.Sys Version */ BldInfo = 'BldInfo.TXT' 'BLDLevel 'xf86supsysLine' >'BldInfo do until lines(BldInfo) = 0 BldLine = translate(linein(BldInfo)) if pos('FILE VERSION',BldLine) > 0 then do XF86supVersion = word(BldLine,3) leave end end call lineout BldInfo ok = SysFileDelete(BldInfo) return /*:VRX _CheckForEvent */ _CheckForEvent: /* check and process event queue */ EventString = '' do until EventString = 'nop' EventString = VREvent('N') if EventString <> 'nop' then do interpret EventString end end return /*:VRX _CheckForExpiredBuild */ _CheckForExpiredBuild: if UsingPrivateBuilds then return 1 if BuildFile = '' then return 0 AllowReport = 0 buildYear = substr(BuildFile,11,4) buildmonth = substr(BuildFile,15,2) buildday = substr(BuildFile,17,2) builddate = substr(BuildFile,11,8) todayYear = left(date('S'),4) todayMonth = substr(date('S'),5,2) todayDay = right(date('S'),2) if datatype(buildyear) <> 'NUM' |datatype(buildmonth) <> 'NUM' |datatype(buildday) <> 'NUM' then do Msg.Text = "Invalid buildfilename! - Please enter a valid buildfilename!" Msg.Type = "Warning" call _ShowMsg return 0 end datenumber = BuildYear*365+BuildMonth*30+BuildDay todaynumber = TodayYear*365+TodayMonth*30+TodayDay select when todaynumber - datenumber > TooOld then do Msg.Text = "You have to try a newer build before submitting this bug report! Your bug might have been fixed already !" Msg.Type = "Error" call _ShowMsg if OverRideTooOld then do AllowReport = 1 AgeOfBuild = todaynumber - datenumber TooOldMsg = 1 end end when todaynumber - datenumber > WarnOld then do Msg.Text = "Before submitting this bug report, please try a newer build! Your bug might have been fixed already!" Msg.Type = "Warning" call _ShowMsg AllowReport = 1 end otherwise AllowReport = 1 end return AllowReport /*:VRX _CheckInvalidReport */ _CheckInvalidReport: Invalidreport = 0 InvalidReport = InvalidReport + (VRGet("EF_Build","value") = "") InvalidReport = InvalidReport + (VRGet("DDCB_InstallType","value") = "") InvalidReport = InvalidReport + (VRGet("DDCB_LaunchType","value") = "") InvalidReport = InvalidReport + (VRGet("DDCB_OS2Version","value") = "") InvalidReport = InvalidReport + (VRGet("DDCB_FPK","value") = "") InvalidReport = InvalidReport + (VRGet("DDCB_DD","value") = "") InvalidReport = InvalidReport + (VRGet("EF_LogFile","value") = "") InvalidReport = InvalidReport + (VRGet("EF_EXEFile","value") = "") InvalidReport = InvalidReport + (VRGet("EF_Appname","value") = "") InvalidReport = InvalidReport + (VRGet("EF_OdinWinDir","value") = "") InvalidReport = InvalidReport + (VRGet("EF_OdinWinSysDir","value") = "") InvalidReport = InvalidReport + (VRGet("MLE_OwnWords","value") = "") InvalidReport = InvalidReport + (VRGet("EF_LastWarpIN","value") = "") InvalidReport = InvalidReport + (VRGet("EF_LastOdinInst","value") = "") if \ExceptionSearchDone then do ok = SysFileTree(ExceptFileName, ExceptDone., 'FO') if ExceptDone.0 = 0 then InvalidReport = 1 else do ExceptionSearchDone = 1 call _FillPageException ok = VRSet("EF_LogFile","Enabled", 1) ok = VRSet("PB_SearchLogFile","Enabled", 1) end end if AllowBugReport = 0 & OverRideTooOld = 0 then InvalidReport = 1 return sign(InvalidReport) /*:VRX _CommandLineParse */ _CommandLineParse: if TestAppDir <> CurDirectory then do ok = SysFileTree(TestAppDir'Odin32_?.LOG',TestAppDirLogFile.,'FO') ok = SysFileTree(CurDirectory'Odin32_?.LOG',CurDirectoryLogFile.,'FO') if CurDirectoryLogFile.0 > 0 & TestAppDirLogFile.0 > 0 then do Msg.Type = "W" Msg.Text = "Logfiles found in "CurDirectory" and "TestAppDir". Be sure to choose the right one!" call _ShowMsg end end if translate(VRGet("Application","Commandline")) = '/INSTALLONLY' then do call _InstallWPSObjects call Quit end else do if VRGet("Application","Commandline") <> '' then do ok = SysFileTree(strip(VRGet("Application","Commandline"),'B','"'),Odin32Log., 'FO') if Odin32Log.0 = 1 then do LogFilename = Odin32Log.1 TestAppDir = strip(VRParseFileName( Odin32Log.1, "DP" ),'T','\') || '\' end else do Msg.Text = 'Unrecognized parameter ("'||VRGet("Application","Commandline")||'") - ignored!' Msg.Type = "Warning" call _ShowMsg end end end return /*:VRX _CreateExceptionAndStackDump */ _CreateExceptionAndStackDump: call lineout RptFileName, 'Exception information and stack dump:' call lineout RptFileName, ' ' do until lines(ExceptFileName) = 0 call lineout RptFileName, linein(ExceptFileName) end ok = lineout(ExceptFileName) return /*:VRX _CreateObject */ _CreateObject: procedure Parse Arg Class, Title, Location, Setup, Collision /* Say 'Creating ['Title']' */ rc = SysCreateObject( Class, Title, Location, Setup, Collision ) If rc <> 1 Then do Msg.Text = ' > failed to create ['Title' | 'Class'] at location ['Location']' Msg.Type = 'Error' call _ShowMsg end return rc /*:VRX _CreateReport */ _CreateReport: RPTFileName = VRFileDialog( VRWindow(), "Save Odin Bug report to...", "Save", TestAppDir || "ODINBUG.RPT", , , ) if RPTFilename = '' then return 0 /* not created */ ok = SysFileTree(RPTFileName,Exists.,'FO') if Exists.0 = 1 then do Buttons.1 = "~Overwrite" Buttons.2 = "~Append" Buttons.0 = 2 id = VRMessage( VRWindow(), RPTFileName||" exists!", "Odin Bug Report Generator", "Query", "Buttons.", buttons.1, buttons.2 ) if id = 1 then do rc = SysFileDelete(RptFileName) if rc > 3 then do Msg.Type = "E" Msg.Text = "Could not open "RPTFileName" for writing! Aborting..." call _showMsg return 0 /* not created */ end end end if VRGet("RB_OtherEmailClient","set") then call lineout RptFileName, '' call lineout RptFileName, '--------------------- Begin of Odin Bug Report ----------------------' if TooOldMsg then call lineout RptFileName, ' for an expired build ('AgeOfBuild'days old)' call lineout RptFileName, ' ' call lineout RptFileName, 'Odin build information:' call lineout RptFileName, ' ' call lineout RptFileName, ' Current Odin build: 'VRGet("EF_Build","value")', version 'Kernel32Ver call lineout RptFileName, ' Installation method: 'VRGet("DDCB_InstallType","value") call charout RptFileName, ' Launching method: 'VRGet("DDCB_LaunchType","value") if FoundWin32KSysNow & FoundWin32KSysAtBugTime then do call lineout RptFileName, ', Win32K-parameters: 'VRGet("EF_Win32Kparm","Value") end else call lineout RptFileName, ' ' call lineout RptFileName, ' Last WarpIN install: 'VRGet("EF_LastWarpIN","Value") call lineout RptFileName, ' Last OdinInst install: 'VRGet("EF_LastOdinInst","Value") call lineout RptFileName, ' Odin "Windows" dir: 'VRget("EF_OdinWinDir","Value") call lineout RptFileName, ' Odin "System32" dir: 'VRget("EF_OdinWinSysDir","Value") call lineout RptFileName, ' Evaluated Odin.INI: 'VRGet("EF_OdinINI","Value") call lineout RptFileName, ' ' call lineout RptFileName, 'General system information:' call lineout RptFileName, ' ' call lineout RptFileName, ' OS/2 version: 'VRGet("DDCB_OS2Version","value") call lineout RptFileName, ' OS/2 reports version: 'VRGet("EF_Version","Value")', kernel revision: 'VRget("EF_KrnlBuildVer","Value") call lineout RptFileName, ' FixPack Level: 'VRGet("DDCB_FPK","value") call charout RptFileName, ' Is xf86sup.sys loaded? ' if Foundxf86supsys then call lineout RptFileName, 'Yes, version 'XF86SupVersion else call lineout RptFileName, 'No' call lineout RptFileName, ' Display driver: 'VRGet("DDCB_DD","value")' 'VRGet("DDCB_DDVer","Value")' ('LC')' call lineout RptFileName, ' Video Chipset: 'VRGet("DDCB_chipset","Value") call lineout RptFileName, ' ' call lineout RptFileName, 'Win32 program information:' call lineout RptFileName, ' ' call lineout RptFileName, ' Odin logfile: 'VRget("EF_LogFile","Value") call lineout RptFileName, ' Windows executable: 'VRget("EF_EXEFile","Value") call lineout RptFileName, ' Application name: 'VRget("EF_AppName","Value") call lineout RptFileName, ' Application version: 'VRget("EF_AppVersion","Value") call lineout RptFileName, ' Available from: 'VRget("DDCB_URL","Value") call lineout RptFileName, ' ' call lineout RptFileName, 'Verbal problem description:' call lineout RptFileName, ' ' call lineout RptFileName, VRGet("MLE_OwnWords","Value") if OhNooo then do call lineout RptFileName, 'An "Oh, nooo!"-message box was displayed. ' end call lineout RptFileName, ' ' if AddException then call _CreateExceptionAndStackDump else call lineout RptFileName, 'No exception information and stack dump added by user request!' call lineout RptFileName, ' ' call lineout RptFileName, 'ODIN.INI information:' call lineout RptFileName, ' ' do until lines(OdinIni) = 0 call lineout RptFileName, linein(OdinIni) end call lineout OdinInI call lineout RptFileName, '---------------------- End of Odin Bug Report -----------------------' call lineout RptFileName, 'Created by OdinBug version 'word(VRGet("OdinBugReport","HintText"),2)' on 'date()' at 'time() call lineout RptFileName return 1 /* success */ /*:VRX _EMailGeneric */ _EMailGeneric: if MessengerDir <> '' then do olddir = directory() call directory strip(MessengerDir,'T','\') end 'start 'messenger' "mailto:'EMail'?subject=Odin Bug Report: 'VRget("EF_AppName","Value")' 'VRget("EF_AppVersion","Value")'"' /* &body= */ if MessengerDir <> '' then ok = directory(oldDir) CompleteReport = '' do until lines(RPTFileName) = 0 CompleteReport = CompleteReport||CRLF||linein(RPTFileName) end call lineout RPTFileName ok = VRMethod("Application","PutClipBoard",CompleteReport) Msg.Text = "Report was copied to the clipboard! You may paste it into the body of your email now!" Msg.Type = "Information" call _ShowMsg return /*:VRX _EMailMR2ICE */ _EMailMR2ICE: TempFile = strip(value('TEMP',,'OS2ENVIRONMENT'),'T','\')||'\OdinBug.$$$' ok = SysFileDelete(TempFile) ok = lineout(TempFile, 'To: 'EMail) ok = lineout(TempFile, 'Subject: Odin Bug Report: 'VRget("EF_AppName","Value")' 'VRget("EF_AppVersion","Value")) ok = lineout(TempFile, 'Content-Type: text/plain; charset=us-ascii') ok = lineout(TempFile, 'Content-Transfer-Encoding: 7bit') ok = charout(TempFile, CRLF) do until lines(RPTFileName) = 0 ok = lineout(TempFile, linein(RPTFileName)) end ok = Lineout(TempFile) ok = lineout(RPTFileName) if MessengerDir <> '' then do olddir = directory() call directory strip(MessengerDir,'T','\') end /* ok = VRRedirectStdio('ON') say 'start 'MESSENGER' /Q 'TempFile */ 'start 'MESSENGER' /O'TempFile if MessengerDir <> '' then ok = directory(oldDir) return /*:VRX _EMailNetscape */ _EMailNetscape: TempFile = strip(value('TEMP',,'OS2ENVIRONMENT'),'T','\')||'\OdinBug.$$$' ok = SysFileDelete(TempFile) ok = lineout(TempFile, 'To: 'EMail) ok = lineout(TempFile, 'Subject: Odin Bug Report: 'VRget("EF_AppName","Value")' 'VRget("EF_AppVersion","Value")) ok = lineout(TempFile, 'Content-Type: text/plain; charset=us-ascii') ok = lineout(TempFile, 'Content-Transfer-Encoding: 7bit') ok = charout(TempFile, CRLF) do until lines(RPTFileName) = 0 ok = lineout(TempFile, linein(RPTFileName)) end ok = Lineout(TempFile) ok = lineout(RPTFileName) if MessengerDir <> '' then do olddir = directory() call directory strip(MessengerDir,'T','\') end 'start 'messenger' -compose 'TempFile if MessengerDir <> '' then ok = directory(oldDir) return /*:VRX _EMailPMMSend */ _EMailPMMSend: if MessengerDir <> '' then do olddir = directory() call directory strip(MessengerDir,'T','\') end ok = SysfileTree(MessengerDir'TEMP',TempDir., 'DO') if TempDir.0 = 0 then call _LaunchPMMail ok = SysfileTree(MessengerDir'TEMP',TempDir., 'DO') if TempDir.0 = 0 then do Msg.Type = 'Warning' Msg.Text = 'Failed to start PMMail! Please, check your email settings!' call _ShowMsg end '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")'"' if MessengerDir <> '' then ok = directory(oldDir) return /* */ /* PMMSend Syntax: USAGE: PMMSend