Trac is being migrated to new services! Issues can be found in our new
YouTrack instance and WIKI pages can be found on our
website.
- Timestamp:
-
Mar 13, 2010, 9:51:00 PM (14 years ago)
- Author:
-
datallah
- Comment:
-
Change the "Preemptive Debug Logging" instructions to something that works on Windows 7. I'm sure that there is something cleaner, but I've wasted enough time on this already.
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v22
|
v23
|
|
60 | 60 | Pidgin just hiccuped, you want to file a ticket but you wish you had saved the debug log don't you? Here is a script to have it made for you all the time. |
61 | 61 | |
62 | | Copy this to a *.bat file in your pidgin install directory and use a shortcut to it instead of pidgin.exe when starting pidgin. To make it even less intrusive you can change the icon to the pidgin icon and set the command window to open minimized in the properties of the shortcut (right click -> properties ) |
| 62 | Create a `pidgin.bat` file somewhere on your system (your Documents folder is fine) (If you have Pidgin installed to somewhere other than the default location, update `PIDGIN_INST_DIR` to the appropriate value): |
63 | 63 | {{{ |
64 | | @ECHO off |
65 | | REM stay quiet |
| 64 | SET ProgramFiles(x86) |
| 65 | IF ERRORLEVEL 0 SET PIDGIN_INST_DIR=%ProgramFiles(x86)%\Pidgin |
| 66 | IF NOT ERRORLEVEL 0 SET PIDGIN_INST_DIR=%ProgramFiles%\Pidgin |
| 67 | |
| 68 | REM SET PIDGIN_INST_DIR=Z:\YourCustomPidginInstallationDirectory |
| 69 | |
| 70 | SET LOCALAPPDATA |
| 71 | IF ERRORLEVEL 0 SET DEBUG_DIR=%LOCALAPPDATA%\.purple\debuglogs |
| 72 | IF NOT ERRORLEVEL 0 SET DEBUG_DIR=%APPDATA%\.purple\debuglogs |
66 | 73 | |
67 | 74 | REM make sure the debug directory exists |
68 | | IF NOT EXIST debug mkdir debug |
| 75 | IF NOT EXIST "%DEBUG_DIR%" mkdir "%DEBUG_DIR%" |
69 | 76 | |
70 | 77 | REM get the date and time |
71 | 78 | SET dt=%date%_%time% |
72 | 79 | |
73 | | REM save the nice formatting |
74 | | SET odt=%date% %time% |
75 | | |
76 | | REM replace the / with - |
| 80 | REM replace the / with - (may or may not exist depending on your date format) |
77 | 81 | SET dt=%dt:/=-% |
78 | 82 | |
79 | | REM replace the ' ' with 0 |
| 83 | REM replace the ' ' with 0 (may or may not exist depending on your date format) |
80 | 84 | SET dt=%dt: =0% |
81 | 85 | |
82 | | REM replace the : with . |
| 86 | REM replace the : with . (may or may not exist depending on your date format) |
83 | 87 | SET dt=%dt::=.% |
84 | 88 | |
85 | | REM remove the first 4 characters which are the day plus a space |
86 | | SET dt=%dt:~4% |
87 | | |
88 | 89 | REM build the logfile name |
89 | | SET logfile="debug\%dt%.log" |
| 90 | SET logfile=%DEBUG_DIR%\%dt%.log |
90 | 91 | |
91 | 92 | REM remove the space that gets created for some reason... |
92 | | SET logfile=%logfile: =% |
| 93 | SET logfile=%logfile: =% |
| 94 | |
| 95 | REM quote logfile |
| 96 | SET logfile="%logfile%" |
93 | 97 | |
94 | 98 | REM write a nice header |
95 | | ECHO ------------------------------------------------- > %logfile% |
96 | | ECHO Pidgin Debug Log For %odt% >> %logfile% |
| 99 | ECHO ------------------------------------------------- > %logfile% |
| 100 | ECHO Pidgin Debug Log For %date% %time% >> %logfile% |
97 | 101 | ECHO ------------------------------------------------- >> %logfile% |
98 | 102 | |
99 | | REM start pidgin without an extra command window |
100 | | START /B pidgin -d 2>&1 >> %logfile% |
| 103 | "%PIDGIN_INST_DIR%\pidgin.exe" -d 2>&1 >> %logfile% |
101 | 104 | |
102 | | REM close this command window |
103 | 105 | EXIT |
104 | 106 | }}} |
105 | 107 | |
| 108 | Create a `pidgin.vbs` file in the same directory as `pidgin.bat` was created above: |
| 109 | {{{ |
| 110 | Set WshShell = WScript.CreateObject("WScript.Shell") |
| 111 | obj = WshShell.Run("pidgin.bat", 0) |
| 112 | }}} |
| 113 | |
| 114 | Create a shortcut to the `pidgin.vbs` file on your Desktop (or wherever is convenient) and use that to launch Pidgin. You can assign the icon from pidgin.exe to the shortcut to make it look nice. |
| 115 | |
| 116 | |
106 | 117 | == All other (non-Windows) OS users == |
107 | 118 | [wiki:GetABacktrace Get a backtrace] |
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!