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 ##April 4, 1999 - Sanity check for file locations/wine strippedness
10 ## - Various code cleanups/fixes
11 ##March 21, 1999 - Bash 2.0 STDERR workaround (Thanks Ryan Cumming!)
12 ##March 1, 1999 - Check for stripped build
13 ##February 3, 1999 - Fix to chdir to the program's directory
14 ##February 1, 1999 - Cleaned up code
15 ##January 26, 1999 - Fixed various bugs...
16 ## - Made newbie mode easier
17 ##January 25, 1999 - Initial Release
18 ## -------------------------------------------
19 ##| IRCNET/UNDERNET: jazzfan AOL: Jazzrock12 |
20 ##| E-MAIL: magicbox@bestweb.net ICQ: 19617831|
21 ##| Utah Jazz Page @ http://www.gojazz.net |
22 ##| Wine Builds @ http://www.gojazz.net/wine |
23 ## -------------------------------------------
29 open STDERR
, ">&SAVEERR"; open STDERR
, ">&STDOUT";
30 $ENV{'SHELL'}="/bin/bash";
32 Enter your level of WINE expertise
: 1-newbie
2-intermediate
3-advanced
34 1 - Makes a debug report as
defined in the WINE documentation
. Best
35 for new WINE users
. If you
're not sure what -debugmsg is, then use
37 2 - Makes a debug report that is more customizable (Example: you can
38 choose what -debugmsg 's to
use). You are asked more
39 questions
in this mode
. May intimidate newbies
.
40 3 - Just like
2, but
not corner cutting
. Assumes you know what you
're
41 doing so it leaves out the long descriptions.
46 until ($debuglevel < 4) {
47 print "Enter a number from 1-3!\n";
51 if ($debuglevel < 3) {
53 This program will make a debug report for WINE developers. It does this
54 in two files. The first one has everything asked for by the bugreports
55 guide. The second has *all* of the debug output (This can go to
56 thousands of lines). To (hopefully) get the bug fixed, attach the first
57 file to a messsage sent to the comp.emulators.ms-windows.wine newsgroup.
58 The developers might ask you for "the last XX number of lines from the
59 report". If so, post the second file (It will be compressed with gzip
60 later, so leave off the .gz). If you feel like it, post both files at the
61 same time. I don't care
.
64 } elsif ($debuglevel =~ 3) {
66 This program will output to two files
:
67 1. Formatted debug report you might want to post to the newsgroup
68 2. File with ALL the debug output
(It will later be compressed with
69 gzip
, so leave off the trailing
.gz
)
73 print "Enter the filename for this debug report (The first file):\n";
77 I don
't think you typed in the right filename. Let's try again
.
79 while ($outfile =~ /^(\s)*$/) {
84 print "Enter the file for the debug output (The second file):\n";
87 while ($dbgoutfile =~ /^(\s)*$/) {
92 if ($debuglevel =~ 1) {
93 print "Looking for wine...\n";
94 $wineloc=`which wine`;
97 print "Couldn't find wine...\n";
99 Enter the full path to wine
. The path should look like
100 /path/to
/wine/wine
. Get it? It
's the directories leading up to the
101 wine file, and then the actual wine file (Example: /home/wine/wine):
107 print "Found wine: $wineloc\n"
110 if ($debuglevel > 1) {
111 if ($debuglevel =~ 2) {
113 Enter the full path to wine. The path should look like
114 /path/to/wine/wine. Get it? It's the directories leading up to the
115 wine file
, and then the actual wine file
(Example
: /home/wine
/wine
):
118 } elsif ($debuglevel =~ 3) {
119 print "Enter the full path to wine (Example: /home/wine/wine):\n";
124 while ($wineloc =~ /^(\s)*$/) {
125 print do_var
($var23);
129 print "Checking if $wineloc is stripped...\n";
130 $ifstrip = `nm $wineloc 2>&1`;
131 while ($ifstrip =~ /no symbols/) {
133 Your wine is stripped
! You probably downloaded it off of the internet
.
134 If you have another location of wine that may be used
, enter it now
.
135 Otherwise
, hit control
-c
and download an unstripped version
, then re
-run
136 this script
. Note
: stripped versions make useless debug reports
138 print do_var
($var24);
139 print "Enter the full path to wine:\n";
142 while ($wineloc =~ /^(\s)*$/) {
143 print do_var
($var23);
147 $ifstrip = `nm $wineloc 2>&1`;
150 What version of windows are you using with wine?
0-None
, 1-Win3
.x
,
151 2-Win95
, 3-Win98
, 4-WinNT3
.5x
, 5-WinNT4
.x
, 6-WinNT5
.x
, 7-Other
(Enter
156 until ($winver < 7) {
158 No
! Enter a number from
0 to
7 that corresponds to your windows version
!
165 $winver="None Installed";
166 } elsif ($winver =~ 1) {
167 $winver="Windows 3.x";
168 } elsif ($winver =~ 2) {
169 $winver="Windows 95";
170 } elsif ($winver =~ 3) {
171 $winver="Windows 98";
172 } elsif ($winver =~ 4) {
173 $winver="Windows NT 3.5x";
174 } elsif ($winver =~ 5) {
175 $winver="Windows NT 4.x";
176 } elsif ($winver =~ 6) {
177 $winver="Windows NT 5.x";
178 } elsif ($winver =~ 7) {
179 print "OK. What version of Windows are you using?\n";
183 if ($debuglevel < 3) {
185 Enter the full path to the program you want to run
. Remember what you
186 were told before
- a full path is the directories leading up to the
187 program
and then the program
's name, like /dos/windows/sol.exe, not
192 if ($debuglevel =~ 3) {
194 Enter the full path to the program you want to run (Example:
195 /dos/windows/sol.exe, NOT sol.exe):
201 while ($program =~ /^(\s)*$/) {
202 print do_var($var23);
208 Enter the name, version, and manufacturer of the program (Example:
209 Netscape Navigator 4.5):
215 Enter 0 if your program is 16 bit (Windows 3.x), 1 if your program is 32
216 bit (Windows 9x, NT3.x and up), or 2 if you are unsure:
218 print do_var($var10);
221 until ($progbits < 3) {
222 print "You must enter 0, 1 or 2!\n";
226 if ($progbits =~ 0) {
228 } elsif ($progbits =~ 1) {
233 if ($debuglevel > 1) {
234 if ($debuglevel =~ 2) {
236 Enter any extra debug options. Default is +relay - If you don't
237 know what options to
use, just hit enter
, and I
'll use those (Example, the
238 developer tells you to re-run with -debugmsg +dosfs,+module you would type
239 in +dosfs,+module). Hit enter if you're
not sure what to
do:
241 print do_var
($var11);
242 } elsif ($debuglevel =~ 3) {
244 Enter any debug options you would like to
use. Just enter parts after
245 -debugmsg
. Default is
+relay
:
247 print do_var
($var12);
251 if ($debugopts =~ /-debugmsg /) {
252 ($crap, $debugopts) = split / /,$debugopts;
254 if ($debugopts =~ /^\s*$/) {
257 } elsif ($debuglevel =~ 1) {
258 $debugopts = "+relay";
260 if ($debuglevel > 1) {
261 if ($debuglevel =~ 2) {
263 How many trailing lines of debugging info
do you want to include
in the report
264 you
're going to submit (First file)? If a developer asks you to include
265 the last 200 lines, enter 200 here. Default is 100, which is reached by
266 pressing enter. (If you're
not sure
, just hit enter
):
268 print do_var
($var13);
269 } elsif ($debuglevel =~ 3) {
271 Enter how many lines of trailing debugging output you want
in your nice
272 formatted report
. Default is
100:
274 print do_var
($var14);
278 if ($lastnlines =~ /^\s*$/) {
281 } elsif ($debuglevel =~ 1) {
284 if ($debuglevel > 1) {
286 Enter any extra options you want to pass to WINE
. Strongly recommended you
289 print do_var
($var15);
292 } elsif ($debuglevel =~ 1) {
293 $extraops="-managed";
295 print "Enter your distribution name (Example: Redhat 5.0):\n";
298 if ($debuglevel > 1) {
299 if ($debuglevel =~ 2) {
301 When you ran
./configure to build wine
, were there any special options
302 you used to
do so
(Example
: --enable
-dll
)? If you didn
't use any special
303 options or didn't compile WINE on your own
, just hit enter
:
305 print do_var
($var16);
306 } elsif ($debuglevel =~ 3) {
308 Enter any special options you used
when running
./configure
for WINE
309 (Default is none
, use if you didn
't compile wine yourself):
311 print do_var($var17);
315 if ($configopts =~ /^\s*$/) {
318 } elsif ($debuglevel =~ 1) {
321 if ($debuglevel > 1) {
322 if ($debuglevel =~ 2) {
324 Is your wine version CVS or from a .tar.gz file? As in... did you download it
325 off a website/ftpsite or did you/have you run cvs on it to update it?
326 For CVS: YYMMDD, where YY is the year (99), MM is the month (01), and DD
327 is the day (14), that you last updated it (Example: 990114).
328 For tar.gz: Just hit enter and I'll figure out the version
for you
:
330 print do_var
($var18);
331 } elsif ($debuglevel =~ 3) {
333 Is your wine from CVS? Enter the
last CVS update date
for it here
, in
334 YYMMDD form
(If it
's from a tarball, just hit enter):
336 print do_var($var19);
340 if ($winever =~ /[0-9]+/) {
344 $winever = `$wineloc -v 2>&1`;
347 } elsif ($debuglevel =~ 1) {
348 $winever=`$wineloc -v 2>&1`;
351 $gccver=`gcc -v 2>&1`;
352 ($leftover,$gccver) = split /\n/,$gccver;
356 $kernelver=`uname -r`;
360 $wineneeds=`ldd $wineloc`;
361 if ($debuglevel < 3) {
363 OK, now I'm going to run WINE
. I will
close it
for you once the wine
364 debugger comes up
. NOTE
: You won
't see ANY debug messages. Don't
365 worry
, they are being output to a file
. Since there are so many
, it
's
366 not a good idea to have them all output to a terminal (Speed slowdown
368 WINE will still run much slower than normal, because there will be so
369 many debug messages being output to file.
371 print do_var($var20);
372 } elsif ($debuglevel =~ 3) {
374 OK, now it's
time to run WINE
. I will
close down WINE
for you after
375 the debugger is finished doing its thing
.
377 print do_var
($var21);
379 $bashver=qw("/bin/bash -version");
380 if ($bashver =~ /2\./) { $outflags = "2>" }
381 else { $outflags = ">&" }
382 print "Hit enter to start wine!\n";
388 system("echo quit|$wineloc -debugmsg $debugopts $extraops \"$program\" $outflags $dbgoutfile");
389 $lastlines=`tail -n $lastnlines $dbgoutfile`;
390 system("gzip $dbgoutfile");
391 open(OUTFILE
,">$outfile");
393 Auto-generated debug report by Wine Quick Debug Report Maker Thingy:
394 WINE Version: $winever
395 Windows Version: $winver
397 Kernel Version: $kernelver
402 Program Type: $progbits
403 Debug Options: -debugmsg $debugopts
404 Other Extra Commands Passed: $extraops
405 Extra ./configure Commands: $configopts
408 Last $lastnlines lines of debug output follows:
410 I have a copy of the full debug report, if it is needed.
414 Great
! We
're finished making the debug report. Do whatever with it. The
417 The filename for the compressed full debug is:
419 Note that it is $dbgoutfile.gz, since I compressed it with gzip for you.
421 Having problems with the script? Tell the wine newsgroup
422 (comp.emulators.ms-windows.wine).
424 print do_var($var22);