2 ##Wine Quick Debug Report Maker Thingy (WQDRMK)
5 ##Do not say this is yours without my express permisson, or I will
6 ##hunt you down and kill you like the savage animal I am.
7 ##Released under the WINE licence
9 ##January 1, 1999 - Initial Release
10 ## -------------------------------------------
11 ##| IRCNET/UNDERNET: jazzfan AOL: Jazzrock12 |
12 ##| E-MAIL: magicbox@bestweb.net ICQ: 19617831|
13 ##| Utah Jazz Page @ http://www.gojazz.net |
14 ##| Wine Builds @ http://www.gojazz.net/wine |
15 ## -------------------------------------------
16 open STDERR, ">&SAVEERR"; open STDERR, ">&STDOUT";
17 system("export SHELL=/bin/bash");
19 Enter your level of WINE expertise: 1-newbie 2-intermediate 3-advanced
21 1 - Makes a debug report as defined in the WINE documentation. Best
22 for new WINE users. If you're not sure what -debugmsg is, then use
24 2 - Makes a debug report that is more customizable (Example: you can
25 choose what -debugmsg 's to use). You are asked more
26 questions in this mode. May intimidate newbies.
27 3 - Just like 2, but not corner cutting. Assumes you know what you're
28 doing so it leaves out the long descriptions.
32 until ($debuglevel < 4) {
33 print "Enter a number from 1-3!";
37 if ($debuglevel < 3) {
39 This program will make a debug report for WINE developers. It does this
40 in two files. The first one has everything asked for by the bugreports
41 guide. The second has *all* of the debug output (This can go to
42 thousands of lines). To (hopefully) get the bug fixed, attatch the first
43 file to a messsage sent to the comp.emulators.ms-windows.wine newsgroup.
44 The developers might ask you for "the last XX number of lines from the
45 report". If so, post the second file (It will be compressed with gzip
46 later, so leave off the .gz). If you feel like it, post both files at the
47 same time. I don't care.
50 elsif ($debuglevel =~ 3) {
52 This program will output to two files:
53 1. Formatted debug report you might want to post to the newsgroup
54 2. File with ALL the debug output (It will later be compressed with
55 gzip, so leave off the trailing .gz)
58 print "Enter the filename for this debug report (The first file):\n";
61 print "Enter the file for the debug output (The second file):\n";
64 if ($debuglevel =~ 1) {
65 print "Looking for wine...\n";
66 $wineloc=`which wine`;
69 print "Couldn't find wine...\n";
71 Enter the full path to wine. The path should look like
72 /path/to/wine/wine. Get it? It's the directories leading up to the
73 wine file, and then the actual wine file (Example: /home/wine/wine):
79 print "Found wine: $wineloc\n"
85 Enter the full path to wine. The path should look like
86 /path/to/wine/wine. Get it? It's the directories leading up to the
87 wine file, and then the actual wine file (Example: /home/wine/wine):
90 elsif ($debuglevel =~ 3) {
91 print "Enter the full path to wine (Example: /home/wine/wine):\n";
97 What version of windows are you using with wine? 0-None, 1-Win3.x,
98 2-Win95, 3-Win98, 4-WinNT3.5x, 5-WinNT4.x, 6-WinNT5.x, 7-Other (Enter
102 until ($winver < 7) {
104 No! Enter a number from 0 to 7 that corresponds to your windows version!
108 if ($winver =~ 0) { $winver="None Installed"; }
109 elsif ($winver =~ 1) { $winver="Windows 3.x"; }
110 elsif ($winver =~ 2) { $winver="Windows 95"; }
111 elsif ($winver =~ 3) { $winver="Windows 98"; }
112 elsif ($winver =~ 4) { $winver="Windows NT 3.5x"; }
113 elsif ($winver =~ 5) { $winver="Windows NT 4.x"; }
114 elsif ($winver =~ 6) { $winver="Windows NT 5.x"; }
115 elsif ($winver =~ 7) {
116 print "OK. What version of Windows are you using?\n";
119 if ($debuglevel < 3) {
121 Enter the full path to the program you want to run. Remember what you
122 were told before - a full path is the directories leading up to the
123 program and then the program's name, like /dos/windows/sol.exe, not
127 if ($debuglevel =~ 3) {
129 Enter the full path to the program you want to run (Example:
130 /dos/windows/sol.exe, NOT sol.exe):
136 Enter the name, version, and manufacturer of the program (Example:
137 Netscape Navigator 4.5):
142 Enter 0 if your program is 16 bit (Windows 3.x), 1 if your program is 32
143 bit (Windows 9x, NT3.x and up), or 2 if you are unsure:
147 until ($progbits < 3) {
148 print "You must enter 0, 1 or 2!\n";
151 if ($progbits =~ 0) { $progbits=Win16 }
152 elsif ($progbits =~ 1) { $progbits=Win32 }
153 else { $progbits = "Unsure" }
154 if ($debuglevel > 1) {
155 if ($debuglevel =~ 2) {
157 Enter any extra debug options. Default is +relay - If you don't
158 know what options to use, just hit enter, and I'll use those (Example, the
159 developer tells you to re-run with -debugmsg +dosfs,+module you would type
160 in +dosfs,+module). In other words, hit enter if you're not sure what to
164 elsif ($debuglevel =~ 3) {
166 Enter any debug options you would like to use. Just enter parts after
167 -debugmsg. Default is +relay:
172 if ($debugopts=~/-debugmsg /) {
173 ($crap, $debugopts) = / /,$debugopts; }
174 if ($debugopts=~/^\s*$/) { $debugopts="+relay"; } }
175 elsif ($debuglevel =~ 1) {
176 $debugopts = "+relay"; }
177 if ($debuglevel > 1) {
178 if ($debuglevel =~ 2) {
180 How many lines of debugging info do you want to include in the report
181 you're going to submit (First file)? If a developer asks you to include
182 the last 200 lines, enter 200 here. Default is 100, which is reached by
183 pressing enter. (If you're not sure, just hit enter):
186 elsif ($debuglevel =~ 3) {
188 Enter how many lines of debugging output you want in your nice
189 formatted report. Default is 100:
194 if ($lastnlines=~/^\s*$/) { $lastnlines=100; } }
195 elsif ($debuglevel =~ 1) {
198 Enter any extra options you want to pass to WINE. Strongly recommended you
203 print "Enter your distribution name (Example: Redhat 5.0):\n";
206 if ($debuglevel > 1) {
207 if ($debuglevel =~ 2) {
209 When you ran ./configure to build wine, were there any special options
210 you used to do so (Example: --enable-dll)? If you didn't use any special
211 options or didn't compile WINE on your own, just hit enter:
214 elsif ($debuglevel =~ 3) {
216 Enter any special options you used when running ./configure for WINE
217 (Default is none, use if you didn't compile wine yourself):
222 if ($configopts=~/\s*/) { $configopts="None"; } }
223 elsif ($debuglevel =~ 1) {
224 $configopts="None"; }
225 if ($debuglevel > 1) {
226 if ($debuglevel =~ 2) {
228 Is your wine version CVS or from a tarball? As in... did you download it
229 off a website/ftpsite or did you/have you run cvs on it to update it?
230 For CVS: YYMMDD, where YY is the year (99), MM is the month (01), and DD
231 is the day (14), that you last updated it (Example: 990114).
232 For tarball: Just hit enter and I'll figure out the version for you:
235 elsif ($debuglevel =~ 3) {
237 Is your wine from CVS? Enter the last CVS update date for it here, in
238 YYMMDD form (If it's from a tarball, just hit enter):
244 if ($winever=~/[0-9]+/) {
248 $winever = `$wineloc -v 2>&1`;
251 elsif ($debuglevel =~ 1) {
252 $winever=`$wineloc -v 2>&1`;
255 $gccver=`gcc -v 2>&1`;
256 ($leftover,$gccver) = split /\n/,$gccver;
260 $kernelver=`uname -r`;
264 $wineneeds=`ldd $wineloc`;
265 if ($debuglevel < 3) {
267 OK, now I'm going to run WINE. I will close it for you once the wine
268 debugger comes up. NOTE: You won't see ANY debug messages. Don't
269 worry, they are being output to a file. Since there are so many, it's
270 not a good idea to have them all output to a terminal (Speed slowdown
272 WINE will still run much slower than normal, because there will be so
273 many debug messages being output to file.
276 elsif ($debuglevel =~ 3) {
278 OK, now it's time to run WINE. I will close down WINE for you after
279 the debugger is finished doing its thing.
282 print "Hit enter to start wine!\n";
284 system("echo quit|$wineloc -debugmsg $debugopts $extraops \"$program\" >& $dbgoutfile");
285 $lastlines=`tail -n $lastnlines $dbgoutfile`;
286 system("gzip $dbgoutfile");
287 open(OUTFILE,">$outfile");
289 Auto-generated debug report by Wine Quick Debug Report Maker Thingy:
290 WINE Version: $winever
291 Windows Version: $winver
293 Kernel Version: $kernelver
298 Program Type: $progbits
299 Debug Options: -debugmsg $debugopts
300 Other Extra Commands Passed: $extraops
301 Extra ./configure Commands: $configopts
304 Last $lastnlines lines of debug output follows:
306 I have a copy of the full debug report, if it is needed.
310 Great! We're finished making the debug report. Do whatever with it. The
313 The filename for the compressed full debug is:
315 Note that it is $dbgoutfile.gz, since I compressed it with gzip for you.