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