<kc version="0.1.0">

<title>Wine Traffic</title>

<author contact="mailto:vinn@theshell.com">Brian Vincent</author>

<issue num="146" date="29 Nov 2002 00:00:00 -0800" />

<intro>
<p>This is the 146th release of the Wine's kernel cousin publication. It's
main goal is to distribute widely what's going on around Wine (the Un*x 
windows emulator).</p>
</intro>


<stats posts="323" size="1018" contrib="79" multiples="49" lastweek="46">

<person posts="40" size="110" who="Dimitrie O. Paun" />
<person posts="20" size="52" who="Sylvain Petreolle" />
<person posts="18" size="59" who="Martin Wilck" />
<person posts="18" size="45" who="Alexandre Julliard" />
<person posts="12" size="31" who="Fabian Cenedese" />
<person posts="10" size="47" who="Tony Lambregts" />
<person posts="9" size="29" who="Robert North" />
<person posts="9" size="25" who="Mike Hearn" />
<person posts="11" size="28" who="Vincent Beron" />
<person posts="8" size="34" who="Shachar Shemesh" />
<person posts="8" size="30" who="Martin Fuchs" />
<person posts="7" size="33" who="Patrik Stridvall" />
<person posts="7" size="17" who="Francois Gouget" />
<person posts="7" size="16" who="Lionel Ulmer" />
<person posts="7" size="14" who="Sean Mitchell" />
<person posts="6" size="15" who="Duane Clark" />
<person posts="6" size="14" who="Ove Kaaven" />
<person posts="6" size="14" who="Eric Pouech" />
<person posts="5" size="18" who="David Fraser" />
<person posts="5" size="10" who="David D. Hagood" />
<person posts="4" size="11" who="Bill Medland" />
<person posts="4" size="11" who="Uwe Bonnes" />
<person posts="4" size="8" who="Mark Hannessen" />
<person posts="3" size="62" who="Gyorgy Jeney" />
<person posts="3" size="14" who="Huw D M Davies" />
<person posts="3" size="13" who="Greg Turner" />
<person posts="3" size="9" who="Kjetil S. Matheussen" />
<person posts="3" size="8" who="Jukka Heinonen" />
<person posts="3" size="8" who="Jeff Smith" />
<person posts="3" size="7" who="Dmitry Timoshkov" />
<person posts="3" size="7" who="David Laight" />
<person posts="3" size="7" who="yf" />
<person posts="3" size="7" who="Christian Costa" />
<person posts="11" size="26" who="Dustin Navea" />
<person posts="3" size="5" who="Rajesh Akkineni" />
<person posts="2" size="18" who="Andrew John Hughes" />
<person posts="2" size="10" who="Leonardo Giordani" />
<person posts="2" size="6" who="Michael Stefaniuc" />
<person posts="2" size="5" who="Alberto Massari" />
<person posts="2" size="5" who="Zsolt Rizsanyi" />
<person posts="2" size="4" who="Andreas Mohr" />
<person posts="2" size="4" who="Johan Gill" />
<person posts="2" size="4" who="Ryan Cumming" />
<person posts="2" size="4" who="Tapio Kautto" />
<person posts="3" size="9" who="John K. Hohm" />
<person posts="1" size="7" who="Ryan Reading" />
<person posts="1" size="7" who="Joerg Mayer" />
<person posts="2" size="6" who="Francois Denis Gonthier" />
<person posts="1" size="3" who="Ender" />
<person posts="1" size="3" who="Fredrick P. Lackey" />
<person posts="1" size="3" who="Boris" />
<person posts="1" size="3" who="Romulo" />
<person posts="2" size="4" who="Steven Edwards" />
<person posts="1" size="2" who="Mehmet YASAR" />
<person posts="1" size="2" who="Mike McCormack" />
<person posts="1" size="2" who="Z_God" />
<person posts="1" size="2" who="Chris Thielen" />
<person posts="1" size="2" who="ezra daniel" />
<person posts="2" size="7" who="Martin Fuchs" />
<person posts="1" size="2" who="Steve Lustbader" />
<person posts="1" size="2" who="Dan Kegel" />
<person posts="1" size="2" who="Saravanakumar Soundarrajan" />
<person posts="1" size="2" who="Waldek Hebisch" />
<person posts="1" size="2" who="Stefan Leichter" />
<person posts="1" size="1" who="Marcus Meissner" />
<person posts="1" size="1" who="Matthias Rieber" />
<person posts="1" size="1" who="M Wood" />

</stats>


<section 
	title="News: Wine-20021125" 
	subject="News"
	archive="http://cvs.winehq.com/cvsweb/wine/ChangeLog?rev=1.65&amp;content-type=text/x-cvsweb-markup" 
	posts="2" 
	startdate="23 Nov 2002 00:00:00 -0800"
	enddate="29 Nov 2002 00:00:00 -0800"
>
<topic>News</topic>
<mention></mention>
<mention>News</mention>

<p>Alexandre released Wine-20021125 on Tuesday with this note:</p>
<quote who="Alexandre Julliard"><p>
WHAT'S NEW with Wine-20021125: (see
<a href="http://cvs.winehq.com/cvsweb/wine/ChangeLog?rev=1.65&amp;content-type=text/x-cvsweb-markup">ChangeLog</a>
for details)

<ul>
	<li> Finished conversion to STRICT compilation mode.</li>
	<li> WinHelp revival.</li>
	<li> Client-side fonts supported even without RENDER extension.</li>
	<li> Regression tests no longer require Perl.</li>
	<li> Lots of bug fixes.</li>
</ul></p></quote>

<p>This link was shamelessly copied from <a href="http://www.frankscorner.org">Frank's Corner</a>,
<quote who="FranksCorner">
On www.desktop-linux.net you can find 
<a href="http://www.desktop-linux.net/cxwine-mime.htm">a howto</a> for setting up mimetypes and 
symlinks,  so you can launch windows executables by clicking on them in the Konqueror file manager.
</quote></p>

</section>








<section 
	title="WineX on FreeBSD" 
	subject="Warcraft3 on FreeBSD"
	archive="http://www.bsdforums.org/forums/showthread.php?threadid=4793" 
	posts="1" 
	startdate="26 Nov 2002 00:00:00 -0800"
>
<topic>Ports</topic>
<p>Slashdot announced Kenneth Culver had hacked some syscalls into FreeBSD
that allows Warcraft 3 using the Linux WineX package:</p>
<quote who=""><p>
Just in case anyone here cares, I have implemented the linux ftruncate64,
truncate64, and mmap2 syscalls in the linuxulator on my computer, (mostly
cut 'n pasted the mmap2 from regular mmap with a couple of changes) and
with these changes it is possible to run the linux version of winex (the
one you have to pay for) to run warcraft 3. IT works in both direct3d mode
and in opengl mode using the following commandline:
<ul><code>
winex --dll dsound=n --dll quartz=n --dll d3d8=b War3.exe -- War3.exe
</code></ul></p><p>
Anyway, just thought someone might want to know. If anyone wants
step-by-step instructions to getting this working I'll have those worked
up in the next few days and posted somewhere along with the patches to the
linux kernel module.
</p></quote>


</section>








<section 
	title="Porting Apps With Winelib" 
	subject="Winelib Apps v0.1"
	archive="http://www.winehq.com/hypermail/wine-devel/2002/11/1374.html" 
	posts="16" 
	startdate="25 Nov 2002 00:00:00 -0800"
	enddate="27 Nov 2002 00:00:00 -0800"
>
<topic>Winelib</topic>
<mention></mention>

<p>Last week I covered a thread where Dimi Paun worked on porting
a Windows program using Winelib 
<kcref subject="PuTTY update" startdate="21 Nov 2002 00:00:00 -0800" />.
He announced a web page based on that experience:</p>
<quote who="Dimitrie Paun"><p>
Version 0.1 of the Winelib Applications page is available here:
<ul><a href="http://www.dssd.ca/wine/Winelib-Apps-0.1.html">
	http://www.dssd.ca/wine/Winelib-Apps-0.1.html</a>
</ul></p><p>
The current version is always available at this address
<ul><a href="http://www.dssd.ca/wine/Winelib-Apps.html">
	http://www.dssd.ca/wine/Winelib-Apps.html</a>
</ul></p><p>
Your comments, and suggestions are highly appreciated.
</p></quote>
<p>In the past people have debated exactly how practical 
Winelib is.  It doesn't really give a speedup by compiling 
it as a native app.  Nor does it (yet) allow you do use that
app without Wine (see the next thread). But Dimi makes
some excellent points on that page why it's important.  First,
for Wine development it provides an excellent testing tool.
As he puts it, 
<quote who="Dimitrie Paun">
 There are many such apps around, and a lot of them are 
 hosted at SourceForge. There are over 10,000 apps listed 
 as running under Windows OS, and over 7,000 of them are 
 listed as running under the Win32 environment. 
</quote></p> 
<p>Martin Wilck likes Winelib for another reason:</p>
<quote who="Martin Wilck"><p>
Winelib can be a solution for porting such software to Linux by only
rewriting those parts that need to be rewritten, replacing NT with Unix
functionality. This is much easier than doing a native port; most of the
application's code can be left untouched.
</p><p>
IMO this is the "real world" reason for doing Winelib development - you
can *combine* Windows and Unix code. OTOH Putty and Mozilla are apps
that I'd expect to be able to run natively.
</p></quote>

<p>Also, once an app gets ported using Winelib
it's more platform independent and could conceivably someday
run on Linux/PPC or Solaris.  It can also
begin taking advantage of features native to those platforms.
Winelib is still rough around edges - the build tools used
by a lot of Windows programs require a little massaging to
compile with Wine.  If you like to fiddle with compiling
programs check out Dimi's guide above.  And if you're 
successful with something I'm sure everyone on wine-devel
would love to hear about it.
</p>

</section>








<section 
	title="Porting to a Standalone App" 
	subject="Fwd: Re: [putty]Winelib support + patch"
	archive="http://www.winehq.com/hypermail/wine-devel/2002/11/1369.html" 
	posts="4" 
	startdate="25 Nov 2002 00:00:00 -0800"
>
<topic>Winelib</topic>
<mention></mention>

<p>A little background on this thread might be necessary.
Dimi explained a little bit about Wine to the folks who
wrote PuTTY (a telnet/ssh client for Windows):</p>
<quote who="Dimitrie Paun"><p>
 FYI: the way it works is that instead of compiling the app as an
      executable, we generate a .so that's loaded by wine. Now,
      wine is simply a one page program that loads the libraries
      that the program expects (like kernel, gdi, user), and then
      loads the program itself. This is required by some apps which
      have C++ static initializers, which expect to be able to call
      Win32 functions, and they do so before we get a chance to
      initialize them, if we were to have the app load the libs.
</p></quote>

<p>Simon Tatham from that project wasn't really sure why was needed 
for normal old apps written in C,
<quote who="Simon Tatham">
 OK, I've now read the docs and I understand this a bit better now.
 My next awkward question is: I can see that this is necessary for
 some apps which have C++ static initialisers, or which load
 libraries that have C++ static initialisers, but why does that mean
 it's necessary for PuTTY? PuTTY contains no C++, and as far as I
 know it uses no libraries _except_ standard Win32 API ones. Surely
 it should be possible _for these particular applications_ to compile
 them as standalone binaries? Or does Winelib currently only support
 doing things the inconvenient way?
</quote></p>

<p>Which led Dimi to ask, 
<quote who="Dimitrie Paun">
 Alexandre, do we support generating regular executables
 for the apps we don't necessarily need the wrapper stuff
 for initialization purposes?</quote></p>

<p>Alexandre explained,
<quote who="Alexandre Julliard">
 No, that's not supported at this point. It may be possible to support
 it again with some linker magic, now that apps no longer link to dlls
 directly. That's definitely something we should try to do as part of
 the "making winelib more user-friendly" task.
</quote></p>
</section>







<section 
	title="Submitting Multiple Patches" 
	subject="Re: Some additions to D3D"
	archive="http://www.winehq.com/hypermail/wine-devel/2002/11/1326.html" 
	posts="2" 
	startdate="24 Nov 2002 00:00:00 -0800"
>
<topic>Patches</topic>
<mention></mention>

<p>Lionel Ulmer submitted a Direct3D patch and in the
process asked, 
<quote who="Lionel Ulmer">
 how would you prefer for us to track dependencies
      between patches ? Submit each time a patch agains fresh CVS with all
      previous patches sent (with an ever growing changelog) or do you prefer
      (like here) a lot of patches dependant one on the others ?
      If it's the latter, do we need to do 'letter tracking' as Dimi did ?
</quote></p>

<p>Alexandre replied:</p>
<quote who="Alexandre Julliard"><p>
 In general separate patches are better; the exception is if they are
 fixes to a previous patch then it's better to resend all so I don't
 have to try to understand the broken version before reading the fix.
</p><p>
 And yes, in either case please find a way to clearly mark the
 sequence, don't rely on the submission order because mail doesn't
 always arrive in the correct order.
</p></quote>
</section>







<section 
	title="Debugging wineserver" 
	subject="How to debug wineserver"
	archive="http://www.winehq.com/hypermail/wine-devel/2002/11/1514.html" 
	posts="3" 
	startdate="28 Nov 2002 00:00:00 -0800"
>
<topic>Debugging</topic>
<mention></mention>

<p>Rajesh Akkineni wanted to know, 
<quote who="Rajesh Akkineni">
 is there any way we can debug the wineserver?
</quote></p>

<p>Tony Lambregts mentioned,
<quote who="Tony Lambregts">
 when you start wineserver you can start it with debug levels 
 i.e., "wineserver -d1". Setting d0 turns winserver debugging off.
</quote></p>

<p>Martin Wilck had some suggestions too,
<quote who="Martin Wilck">
 Starting wine with "-debugmsg trace+server" works quite well.
 Furthermore, wineserver is a true Unix program. You can run in through
 gdb. I often run wine normally, then start gdb and simply attach to the
 running wineserver process.
</quote></p>
</section>




<section 
	title="Shortening Debug Logs" 
	subject="Re: Some fixes in capabilities"
	archive="http://www.winehq.com/hypermail/wine-devel/2002/10/0378.html" 
	posts="7" 
	startdate="26 Nov 2002 00:00:00 -0800"
>
<topic>Debugging</topic>
<mention></mention>

<p>
Lionel Ulmer ran into a situation where he wanted to begin debugging
a program long after it started.  He described his problem:
</p><quote who="Lionel Ulmer"><p>
I do not want to turn on relaying for only one DLL (as I have no clue at all
where the problem is)... What I want is to turn on relaying for all DLLs
*after* the program has started (and *from* one of Wine's DLL and not from
the loader or any other 'special' code).
</p><p>
Ie, the program starts, loads the level / stuff for 10 minutes (and whould
have produced a 2.5 GB log unreadable without big file support) and then
only the last 10 seconds are important. So I would like to only relay these.
</p></quote>

<p>Alexandre suggested two possibilities:</p>
<quote who="Alexandre Julliard"><p>
The easy way would be to print some magic string at that point, and
pipe the output into a sed that deletes everything before that
string. It will still be a bit slow though.
</p><p>
The harder way is to call wine_dbg_parse_options("+relay"). This would
work for a normal debugging option, but for relay there is some work
that needs to be done at startup so you need to handle that too. A way
would be to start with +relay, turn it off with wine_dbg_parse_options,
and then turn it on again when needed.
</p></quote>

</section>


<section 
	title="OpenGL &amp; Double Buffering" 
	subject="And opengl regression"
	archive="http://www.winehq.com/hypermail/wine-devel/2002/11/1332.html" 
	posts="6" 
	startdate="24 Nov 2002 00:00:00 -0800"
	enddate="25 Nov 2002 00:00:00 -0800"
>
<topic>Multimedia</topic>
<mention></mention>

<p>Duane Clark spotted a regression due to the new dynamic
loading of OpenGL:</p>
<quote who="Duane Clark"><p>
 The patch for dynamic loading of opengl,
<a href="http://www.winehq.com/hypermail/wine-cvs/2002/11/0151.html">
 http://www.winehq.com/hypermail/wine-cvs/2002/11/0151.html</a>
</p><p>
 has caused a (apparently minor) regression in the program earthquake
<a href="http://www.navagent.com/products/earthquake/">
 http://www.navagent.com/products/earthquake/</a>
</p><p>
 That is a small app (250K download) with a spinning globe that shows 
 current earthquakes; actually a pretty cool little app. The regression 
 is that now when the oceans are turned on (via the settings dialog), the 
 land gets flooded.
</p></quote>

<p>After looking into it, he found the new code that caused
the problem.  It appeared the new code checks to see if double
buffering was selected:</p>
<quote who="Duane Clark"><p>
<ul><code>
    X11DRV_OpenGL_Init(display);<br />
    /* If OpenGL is available, change the default visual, etc as 
       necessary */<br />
    if (desktop_dbl_buf &amp;&amp; (desktop_vi = X11DRV_setup_opengl_visual( 
display )))<br />
</code></ul></p></quote>      

<p>Lionel asked if the "DesktopDoubleBuffered" option was set in
Duane's config file.  Duane replied that he did, and if he changed
it then the problem went away.  He asked why that was default 
behavior and Lionel described the process:</p>
<quote who="Lionel Ulmer"><p>
Well, before my patch, in one of the X11DRV rewrite, the option got somehow
lost and was enabled by default whatever the value of the entry in the
config file. So that it was working before was a 'feature' :-)
</p><p>
Now let's try to explain the reason of this option : in Windows, you first
create the Window and then only tell it that one wants to do OpenGL drawing
in it (single or double buffered). Now, in X11, if you plan to use a window
to do OpenGL drawings, you first need to be sure that the visual you choose
for it is compatible with OpenGL (ie does it support double buffering ? has
it a stencil buffer ? ...). The problem is that when Wine detects that the
application wants to do double buffered OpenGL drawings in that window, it's
too late as the window was already created with the default visual => hence
the option to have the default visual used by all windows be double buffered.
</p><p>
I do not think putting it as default is such a good idea as it may lead to
performance problems to all the people not using OpenGL... And the gamerz
just have to read the config file (if they know how to read, sometimes we
wonder when doing 'support' on #WineHQ 8-) ).
</p><p>
As to why it's called 'DesktopDoubleBuffered' and not something else, it's
also historic : at the beginnings, OpenGL only worked properly in Desktop
mode :-)
</p><p>
Finally, Alexandre (if you read this :-) ), now that you rewrote most of the
internal Windows handling code (ie with the Wine window == X11 window
stuff), would it be possible to somehow recreate the X11 window when we
detect OpenGL attaching to it and replace the old window in Wine's window
hierarchy ?
</p></quote>

<p>To which Alexandre replied,
<quote who="Alexandre Julliard">
Possible, yes. Easy, definitely not ;-)</quote></p>

</section> 







<section 
	title="Wine Under Cygwin" 
	subject="compiling wine under cygwin - status"
	archive="http://www.winehq.com/hypermail/wine-devel/2002/11/1522.html" 
	posts="4" 
	startdate="28 Nov 2002 00:00:00 -0800"
>
<topic>Status Updates</topic>
<mention></mention>

<p>David Fraser has been working on compiling Wine under Cygwin.
For more details, see issue #144 about "Fun Projects"
<kcref subject="Wine Fun Projects v0.2" startdate="14 Nov 2002 00:00:00 -0800" /> He wrote in with a status update:</p> <quote who="David
Fraser"><p>

This is a brief indicator on what parts of wine compile successfully 
under cygwin and what give errors. Almost all the source code compiles 
successfully, but lots of things have linking problems. Note that I 
haven't yet tested the resulting parts that did link successfully.
</p><p>
The significant compilation problem is in server/context_i386.c: You 
must implement get/set_thread_context for your platform.
Basically there's some code that does the threading stuff which is 
platform-specific. There are Linux and BSD and Sun variants, none of 
which work under cygwin ... Basically sys/ptrace.h is what's missing.
This lets the process interrupt a child process and get/set its 
registers. Does anyone have any idea what the best way to write a 
replacement for cygwin would be? Maybe I need to ask the cygwin list.
</p><p>
My plan is to go through each one that doesn't link, look at all the 
errors, and  categorize them (many are the same problem spread accross 
various dlls), so that we can tackle the more widespread problems
first... Any help with this appreciated :-)
</p></quote>

<p>For a complete list of what's working and what's not, check
out David's 
<a href="http://www.winehq.com/hypermail/wine-devel/2002/11/1522.html">
original post</a></p>

<p>In response to David's question about ptrace.c functionality,
Dimi Paun wrote,
<quote who="Dimitrie Paun">
 So actually a first approximation for [sg]et_thread_context for
 Cygwin would be one that does nothing. Then we can try submitting
 patches to Cygwin (Approach 2), so that other apps can make use
 of ptrace, if necessary.
</quote></p>

<p>David did that and announced more progress,
<quote who="David Fraser">
 OK, done that. So now wineserver.exe actually links :-) And it runs too!
 However can't yet see whether its going to do anything as in order to 
 actually run programs it looks like we need tolink miscemu/main.c
 Problem here being that it wants to link with ntdll, which doesn't build 
 yet. That still needs a lot more work... In the mean time a very simple 
 patch that does nothing for context_i386.c is below in case anyone else 
 wants to try...</quote></p>


</section>










<section 
	title="Quick Response to SwitchToThread() Problem" 
	subject="Whither SwitchToThread()?"
	archive="http://www.winehq.com/hypermail/wine-devel/2002/11/1429.html" 
	posts="12" 
	startdate="26 Nov 2002 00:00:00 -0800"
	enddate="27 Nov 2002 00:00:00 -0800"
>
<topic>Patches</topic>
<mention></mention>
<mention>Francois Gouget</mention>

<p>Sean Mitchell wrote to wine-devel with a problem:</p>
<quote who="Sean Mitchell"><p>
I'm doing a proof-of-concept for my boss to demonstrate that we can port a
large-ish application developed on Windows (using mostly crossplatform
libraries like wxWindows, STLport, Xerces) to Linux using winelib to cover a
few WIN32 API calls we've made.
</p><p>
I've just started into it, and have compiled a dozen files so far, but ran
into trouble with the thread code. I cannot find SwitchToThread anywhere,
not even in the winbase.h header file I expected it in. There are some
changelogs to indicate that it exists, and the symbol does live in
libntdll.dll.so, but I cannot find a header file that defines it.
</p></quote>
<p>An hour and half later Andrew Hughes dropped a note saying the 
MSDN docs listed the prototype in winbase.h.  Francois Gouget sent a 
one line patch updating winbase.h a few minutes later.  Sean wrote
back the next morning,
<quote who="Sean Mitchell">
 I told my boss that I posted the query last night and had a response with a
 fix waiting for me this morning. He is lukewarm about Open Source, but when
 I told him about this he was very, very impressed. He's never seen that sort
 of response from a commercial vendor except in a few emergency situations. 
</quote></p>
<p>Several others were also pleased with the quick response.  Martine Wilck
added,
<quote who="Martin Wilck">
even if Sean is happy now, and his boss too, let's keep realistic -
we were able to give quick feedback here because the solution was
simple.</quote></p>






</section>

</kc>
