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 ##February 3, 1999 - Fix to chdir to the program's directory
10 ##February 1, 1999 - Cleaned up code
11 ##January 26, 1999 - Fixed various bugs...
12 ## - Made newbie mode easier
13 ##January 25, 1999 - Initial Release
14 ## -------------------------------------------
15 ##| IRCNET/UNDERNET: jazzfan AOL: Jazzrock12 |
16 ##| E-MAIL: magicbox@bestweb.net ICQ: 19617831|
17 ##| Utah Jazz Page @ http://www.gojazz.net |
18 ##| Wine Builds @ http://www.gojazz.net/wine |
19 ## -------------------------------------------
25 open STDERR
, ">&SAVEERR"; open STDERR
, ">&STDOUT";
26 $ENV{'SHELL'}="/bin/bash";
28 Enter your level of WINE expertise
: 1-newbie
2-intermediate
3-advanced
30 1 - Makes a debug report as
defined in the WINE documentation
. Best
31 for new WINE users
. If you
're not sure what -debugmsg is, then use
33 2 - Makes a debug report that is more customizable (Example: you can
34 choose what -debugmsg 's to
use). You are asked more
35 questions
in this mode
. May intimidate newbies
.
36 3 - Just like
2, but
not corner cutting
. Assumes you know what you
're
37 doing so it leaves out the long descriptions.
42 until ($debuglevel < 4) {
43 print "Enter a number from 1-3!\n";
47 if ($debuglevel < 3) {
49 This program will make a debug report for WINE developers. It does this
50 in two files. The first one has everything asked for by the bugreports
51 guide. The second has *all* of the debug output (This can go to
52 thousands of lines). To (hopefully) get the bug fixed, attach the first
53 file to a messsage sent to the comp.emulators.ms-windows.wine newsgroup.
54 The developers might ask you for "the last XX number of lines from the
55 report". If so, post the second file (It will be compressed with gzip
56 later, so leave off the .gz). If you feel like it, post both files at the
57 same time. I don't care
.
60 } elsif ($debuglevel =~ 3) {
62 This program will output to two files
:
63 1. Formatted debug report you might want to post to the newsgroup
64 2. File with ALL the debug output
(It will later be compressed with
65 gzip
, so leave off the trailing
.gz
)
69 print "Enter the filename for this debug report (The first file):\n";
72 print "Enter the file for the debug output (The second file):\n";
75 if ($debuglevel =~ 1) {
76 print "Looking for wine...\n";
77 $wineloc=`which wine`;
80 print "Couldn't find wine...\n";
82 Enter the full path to wine
. The path should look like
83 /path/to
/wine/wine
. Get it? It
's the directories leading up to the
84 wine file, and then the actual wine file (Example: /home/wine/wine):
90 print "Found wine: $wineloc\n"
93 if ($debuglevel > 1) {
94 if ($debuglevel =~ 2) {
96 Enter the full path to wine. The path should look like
97 /path/to/wine/wine. Get it? It's the directories leading up to the
98 wine file
, and then the actual wine file
(Example
: /home/wine
/wine
):
101 } elsif ($debuglevel =~ 3) {
102 print "Enter the full path to wine (Example: /home/wine/wine):\n";
108 What version of windows are you using with wine?
0-None
, 1-Win3
.x
,
109 2-Win95
, 3-Win98
, 4-WinNT3
.5x
, 5-WinNT4
.x
, 6-WinNT5
.x
, 7-Other
(Enter
114 until ($winver < 7) {
116 No
! Enter a number from
0 to
7 that corresponds to your windows version
!
123 $winver="None Installed";
124 } elsif ($winver =~ 1) {
125 $winver="Windows 3.x";
126 } elsif ($winver =~ 2) {
127 $winver="Windows 95";
128 } elsif ($winver =~ 3) {
129 $winver="Windows 98";
130 } elsif ($winver =~ 4) {
131 $winver="Windows NT 3.5x";
132 } elsif ($winver =~ 5) {
133 $winver="Windows NT 4.x";
134 } elsif ($winver =~ 6) {
135 $winver="Windows NT 5.x";
136 } elsif ($winver =~ 7) {
137 print "OK. What version of Windows are you using?\n";
141 if ($debuglevel < 3) {
143 Enter the full path to the program you want to run
. Remember what you
144 were told before
- a full path is the directories leading up to the
145 program
and then the program
's name, like /dos/windows/sol.exe, not
150 if ($debuglevel =~ 3) {
152 Enter the full path to the program you want to run (Example:
153 /dos/windows/sol.exe, NOT sol.exe):
160 Enter the name, version, and manufacturer of the program (Example:
161 Netscape Navigator 4.5):
167 Enter 0 if your program is 16 bit (Windows 3.x), 1 if your program is 32
168 bit (Windows 9x, NT3.x and up), or 2 if you are unsure:
170 print do_var($var10);
173 until ($progbits < 3) {
174 print "You must enter 0, 1 or 2!\n";
178 if ($progbits =~ 0) {
180 } elsif ($progbits =~ 1) {
185 if ($debuglevel > 1) {
186 if ($debuglevel =~ 2) {
188 Enter any extra debug options. Default is +relay - If you don't
189 know what options to
use, just hit enter
, and I
'll use those (Example, the
190 developer tells you to re-run with -debugmsg +dosfs,+module you would type
191 in +dosfs,+module). Hit enter if you're
not sure what to
do:
193 print do_var
($var11);
194 } elsif ($debuglevel =~ 3) {
196 Enter any debug options you would like to
use. Just enter parts after
197 -debugmsg
. Default is
+relay
:
199 print do_var
($var12);
203 if ($debugopts=~/-debugmsg /) {
204 ($crap, $debugopts) = / /,$debugopts;
206 if ($debugopts=~/^\s*$/) {
209 } elsif ($debuglevel =~ 1) {
210 $debugopts = "+relay";
212 if ($debuglevel > 1) {
213 if ($debuglevel =~ 2) {
215 How many trailing lines of debugging info
do you want to include
in the report
216 you
're going to submit (First file)? If a developer asks you to include
217 the last 200 lines, enter 200 here. Default is 100, which is reached by
218 pressing enter. (If you're
not sure
, just hit enter
):
220 print do_var
($var13);
221 } elsif ($debuglevel =~ 3) {
223 Enter how many lines of trailing debugging output you want
in your nice
224 formatted report
. Default is
100:
226 print do_var
($var14);
230 if ($lastnlines=~/^\s*$/) {
233 } elsif ($debuglevel =~ 1) {
236 if ($debuglevel > 1) {
238 Enter any extra options you want to pass to WINE
. Strongly recommended you
241 print do_var
($var15);
244 } elsif ($debuglevel =~ 1) {
245 $extraops="-managed";
247 print "Enter your distribution name (Example: Redhat 5.0):\n";
250 if ($debuglevel > 1) {
251 if ($debuglevel =~ 2) {
253 When you ran
./configure to build wine
, were there any special options
254 you used to
do so
(Example
: --enable
-dll
)? If you didn
't use any special
255 options or didn't compile WINE on your own
, just hit enter
:
257 print do_var
($var16);
258 } elsif ($debuglevel =~ 3) {
260 Enter any special options you used
when running
./configure
for WINE
261 (Default is none
, use if you didn
't compile wine yourself):
263 print do_var($var17);
267 if ($configopts=~/\s*/) {
270 } elsif ($debuglevel =~ 1) {
273 if ($debuglevel > 1) {
274 if ($debuglevel =~ 2) {
276 Is your wine version CVS or from a .tar.gz file? As in... did you download it
277 off a website/ftpsite or did you/have you run cvs on it to update it?
278 For CVS: YYMMDD, where YY is the year (99), MM is the month (01), and DD
279 is the day (14), that you last updated it (Example: 990114).
280 For tar.gz: Just hit enter and I'll figure out the version
for you
:
282 print do_var
($var18);
283 } elsif ($debuglevel =~ 3) {
285 Is your wine from CVS? Enter the
last CVS update date
for it here
, in
286 YYMMDD form
(If it
's from a tarball, just hit enter):
288 print do_var($var19);
293 if ($winever=~/[0-9]+/) {
297 $winever = `$wineloc -v 2>&1`;
300 } elsif ($debuglevel =~ 1) {
301 $winever=`$wineloc -v 2>&1`;
304 $gccver=`gcc -v 2>&1`;
305 ($leftover,$gccver) = split /\n/,$gccver;
309 $kernelver=`uname -r`;
313 $wineneeds=`ldd $wineloc`;
314 if ($debuglevel < 3) {
316 OK, now I'm going to run WINE
. I will
close it
for you once the wine
317 debugger comes up
. NOTE
: You won
't see ANY debug messages. Don't
318 worry
, they are being output to a file
. Since there are so many
, it
's
319 not a good idea to have them all output to a terminal (Speed slowdown
321 WINE will still run much slower than normal, because there will be so
322 many debug messages being output to file.
324 print do_var($var20);
325 } elsif ($debuglevel =~ 3) {
327 OK, now it's
time to run WINE
. I will
close down WINE
for you after
328 the debugger is finished doing its thing
.
330 print do_var
($var21);
332 print "Hit enter to start wine!\n";
338 system("echo quit|$wineloc -debugmsg $debugopts $extraops \"$program\" >& $dbgoutfile");
339 $lastlines=`tail -n $lastnlines $dbgoutfile`;
340 system("gzip $dbgoutfile");
341 open(OUTFILE
,">$outfile");
343 Auto-generated debug report by Wine Quick Debug Report Maker Thingy:
344 WINE Version: $winever
345 Windows Version: $winver
347 Kernel Version: $kernelver
352 Program Type: $progbits
353 Debug Options: -debugmsg $debugopts
354 Other Extra Commands Passed: $extraops
355 Extra ./configure Commands: $configopts
358 Last $lastnlines lines of debug output follows:
360 I have a copy of the full debug report, if it is needed.
364 Great
! We
're finished making the debug report. Do whatever with it. The
367 The filename for the compressed full debug is:
369 Note that it is $dbgoutfile.gz, since I compressed it with gzip for you.
373 print do_var($var22);