<?xml version="1.0" ?>
<kc>

<title>Wine Traffic</title>

<author contact="http://www.theshell.com/~vinn">Brian Vincent</author>
<issue num="276" date="27 May 2005 00:00:00 -0800" />
<intro> <p>This is the 276th issue of the Wine Weekly News publication.
Its main goal is to miss deadlines. It also serves to inform you of what's going on around Wine. Wine is an open source implementation of the Windows API on top of X and Unix.  Think of it as a Windows compatibility layer.  Wine does not require Microsoft Windows, as it is a completely alternative implementation consisting of 100% Microsoft-free code, but it can optionally use native system DLLs if they are available.   You can find more info at <a href="http://www.winehq.org">www.winehq.org</a></p> </intro>
<stats posts="207" size="750" contrib="69" multiples="39" lastweek="27">

<person posts="21" size="61" who="Alexandre Julliard" />
<person posts="17" size="45" who="Dimi Paun" />
<person posts="10" size="55" who="Francois Gouget" />
<person posts="10" size="34" who="Michael Jung" />
<person posts="8" size="23" who="Detlef Riekenberg" />
<person posts="8" size="22" who="Mike Hearn" />
<person posts="7" size="33" who="Stefan D&#246;singer" />
<person posts="6" size="18" who="Eric Pouech" />
<person posts="5" size="23" who="Eric Frias" />
<person posts="5" size="16" who="Dustin Navea" />
<person posts="5" size="16" who="Uwe Bonnes" />
<person posts="4" size="32" who="Jacek Caban" />
<person posts="4" size="22" who="Richard Cohen" />
<person posts="4" size="17" who="Chuck Hall" />
<person posts="4" size="13" who="Dmitry Timoshkov" />
<person posts="4" size="12" who="Robert Shearman" />
<person posts="4" size="11" who="Jason Edmeades" />
<person posts="3" size="13" who="Maarten Lankhorst" />
<person posts="3" size="9" who="James Hawkins" />
<person posts="3" size="9" who="Juan Lang" />
<person posts="3" size="8" who="Sven Paschukat" />
<person posts="3" size="8" who="Mike Hearn" />
<person posts="3" size="8" who="Mike McCormack" />
<person posts="3" size="7" who="Kees Cook" />
<person posts="2" size="25" who="Aric Stewart" />
<person posts="2" size="8" who="Raphael" />
<person posts="2" size="8" who="Robert Lunnon" />
<person posts="2" size="7" who="Eric Pouech" />
<person posts="2" size="7" who="Dan Kegel" />
<person posts="2" size="7" who="(taro-x)" />
<person posts="2" size="6" who="Troy Rollo" />
<person posts="2" size="6" who="Boaz Harrosh" />
<person posts="2" size="5" who="Stefan Leichter" />
<person posts="2" size="5" who="Rein Klazes" />
<person posts="2" size="5" who="Jeremy Newman" />
<person posts="2" size="5" who="Andreas Mohr" />
<person posts="2" size="5" who="Ann &amp; Jason Edmeades" />
<person posts="2" size="4" who="Stefan D&#246;singer" />
<person posts="2" size="4" who="Dimitrie Paun" />
<person posts="1" size="22" who="Dan Aloni" />
<person posts="1" size="7" who="Hiji" />
<person posts="1" size="5" who="Rolf Kalbermatter" />
<person posts="1" size="4" who="(antonio.fernandez.moreno)" />
<person posts="1" size="4" who="(peter)" />
<person posts="1" size="3" who="Brian Vincent" />
<person posts="1" size="3" who="Vitaliy Margolen" />
<person posts="1" size="3" who="Huw D M Davies" />
<person posts="1" size="3" who="Chuck Hall" />
<person posts="1" size="3" who="Afkhampour, Cyrus" />
<person posts="1" size="3" who="Joris Huizer" />
<person posts="1" size="3" who="Jakob Eriksson" />
<person posts="1" size="3" who="Michael Stefaniuc" />
<person posts="1" size="2" who="Duane Clark" />
<person posts="1" size="2" who="Andreas 'GlaDiaC' Schneider" />
<person posts="1" size="2" who="Ove Kaaven" />
<person posts="1" size="2" who="Jonathan Wilson" />
<person posts="1" size="2" who="Shachar Shemesh" />
<person posts="1" size="2" who="Jeremy White" />
<person posts="1" size="2" who="Andrew Neil Ramage" />
<person posts="1" size="2" who="Gerold J. Wucherpfennig" />
<person posts="1" size="2" who="Anssi Hannula" />
<person posts="1" size="2" who="Marcelo Duarte" />
<person posts="1" size="2" who="Stefan =?utf-8?q?D=C3=B6singer?=" />
<person posts="1" size="2" who="Lionel Ulmer" />
<person posts="1" size="2" who="Detlef Riekenberg" />
<person posts="1" size="2" who="David Hemmo" />
<person posts="1" size="2" who="Dimi Paun" />
<person posts="1" size="2" who="gslink" />

</stats>
<section 
	title="MSHTML &amp; Mozilla &amp; XEmbed" 
	subject="XEmbed embeder support in Wine"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/05/0796.html" 
	posts="3"
	startdate="24 May 2005 00:00:00 -0800"
	enddate="24 May 2005 00:00:00 -0800"
>
<topic>Integration</topic>

<p>As we mentioned last month
(see WWN 
<a href="http://www.winehq.com/?issue=268#MSHTML%20Work">#268</a> and
<a href="http://www.winehq.com/?issue=271#MSHTML%20&amp;%20Gecko">#271</a>), 
Jacek Caban has been busy implementing MSHTML on top of Mozilla.  
MSHTML.DLL is a massive chunk of Internet Explorer; it's responsible
for parsing and rendering HTML.  His first round worked with the 
Windows version of Mozilla, now he's try to wrap the Linux version.
This week he asked on wine-devel how to proceed with a native Linux
Mozilla:</p>
<quote who="Jacek Caban"><p>
As I'm working on getting MSHTML to work using Linux
Gecko, I need support of XEmbed embedding in Wine.
It can be also useful for Winelib applications (and maybe
in future for some other parts of Wine) to show the X11
windows in Wine. My current version of XEmbed patch
and a simple test application that creates gtk button
inside Wine window is attached. Using this patch I can
display Gecko in the Wine window (now only in my test
application, but I'm working on integrating it with
MSHTML).
</p><p>
The way I want to do it is:
<ol>
<li> Wine application creates window of "_XEMBED" class</li>
<li> Embedding window can be done in two ways (as in specification):
<ul>
    <li> Wine application sends _WM_ATTACH_WINDOW message
        passing X11 Window (not yet implemented)<br />
    or</li>
    <li> Client window is created as a child window of Wine window</li></ul>
    </li>
<li> Window is displayed and Wine communicates with X11 window
    using XEmbed protocol</li></ol></p><p>

I know my patch needs some polishing and more implementations
(focus, activating, handling unmapping of window....), but I'd
like to know if the way I do it is proper? What needs to be done
for the first patch to be accepted?
</p></quote><p>

Mike Hearn pointed out a huge problem with doing this:</p>
<quote who="Mike Hearn"><p>
How does this work if the app wants to embed an X window as a child win32
window? We no longer map child win32 windows to child X windows since the
WM rewrite so there's nothing to embed into.
</p></quote>

<p>Jacek and Alexandre had a discussion on irc and it appears with more
work that xembed could be supported.  It seems like one of those things
you can't find out the answer to unless you try.
</p>
</section>
<section
        title="Video Driver Infrastructure"
        subject="qcap/avicap and driver models"
        archive="http://www.winehq.org/hypermail/wine-devel/2005/05/0756.html"
        posts="2"
        startdate="21 May 2005 00:00:00 -0800"
	enddate="22 May 2005 00:00:00 -0800"
>
<topic>Architecture</topic>

<mention>Rolf Kalbermatter</mention>
<mention>ReactOS</mention>

<p>Maarten Lankhorst wondered about how designing the 
driver infrastructure for his new video capture code:</p>
<quote who="Maarten Lankhorst"><p>

I implemented a driver model in qcap now, but avicap32 still uses my old 
#ifdef LINUX_VIDEODEV_H, since some people might be interested in 
writing capcreatecapturewindow, I think we should move out the drivers 
from qcap to our own vfwwine dll/driver, windows uses a similar model 
for it, as Rolf Kalbermatter pointed out in 
<a href="http://www.winehq.com/?issue=274#Video%20Capture%20in%20Windows">
http://www.winehq.com/?issue=274#Video%20Capture%20in%20Windows</a>
</p><p>
For the qcap drivers, I used some kind of COM model
<ul><code>
typedef struct capturefunctions {<br />
...<ul><code>
    Video_SetMediaType SetFormat;</code></ul>
...<ul><code>
    void *pMine;</code></ul>
} Capture;</code></ul>
</p><p>
First, it tries to initialise, and lets the constructor function fill 
this struct, then if something is needed, it just calls 
Capture->SetFormat(Capture->pMine, parameters..), this is the qcap 
implementation, but I'm sure that if I write some parts of it so it will 
be DirectShow indepent, it can be used by avicap and qcap, I'm not 
really interested in avicap, but in the very least 
capgetdriverdescription should use the same code as qcap, because 
writing the same twice would mean a huge overhead.
</p><p>
So basically, I'm just wondering what to do, should I go ahead with the 
separate driver dll or should I do something else?</p></quote>

<p>Eric Pouech described how the driver infrastructure should
work:</p>
<quote who="Eric Pouech"><p>
drivers should be written as follows:
<ol>
<li> since it's wine specific, its name should start with wine (so winevfw or 
whatever)</li>
<li> the driver shall be a driver for both avicap and qcap DLL</li>
<li> interfaces to the driver should be the regular windows' ones (fetch 
information on avicap driver interface, as well as DShow driver interface - DDK 
info on the Web are your friend)</li>
<li> a single driver shall be provided for all possible unix interfaces (you can 
start with v4l of course) and shall</li></ol></p><p>

Item #2 has the following benefits:
<ul>
<li> it centralizes access to a given kernel resource in a single DLL</li>
<li> some information between the two types of interfaces may have to be shared</li>
</ul></p><p>

Item #3 has the following benefits:
<ul>
<li> you can test the qcap, avicap... DLLs under windows with *real* drivers and 
see if it works</li>
<li> we can share all the qcap, avicap... DLLs with the folks from ReactOS</li>
<li> some braindead programs may look at some (real driver) interfaces for their 
own use</li>
</ul></p><p>

Item #4 has the following benefits:
<ul>
<li> it's up to the driver, at runtime, to find out and setup the existing physical 
devices</li>
<li> you don't need to have fancy settings (configuration...), which most users 
won't understand</li>
</ul></p><p>
 BTW this is what has to be done for the audio/midi drivers (where 1, 2, 3 are 
 already done, and 4 is missing)</p></quote>
 
</section>
<section
        title="Unaligned mmap()"
        subject="[RFC] upmfs - page-unaligned mmap() for Linux"
        archive="http://www.winehq.org/hypermail/wine-devel/2005/05/0763.html"
        posts="1"
        startdate="21 May 2005 00:00:00 -0800"
>
<topic>Memory Management</topic>

<p>Dan Aloni of <a href="http://www.colinux.org/">coLinux</a> fame 
wrote to wine-devel about an idea he had concerning unaligned mmap:</p>
<quote who="Dan Aloni"><p>

I'd like to bring this to your attention and review, hopefully to spawn 
some constructive discussions. The code was a result of experiments I've 
been doing lately concering some new idea not especially related to 
WINE.
</p><p>
To quote myself from 
<a href="http://wiki.winehq.org/UnalignedMmap">http://wiki.winehq.org/UnalignedMmap</a>:

</p><p> 
Large majority of PE executables have sections that are page-aligned in 
memory but not in the PE file image. Linux's mmap() doesn't support 
mappings that are not aligned to page boundries with regard to file 
offsets. Currently it forces wineserver to fake mmap() by allocating 
anonymous pages and using read() to load the sections.
</p><p>
In dlls/ntdll/virtual.c, comment above map_file_into_view() says: 
"Linux kernels before 2.4.x can support non page-aligned offsets, as 
long as the offset is aligned to the filesystem block size. This is a 
big performance gain so we want to take advantage of it."
</p><p>
These days are long gone, we are now using Linux 2.6, and it doesn't 
support unaligned mmap().
</p><p>
Enter upmfs. This simple kernel module exports this function to 
userspace using '/proc':
<ul><code>
    * int mmap_offset(int fd, unsigned long offset);</code></ul></p><p>

Given an fd and an offset, a new fd is returned. Using mmap() on that new 
fd, the mapping will be aligned with the given offset, which can be smaller 
than PAGE_SIZE.
</p><p>
A wineserver implementation can check the existance of that module in the 
kernel (i.e "/proc/upmfs/interface" exists) and use its functionality.
</p><p>
The code for the upmfs source package 
<a href="http://www.winehq.com/hypermail/wine-devel/2005/05/att-0763/01-upmfs.tar.gz">is
attached</a> to this post.
</p></quote>


</section>
<section 
	title="Cabinet.dll: File Creation Interfaces" 
	subject="Work being done at the File Creation Interface of Cabinet.DLL"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/05/0749.html" 
	posts="2"
	startdate="21 May 2005 00:00:00 -0800"
>
<topic></topic>
<p>Gerold Wucherpfennig wanted to let everyone know he was working on
cabinet.dll:</p>
<quote who="Gerold Wucherpfennig"><p>
I just want to let you know that I'm working at the FCI functions of
CABINET.DLL. I had a look at this a few years ago, but gave up soon.
Two weeks ago I made a new attempt and next weekend I should
be able I post a patch which implements all FCI functions and
will work with spanning cabinets. Real file compression will not be
implemented at that point of time as I still have to write missing parts
and complete error handling first. This work took me longer than
expected so let's see if I can adhere to my schedule.
</p></quote>

</section>
<section
        title="DWARF2 Debug Support"
        subject="Re: dwarf2 support progress step 4"
        archive="http://www.winehq.org/hypermail/wine-devel/2005/05/0742.html"
        posts="4"
        startdate="21 May 2005 00:00:00 -0800"
>
<topic>Debugging</topic>
<p>Rapha&#235;l Junqueira did a lot of work to enable Wine's debugger to
understand the DWARF2 debug format.  Mike Hearn wondered exactly how
Wine would benefit,
<quote who="Mike Hearn">
What exactly will this work allow - will winedbg get better as a result?
At the moment backtraces already give function information...</quote></p>

<p>Lionel Ulmer replied,
<quote who="Lionel Ulmer">
>From what I know, this will allow to build Wine without the -gstabs+
compilation flag. Ie Wine will understand the new (standard) DWARF2
debugging symbols.
</quote> </p>

<p>Rapha&#235;l confirmed that's the case:</p>
<quote who="Raphael Junqueira"><p>
dwarf2 debug format is the standard format since gcc3 (and dwarf3 format which
is a dwarf2 extension already specified so gcc4/5 may use it).
</p><p>
Stabs format (use when -gstabs+ option is used) is only supported (without 
any evolution) for backward compatibility with olders debuggers.
</p><p>
If you want to get maximum debug info of recent gccs ou must use dwarf2 (and 
prepare for the future when stabs format won't be supported)
</p></quote>

</section>
<section 
	title="Standalone Tests" 
	subject="question about standalone tests"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/05/0825.html" 
	posts="4"
	startdate="24 May 2005 00:00:00 -0800"
>
<topic>Testing</topic>
<mention>Dan Kegel</mention>

<p>
Kees Cook wanted to know why some changes were made to some tests he
submitted:</p>
<quote who="Kees Cook"><p>
Hi!  My crypt32 protectdata tests were just added to CVS (thanks!) but
they were added without the <tt>#ifndef STANDALONE</tt> stuff that exists in the
recommended example from the lzexpand test code.  The steps here:
<ul><a href="http://www.winehq.com/site/docs/wine-devel/testing-windows">
http://www.winehq.com/site/docs/wine-devel/testing-windows</a></ul>
don't have a method for doing the build with the free-of-charge windows
CLI compiler (which the "STANDALONE" stuff works fine with).
</p><p>
Is there some new way to build standalone tests, or should I send a
patch for re-including the #ifndef STANDALONE stuff for the tests?
</p></quote>

<p>Alexandre explained how tests could be built as standalone without
the #ifndef:</p>
<quote who="Alexandre Julliard"><p>

You should be able to build by simply copying over wine/test.h, it's
supposed to compile with MSVC too. If it doesn't this should be
fixed. There's no reason to add special magic in every test file for
that.</p></quote>

<p>Kees thought the lz tests should be updated as well since they're
frequently cited as an example of how to create tests.  Dan Kegel 
found some problems with copying wine/test.h and Alexandre promptly submitted
some changes to fix it.</p>
</section>
<section 
	title="MSI Dialogs" 
	subject="msi dialogs, events and office 2003"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/05/0899.html" 
	posts="1"
	startdate="26 May 2005 00:00:00 -0800"
>
<topic>MSI</topic>
<mention>CodeWeavers</mention>
<mention>Mike McCormack</mention>

<p>The work on MSI has been ongoing for a while now.  Aric Stewart and
Mike McCormack gave nice presentation at WineConf about getting involved and
how to go about doing work on it.  After some discussion this week,
Aric dropped a large patch and announced:</p>
<quote who="Aric Stewart"><p>
We have been concentrating alot of effort on Office 2003 and 
specifically on getting office 2003 to install and come up properly. We 
would love to work more directly with you and the whole Wine community 
in this goal.
</p><p>
With this patch I have enabled the dialog code that Mike has put into 
Wine and started a basic structure for handling ControlEvents sent to 
and from various dialog controls. Alot of this code is still pretty 
hacky and incorrect but the basic functionality and structure is there. 
It also should allow you to actually start installing Office.  With the 
current CVS tip Office2003 fails to install due to actions relating to 
MSXML failing but that is where our effort is now focused.  You can get 
around that by changing the ACTION_ProcessExecSequence(package,FALSE) in 
ACTION_ExecuteAction() to ACTION_ProcessExecSequence(package,TRUE), then 
at least Office 2003 will be able to install its basic functions and 
come up.
</p><p>
We here at CodeWeavers are constantly trying to work closer with the 
Wine community.  I am bad about keeping up on wine-devel, so you can 
always e-mail me directly with MSI related things, and i know Mike 
McCormack and a number of other are very good at keeping up on the 
mailing list. I also hang out in the irc channel quite a bit.
</p><p>
With some work and some luck we should be able to get office 2003 
looking pretty good.
</p></quote>


</section>
<section 
	title="New Wine Doc Requirements" 
	subject="Winedocs and Po4a dependencies"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/05/0895.html" 
	posts="1"
	startdate="26 May 2005 00:00:00 -0800"
>
<topic>Documentation</topic>
<mention>cvs</mention>

<p>
The recent move of the docs to SourceForge along with the new 
internationalization changes might have raised the barrier to 
entry a bit.  Francois Gouget dropped an email this week outlining
some of the changes and how things have changed:</p>
<quote who="Francois Gouget"><p>
For the Wine project we are trying to make it as easy as possible for 
Wine contributors to modify and rebuild the Wine documentation. The Po4a 
dependencies have caused some concern in this regard: for each 
dependency the contributor will have to track down which package to 
install for his distribution and this makes the initial setup 
significantly harder.
</p><p>
Po4a being not very widespread we have checked it in the Winedocs CVS 
(http://cvs.sourceforge.net/viewcvs.py/wine/docs/). But Po4a has quite a 
few dependencies so this does not help very much. So now we are hoping 
to make it possible to reduce the number of po4a dependencies. Here is 
the list I came up with, together with some notes for each of them:
<ul>

  <li>Locale::gettext (perl module)<br />
    Needed by po4a for localization.<br />
    Provided by liblocale-gettext-perl on Debian, perl-Locale-gettext on 
Mandrake and Fedora Core(DAG), perl-gettext on SUSE.
<br /><br />
    Would you be open to a patch that acted as a wrapper around 
Locale::gettext so that po4a would continue to work untranslated if that 
module was missing?<br />
    The idea we would add a 'Po4aGettext' module that would export 
gettext() and dgettext() functions. These would try to load 
Locale::gettext in an eval function and use it if that succeeds. 
Otherwise the Po4aGettext would simply return the untranslated strings. 
The only changes to the other Po4a modules would be replacing 'use 
Locale::gettext' with 'use Po4aGettext'.</li>


  <li> Text::WrapI18N (perl module)<br />
    Pure perl (so easy to check in) but depends on Text::CharWidth which <br />
is not pure perl.
    Provided by libtext-wrapi18n-perl on Debian. Found no RPM packages 
providing it.<br /><br />

    Text::WrapI18N was not used in po4a 0.16.2. I initially thought it 
was used to wrap the text being output to the .po and .sgml files but in 
fact it seems to only be used to print messages, warnings and errors. 
Why is it needed? Doesn't a simple print work fine?</li>


  <li> Term::ReadKey (perl module)<br />
    Provided by libterm-readkey-perl on Debian, perl-Term-ReadKey on 
Mandrake and Fedora Core(DAG), perl-TermReadKey on SUSE.<br /><br />

    This module is used to determine the size of the terminal. This 
information is then used by the wrap functions.</li>


  <li> SGMLS (perl module)<br />
    Needed by po4a to interface with the nsgmls parser.<br />
    Pure perl (so easy to check in).<br />
    Provided by libsgmls-perl on Debian, perl-SGMLSpm on Mandrake and 
Fedora Core, perl-SGMLS on SUSE.<br /><br />

    This is an essential part of po4a. The easiest way to remove this 
dependency would be to check it into the Winedocs repository. So no 
action needed on the Po4a side.</li>


  <li> nsgmls (command line tool)<br />
    Needed by po4a to parse the Sgml files.<br />
    Provided by sp on Debian, sgml-tools or openjade on Mandrake and 
Fedora Core, opensp on SUSE.<br /><br />

    This is an essential part of po4a. So it will have to remain as a 
dependency which is reasonable.</li></ul>


</p></quote>
</section></kc>
