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

<title>Wine Traffic</title>

<author contact="http://www.theshell.com/~vinn">Brian Vincent</author>
<issue num="277" date="03 Jun 2005 00:00:00 -0800" />
<intro> <p>This is the 277th issue of the Wine Weekly News publication.
Its main goal is to hate budgeting. 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="218" size="765" contrib="87" multiples="44" lastweek="39">

<person posts="12" size="36" who="Mike Hearn" />
<person posts="12" size="31" who="Dimi Paun" />
<person posts="10" size="26" who="Alexandre Julliard" />
<person posts="9" size="29" who="Robert Shearman" />
<person posts="8" size="21" who="Andreas Mohr" />
<person posts="6" size="25" who="Brian Vincent" />
<person posts="6" size="19" who="Uwe Bonnes" />
<person posts="6" size="17" who="Mike McCormack" />
<person posts="5" size="54" who="Ivan Leo Puoti" />
<person posts="5" size="19" who="Andrew Neil Ramage" />
<person posts="5" size="16" who="Detlef Riekenberg" />
<person posts="4" size="22" who="Michael Lin" />
<person posts="4" size="13" who="Joris Huizer" />
<person posts="4" size="13" who="Jesse Allen" />
<person posts="4" size="12" who="Ivan Pechorin" />
<person posts="4" size="12" who="Francois Gouget" />
<person posts="3" size="16" who="Richard Cohen" />
<person posts="3" size="14" who="Michael Jung" />
<person posts="3" size="12" who="Pavel Troller" />
<person posts="3" size="10" who="Dmitry Timoshkov" />
<person posts="3" size="10" who="J. Grant" />
<person posts="3" size="9" who="Jeremy White" />
<person posts="5" size="14" who="Marcus Meissner" />
<person posts="3" size="8" who="Stefan D&#246;singer" />
<person posts="3" size="8" who="Ed Mack" />
<person posts="3" size="8" who="Ivan Gyurdiev" />
<person posts="3" size="8" who="Jonathan Wilson" />
<person posts="3" size="8" who="Stefan D&#246;singer" />
<person posts="3" size="7" who="Christian Costa" />
<person posts="3" size="7" who="gslink" />
<person posts="3" size="7" who="Lionel Ulmer" />
<person posts="3" size="6" who="Dimi Paun" />
<person posts="2" size="9" who="Chuck Hall" />
<person posts="2" size="8" who="Eric Frias" />
<person posts="2" size="7" who="David =?iso-8859-1?q?G=FCmbel?=" />
<person posts="2" size="7" who="Michael Stefaniuc" />
<person posts="2" size="7" who="Eric Pouech" />
<person posts="2" size="7" who="Scott Ritchie" />
<person posts="2" size="6" who="Stephen Torri" />
<person posts="2" size="6" who="Eugene Aksenov" />
<person posts="2" size="6" who="Dan Kegel" />
<person posts="2" size="5" who="Travis Watkins" />
<person posts="2" size="4" who="Paul Vriens" />
<person posts="1" size="24" who="James Hawkins" />
<person posts="1" size="4" who="Eric Pouech" />
<person posts="1" size="4" who="Francois Gouget" />
<person posts="1" size="4" who="Chris Morgan" />
<person posts="1" size="4" who="=?ISO-8859-1?Q?Alex_Villac=ED=ADs_Lasso?=" />
<person posts="1" size="4" who="MagicMan" />
<person posts="1" size="4" who="Stefan Leichter" />
<person posts="1" size="4" who="(wino)" />
<person posts="1" size="3" who="Ulrich Czekalla" />
<person posts="1" size="3" who="Paul van Schayck" />
<person posts="1" size="3" who="Josef Drexler" />
<person posts="1" size="3" who="Martin Fuchs" />
<person posts="1" size="3" who="Chris Morgan" />
<person posts="1" size="3" who="Jonathan Ernst" />
<person posts="1" size="3" who="Dag Wieers" />
<person posts="1" size="3" who="Hans Kristian Rosbach" />
<person posts="1" size="3" who="Joseph Garvin" />
<person posts="1" size="3" who="Stefan =?utf-8?q?D=C3=B6singer?=" />
<person posts="1" size="3" who="Tom Wickline" />
<person posts="1" size="3" who="Christoph Frick" />
<person posts="1" size="3" who="Dustin Navea" />
<person posts="1" size="3" who="Wesley Parish" />
<person posts="1" size="3" who="Antoine Chavasse" />
<person posts="1" size="2" who="Kuba Ober" />
<person posts="1" size="2" who="Jacek Caban" />
<person posts="1" size="2" who="Evan Deaubl" />
<person posts="1" size="2" who="Vitaliy Margolen" />
<person posts="1" size="2" who="Fernando Chmilelewsky" />
<person posts="1" size="2" who="Mike Hearn" />
<person posts="1" size="2" who="Steven Edwards" />
<person posts="1" size="2" who="(chsoft)" />
<person posts="1" size="2" who="Rein Klazes" />
<person posts="1" size="2" who="Jakob Eriksson" />
<person posts="1" size="2" who="Juan Lang" />
<person posts="1" size="2" who="Troy Rollo" />
<person posts="1" size="2" who="Gregory M. Turner" />
<person posts="1" size="2" who="Daniel Kegel" />
<person posts="1" size="2" who="Vitaliy Margolen" />
<person posts="1" size="2" who="Vincent B&#233;ron" />
<person posts="1" size="2" who="(jet)" />
<person posts="1" size="2" who="Gerald Pfeifer" />

</stats>
<section 
	title="News: Summer of Code, Linux Mag article" 
	subject="News"
	archive="http://wiki.winehq.org/SummerOfCode"
	posts="2"
	startdate="28 May 2005 00:00:00 -0800"
	enddate="03 Jun 2005 00:00:00 -0800"
>
<topic>News</topic>
<mention>Jason</mention>
<mention>News</mention>

<p>
A big announcement came out of Google this week.  They're sponsoring
a <i><a href="http://code.google.com/summerofcode.html">Summer of Code</a></i> 
project for students to spend the summer writing open source software.
The amount of impact this might have could be phenomenal.  Right now 40
different projects are represented, including Wine (we were one of the first
6 though!)  </p><p>

It works like this: students will receive $4500 for completing their
project.  The sponsoring organization will receive an additional $500.
Up to 200 individuals will get sponsorship making the grand total
$1,000,000 being invested by Google.  That's a pretty significant number.
Check out Google's 
<a href="http://code.google.com/summfaq.html">participant FAQ</a> for
details and eligibility requirements.  </p>

<p> For anyone wanting to be involved, we've put together some resources
to help you figure out what to work on.  There's no shortage of projects,
so check out the 
<a href="http://wiki.winehq.org/SummerOfCode">SummerOfCode wiki page</a>
and fill out 
<a href="http://code.google.com/soc_application.html">an application</a>.
Submissions are due by June 14th.  The Wine team is really looking forward to
working with everyone on projects!</p>

<p>In other news, there's an interesting article over at Linux Mag written by 
Jason Perlow
titled <i>"<a href="http://www.linux-mag.com/content/view/1974/2303/">A Mile
in IT's Shoes</a>"</i>.  It's a pretty good read and pretty much dead on.
CrossOver Office happens to be mentioned, but certainly isn't the focus of
the article.</p>
</section>
<section 
	title="Wine on Solaris"
	subject="Wine on Sparc"
	archive="http://www.winehq.org/hypermail/wine-devel/2005/06/0013.html" 
	posts="15"
	startdate="23 May 2005 00:00:00 -0800"
	enddate="02 Jun 2005 00:00:00 -0800"
>
<topic>Ports</topic>
<p>Occasionally Wine gets ported to other architectures.  Wine should
be capable of running Windows executables on any x86 operating system
and should be able to run Winelib apps on everything else.  The reality
is, very few people try to do it and most of Wine's developers use Linux.
Therefore, support for other architectures can be spotty.  Chuck Hall
inquired a few weeks ago:</p>
<quote who="Chuck Hall"><p>

I have heard that people are using Wine on Solaris.  I would like to know
if they are using Wine on the SPARC version or the x86 version of Solaris?
</p><p>
There does seem to be code within Wine to have it run on SPARC machines,
but it currently does not seem to compile, at least on the Solaris
version.
</p><p>
I have attached a small patch that allows me to get throught the 'make
depend' section of the compile.  Since it is my first patch, please look
at and let me know what I did wrong :)
</p></quote>

<p>Eric Frias replied in reference to Chuck's patch:</p>
<quote who="Eric Frias"><p>
I'm using it on the Sparc version, with Solaris 7 and 8.  Winelib only, 
of course, none of the emulation stuff is going to work on Sparc.
</p><p>

Right now I'm using an old version of wine circa November 2004, and it 
needed a few minor fixes to work correctly.  I'm in the process of 
upgrading to the latest &amp; greatest, and unless there are major problems 
I plan on getting it working sometime this week.  In the past, upgrades 
haven't been too much of a problem.  When I get it working, I'll try to 
get my patches back to the wine-patches list promptly.
</p><p>
I posted my last batch of patches to wine-patches back on 2004-11-17, 
and I know some of them didn't make it into CVS.  I also saw some 
patches posted to one of the wine lists around 2005-05-07 by Robert 
Lunnon with titles like "Solaris Compatibility" that you might want to 
look at.  I don't know if his patches were for Sparc or x86, or if 
they've been accepted.
</p><p>
I'm not sure how to explain why this isn't working for you.  I know we 
compile with a version of gcc that is configured to use the GNU 
assembler and GNU linker from binutils.  Perhaps yours is using the 
native Solaris assembler, and it doesn't understand .previous?  The 
assembly portions might only compile correctly with the GNU assembler.
</p></quote>

<p>Chuck explained his toolchain:</p>
<quote who="Chuck Hall"><p>

When was the last time the Wine README was updated?  Using the GNU 
toolchain I get a few more warning messages during 'make depend' but it 
does work.  Gcc, gas, and gld need to be from the GNU toolchain, the rest 
seems to work as Solaris native.
</p><p>
You mentioned that you had patches for Wine on SPARC, would you mind 
sharing them or should I do a google search for them?
</p></quote>

<p>Robert Lunnon jumped in to talk about the specifics of different
pieces of the toolchain:</p>
<quote who="Robert Lunnon"><p>
I don't have a SPARC box so I haven't tested SPARC 
compatibility though the patches do handle some SPARC things. Since the API 
is the same all should work OK as far as syscalls go. 
Wine doesn't build out of the box though!, there are a couple of extra patches 
that you need to implement SYSV native threads on Solaris 10 or above and 
some stubs to make some other things work properly (like disabling the 
debugger and executing libs across a symlink containing a colon ).   I 
publish a kit of patches with each binary I publish but I haven't republished 
the binary since the latest putback, many of them have now been rolled into 
CVS wine and are redundant. Some patches may never get in because Alexandre 
already rejected them.  I think there are only one or two essential ones now. 
(send me an e-mail)
</p><p>
Good idea about the autoconf test for gas support, That's not hard to do, so  
I'll contribute this ASAP. Sun's as doesn't work (on x86 anyway) the operand 
orders are different to gas so it won't assemble as expected.
</p><p>
You don't need gnu ld at all, x86 Solaris ld works fine. My GCC is built to 
use gas + Solaris ld so I can use it to build kernel modules. Aside from 
libtool feeding it duplicate libraries in kde (which solaris ld doesn't like 
at all) I rarely have problems with that configuration. I'd recommend this 
gcc config.
</p><p>
Under x86 Solaris wine works pretty much on a Par with Linux, I even had a 
reported Success with Lotus Notes which was reported broken for Linux.
</p></quote>


<p>Eric said he would work on getting the latest Wine to build on Sparc
Solaris and mentioned he was slightly concerned about the new DLL import 
changes Alexandre committed a few weeks ago.  After he was done, he 
reported:</p>
<quote who="Eric Frias"><p>

It actually went more smoothly than I expected.  I've attached a patch 
with the minimal changes I needed to get 'notepad' running.  As you can 
see, I disabled winedbg, oleaut32, and dbghelp because they are missing 
some assembly bits, and they aren't strictly necessary for most winelib 
applications.  I haven't tried compiling or running anything big with 
this, so it may be missing a few patches... but it's a start.</p></quote>

<p>Chuck reported he was able to get the patch to work.  Eric happened
to be using Solaris 8, while Chuck was using 9.  As a result, Chuck
uncovered an issue:</p>
<quote who="Chuck Hall"><p>

Started to go through this and found something intresting.  lwp.h does
exist and is found, so HAVE_SYS_LWP_H is defined.  The test for
_lwp_create fails.  Looking a bit deeper I found that the lwp.h for
Solaris 9 is different from the one in Solaris 10 (which is what I am
using).  Based on this and something I read awhile ago, I believe that Sun
is attempting to phase out the lwp stuff on Solaris.
</p><p>
It looks like a workaround will need to be created for _lwp_create.  I
will look into this and see what is the "official" way to write the code
now, if any.  Also a workaround will need to be made for all other _lwp_*
calls that no longer exist.</p></quote>

<p>All in all, Wine looks to be usable on Solaris still, which is nice.</p>

</section>


<section 
	title="Copy Protection Status #1"
	subject="Copy Protection &amp; WINE"
	archive="http://www.winehq.org/hypermail/wine-devel/2005/05/0037.html" 
	posts="2"
	startdate="01 Jun 2005 00:00:00 -0800"
	enddate="02 Jun 2005 00:00:00 -0800"
>
<topic>Status Updates</topic>
<p>Jonathon Wilson (who must not read WWN since we've covered this
topic in the recent past) had three ideas for getting copy protection
working in Wine.  These are actually moot points since Ivan Leo Puoti
is actively working on this.  Still, for completeness, Jonathon asked:</p>
<quote who="Jonathon Wilson"><p>
 From what I understand, there are 3 ways to do copy protection in WINE (at 
least for copy protection that needs a kernel driver to work):
<ol>
 <li>Implement a WINE implementation of that kernel driver (in the same way 
various stock windows kernel drivers have been implemented). Problem with 
this is that there is a big DMCA risk (which is why AFAIK its been rejected)
</li>
 <li>Implement a fake NTOSKRNL that has just the entrypoints for accessing and 
loading copy protection drivers (the set of kernel calls needed by the copy 
protection drivers is only a very small subset of the total set of kernel 
calls and AFAIK none of them are hardware related)<br />
or </li>
<li>Implement a proper kernel driver loader (i.e. one that would sit in 
the windows kernel and do the same sort of thing as that ndiswrapper and 
that ntfs.sys loader do)</li></ol></p><p>

What is the current state of copy protection work for WINE?
Which of these 3 options do the developers intend to follow?
</p></quote>

<p>Ivan went through each approach:</p>
<quote who="Ivan Leo Puoti">
<p><i>[#1.]</i>
	<ul>This will never be done, apart from the DMCA it would require a new driver for each new build of 
every copy protection system in the world
	</ul></p>

<p><i>[#2.]</i>
	<ul>This is what I'm doing, the safedisc 1 driver works quite well with it, some ring 0 emulation is 
needed but that also works quite well and isn't much of an issue.
	</ul></p>

<p><i>[#3.]</i>
	<ul>This would be a real pain as it would mean implementing the windows binary driver interface in the 
kernel, it would also not be very portable.
	</ul></p></quote>


</section>
<section 
	title="Copy Protection Status #2"
	subject="safedisc stuff"
	archive="http://www.winehq.org/hypermail/wine-devel/2005/05/0055.html" 
	posts="6"
	startdate="01 Jun 2005 00:00:00 -0800"
	enddate="03 Jun 2005 00:00:00 -0800"
>
<topic>Status Updates</topic>
<mention>Mike Hearn</mention>

<p>In more up to date news regarding copy protection, Ivan gave an
update of exactly what he's working on.  He reached a significant 
milestone with Age of Empires 2:</p>
<quote who="Ivan Leo Puoti"><p>
I actually got this for the first time a few days ago, but I thought I
might as well share it as I think it's cool. AFAIK DMCA compliant code
has never got this far with safedisc 1.
<ul><a href="http://www003.portalis.it/115/download/aoe.png">
http://www003.portalis.it/115/download/aoe.png</a></ul></p></quote>

<p>The screenshot is rather anticlimatic - it simply shows the splash
screen for AoE2.  What's going on behind the scenes is
more interesting.  Ivan has implemented a minimal ntoskrnl.exe interface
that can load the real Safedisc driver shipped with the game.  So all
those no-cd cracks wouldn't be necessary for Safedisc v1 games.</p>

<p>Later Ivan sent an email about the actual code (which hasn't been
submitted yet):</p>

<quote who="Ivan Leo Puoti"><p>
Mike Hearn asked me to send the work in progress stuff, so 
<a href="http://www.winehq.com/hypermail/wine-devel/2005/06/att-0055/01-safedisc.tar.bz">here</a> it is.  
Some of it sucks (See QueryServiceStatus for the worst hack 
ever, that doesn't even usually work), but the design should be more or 
less ok. It needs lots of cleanup and optimisation.</p></quote>

<p>Stephen Torri ran into a problem and Andi Mohr explained what the errors
meant:
</p><quote who="Andreas Mohr"><p>
ntstatus.h:
<ul><code>
#define STATUS_NO_SUCH_DEVICE            0xC000000E<br />
#define STATUS_NO_SUCH_FILE              0xC000000F</code></ul></p></quote>

</section>
<section 
	title="Forking and Printing"
	subject="Winelib MFC app crashes after printing"
	archive="http://www.winehq.org/hypermail/wine-devel/2005/06/0013.html" 
	posts="3"
	startdate="01 Jun 2005 00:00:00 -0800"
	enddate="02 Jun 2005 00:00:00 -0800"
>
<topic>Fixes</topic>
<p>Eugene Aksenov ran into a printing problem with an app that
was ported with Winelib:</p>
<quote who="Eugene Aksenov"><p>
I have a small MFC app ported to winelib which uses MFC compiled 
with winelib. Really, it is just an App-Wizard generated application.
I always have a crash of the application after printing. The page 
is printed ok but after that the app crashes. 
</p><p>
I use LPD for printing and my command line from wine is 
'lpr -Pmyprinter'. I also try to print without MFC support 
i.e creating the printer DC by hand etc - the crash is the 
same, it follows EndDoc() call.
</p><p>
There is no crash like this at the same linux configuration using 
in a 'pure' Win32 simple application without MFC though the code 
for printing is the same. 
</p><p>
When i print to file, all is ok. So , my current workaround is 
printing to a temp file and then send the file to lpr.
</p><p>
I use RH9.0, wine20050419. My [spooler] section in config is the 
default from the wine installation. 
</p><p>
Did anybody meet a problem like that ? Is it MFC that has some 
impact here ? Thanks a lot for any hints.
</p></quote>

<p>Eric Frias recognized the issue and provided a patch:</p>
<quote who="Eric Frias"><p>
I've run into this bug &amp; fixed it.  I just was never confident enough in 
my fix to get around to submitting it.
</p><p>
The problem you're seeing is most likely because you have a C++ 
application.  When wine prints something via lpr, it forks off a child 
process to do the printing.  Instead of doing exec("lpr") as most other 
programs do, wine does a system("lpr"); exit();  The normal exit causes 
the child process to execute global destructors, which the 'exec' 
wouldn't.  If the global destructors free memory that is also used by 
the parent process (which is probably common), the parent process will 
quickly crash.
</p><p>
Try the attached patch and see if it fixes your problem.  I think it's 
mostly correct for linux, solaris, and hp.  We'd need to check the 
behavior of system() on other platforms to make sure it's consistent. 
On Solaris, it looks like there are circumstances when system() will 
invoke 'ksh' instead of 'sh', but I hope wine doesn't need to worry too 
much about that little detail.
</p></quote><p>

Eric's patch to printdrv.c looked like this:
<ul><code>
-&#160;&#160;&#160;&#160;system(psCmdP);<br />
+#if defined(__hpux) || (defined(__sun) &amp;&amp; defined(__SVR4))<br />
+&#160;&#160;&#160;&#160;execl("/usr/bin/sh", "sh", "-c", psCmdP, 0);<br />
+#else<br />
+&#160;&#160;&#160;&#160;execl("/bin/sh", "sh", "-c", psCmdP, 0);<br />
+#endif<br />
+&#160;&#160;&#160;&#160;/* If the exec fails, we'll just take our chances and exit */<br />
&#160;&#160;&#160;&#160;&#160;exit(0);
</code></ul></p>

<p>Eugene reported success with the patch,
<quote who="Eugene Aksenov">

Yes, this patch fixes the problem. Thanks for the description. I checked on linux only.
Perhaps, the patch is to be submitted.</quote></p>

</section>
<section 
	title="Summer of Code Announcement" 
	subject="Google Summer of Code"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/05/1010.html" 
	posts="42"
	startdate="31 May 2005 00:00:00 -0800"
	enddate="03 Jun 2005 00:00:00 -0800"
>
<topic>News</topic>
<mention>News</mention>

<p>Dan Kegel announced the Summer of Code program first:</p>
<quote who="Dan Kegel"><p>
Google is offering students summer stipends to contribute
to open source projects!
To qualify for a stipend, you have to submit a proposal by
June 14th, and the proposal has to be approved.
See http://code.google.com/summerofcode.html
</p><p>
It would be cool if the Wine project put together a list
of suggested projects for students to work on.
It would be like 
<a href="http://www.winehq.org/site/contributing#devel">
http://www.winehq.org/site/contributing#devel</a>
but perhaps with a bit more guidance, and oriented around
things the students can finish (and get past Alexandre!)
by September 1st.

</p></quote>

<p>It touched off a flurry of emails and ideas.  Even more was
discussed on IRC.  The end result was most of the ideas listed
on the <a href="http://wiki.winehq.org/SummerOfCode">wiki page</a>.
</p>
</section></kc>
