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

<title>Wine Traffic</title>

<author contact="http://www.theshell.com/~vinn">Brian Vincent</author>
<issue num="291" date="23 Sep 2005 00:00:00 -0800" />
<intro> <p>This is the 291st issue of the Wine Weekly News publication.
Its main goal is to fix scripts and hate the new pipermail interface less. 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="136" size="319" contrib="50" multiples="27" lastweek="33">

<person posts="8" size="11" who="rob at codeweavers.com (Robert Shearman)" />
<person posts="7" size="5" who="dimi at lattica.com (Dimi Paun)" />
<person posts="6" size="9" who="mike at codeweavers.com (Mike McCormack)" />
<person posts="7" size="9" who="stefandoesinger at gmx.at (Stefan D&#246;singer)" />
<person posts="6" size="7" who="andi at rhlx01.fht-esslingen.de (Andreas Mohr)" />
<person posts="6" size="5" who="kuba at mareimbrium.org (Kuba Ober)" />
<person posts="5" size="15" who="motub at planet.nl (Holly Bostick)" />
<person posts="5" size="11" who="lkcl at lkcl.net (Luke Kenneth Casson Leighton)" />
<person posts="5" size="10" who="oliver_stieber at yahoo.co.uk (Oliver Stieber)" />
<person posts="5" size="6" who="twickline at gmail.com (Tom Wickline)" />
<person posts="5" size="5" who="jrliggett at cox.net (James Liggett)" />
<person posts="4" size="7" who="infyquest at gmail.com (Vijay Kiran Kamuju)" />
<person posts="4" size="6" who="wino at piments.com" />
<person posts="4" size="6" who="mstefani at redhat.com (Michael Stefaniuc)" />
<person posts="4" size="3" who="lionel.ulmer at free.fr (Lionel Ulmer)" />
<person posts="4" size="3" who="dank at kegel.com (Dan Kegel)" />
<person posts="3" size="76" who="wine-devel at kievinfo.com (Vitaliy Margolen)" />
<person posts="3" size="37" who="maxy at rivero.com.ar (Maximiliano Curia)" />
<person posts="3" size="17" who="ivg2 at cornell.edu (Ivan Gyurdiev)" />
<person posts="3" size="3" who="frank.richter at gmail.com (Frank Richter)" />
<person posts="3" size="2" who="dmitry at baikal.ru (Dmitry Timoshkov)" />
<person posts="3" size="2" who="julliard at winehq.org (Alexandre Julliard)" />
<person posts="3" size="1" who="ivanleo at gmail.com (Ivan Leo Puoti)" />
<person posts="2" size="9" who="most at museresearch.com (Michael Ost)" />
<person posts="2" size="4" who="brian.vincent at gmail.com (Brian Vincent)" />
<person posts="2" size="4" who="bon at elektron.ikp.physik.tu-darmstadt.de (Uwe Bonnes)" />
<person posts="2" size="2" who="wine at electrozaur.com (Boaz Harrosh)" />
<person posts="1" size="3" who="jnewman at codeweavers.com (Jeremy Newman)" />
<person posts="1" size="3" who="peda at axentia.se (Peter Ekberg)" />
<person posts="1" size="2" who="cmorgan at alum.wpi.edu (Chris Morgan)" />
<person posts="1" size="1" who="dank at kegel.com" />
<person posts="1" size="1" who="stefandoesinger at gmx.at (Stefan D&#246;singer)" />
<person posts="1" size="1" who="a_villacis at palosanto.com (=?ISO-8859-1?Q?Alex_Villac=ED=ADs_Lasso?=)" />
<person posts="1" size="1" who="kimmo.myllyvirta at gmail.com (Kimmo Myllyvirta)" />
<person posts="1" size="1" who="wine-devel at shemesh.biz (Shachar Shemesh)" />
<person posts="1" size="1" who="erikd+wine at mega-nerd.com (Erik de Castro Lopo)" />
<person posts="1" size="1" who="wine at henkis.net" />
<person posts="1" size="1" who="fgouget at free.fr (Francois Gouget)" />
<person posts="1" size="1" who="pgr at arcelectronicsinc.com (paul)" />
<person posts="1" size="1" who="winehacker at gmail.com (Steven Edwards)" />
<person posts="1" size="0" who="navaraf at reactos.com (Filip Navara)" />
<person posts="1" size="0" who="jakov at vmlinux.org (Jakob Eriksson)" />
<person posts="1" size="0" who="rob at codeweavers.com (Rob Shearman)" />
<person posts="1" size="0" who="gvg at reactos.com (Ge van Geldorp)" />
<person posts="1" size="0" who="phil at newstar.rinet.ru (Phil Krylov)" />
<person posts="1" size="0" who="saulius2 at ar.fi.lt (Saulius Krasuckas)" />
<person posts="1" size="0" who="bjrobilliard at hotmail.com (Bryce Robilliard)" />
<person posts="1" size="0" who="wine.dev at web.de (Detlef Riekenberg)" />

</stats>
<section 
	title="News: Summer of Code Wrapup"
	subject="News"
	archive="http://programming.newsforge.com/programming/05/09/19/223211.shtml?tid=25&amp;tid=132"
	posts="2"
>
<topic>News</topic>
<mention>Newsforge</mention>
<mention>SpecOpsLabs</mention>
<mention>Slashdot</mention>
<mention>News</mention>

<p>Only because I don't want the next news item to get a real headline,
I'm going to give a link to Newsforge that 
<a href="http://programming.newsforge.com/programming/05/09/19/223211.shtml?tid=25&amp;tid=132">mentions Wine</a> in passing.  Google's Summer of Code has
wrapped up and Chris DiBona had a lot to say about the success of the program.
</p>

<p>Given the completely vaporous nature of SpecOpsLabs, I really hate
to give them any more publicity than they've already received.  However,
last week Slashdot published a story about a $10,000
<a href="http://archives.free.net.ph/message/20050921.093916.4717740b.en.html">challenge</a> 
being offered by the company.  The "challenge" itself seems to make 
absolutely no sense and riddled with enough holes to be unintelligible.
Speculation on wine-devel ranged from enthusiastic apathy to amazement
that the company was still around.</p>

</section>
<section 
	title="Docs Needed"
	subject="Documentation volunteer(s) needed"
	archive="http://www.winehq.com/hypermail/wine-devel/2005-September/040163.html"
	posts="16"
>
<topic>Documentation</topic>

<mention>Holly Bostick</mention>
<mention>WineHQ</mention>
<mention>Dimi Paun</mention>
<mention>cvs</mention>

<p>We need help fixing up some docs.  Alexandre asked for volunteers this
week:</p>
<quote who="Alexandre Julliard"><p>
As most of you probably know (at least those of you who managed to get
out of bed in time for my keynote ;-) we are supposed to release 0.9
real soon now.  We do have one remaining issue: the documentation
needs some major work. Not every bit of it is critical for the
release, but we need to fix at least the User's Guide to reflect the
recent configuration changes. Would anybody be interested in helping
with that?</p></quote>

<p>A quick look at 
<a href="http://www.winehq.com/site/documentation">Wine's docs</a> shows the 
three guides to be in varying condition.  The Developers Guide actually
isn't too bad.  The User Guide needs some attention.  The Winelib Guide,
well, it might even be doing more harm than good.  </p>
<p>Those three docs are written in SGML, which is quite similar to HTML.
We use the <a href="http://www.docbook.org">Docbook</a> schemas to
describe the contents.  In turn, we can use the Docbook utilities to
convert the SGML into whatever we want, such as PDF's, HTML, etc.  That
documentation used to live within the core Wine CVS tree, but we split
it out earlier in the summer.  Now it has its own CVS tree and Dimi Paun
has been making commits.  Tom Wickline described how to get to the docs:</p>
<quote who="Tom Wickline"><p>

To get the docs in a terminal run :
<ul><code>
cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/wine co -P docs
</code></ul></p><p>
When prompted for a password press the enter key.
A subdirectory named docs will be created. and you can edit to your
hearts content. ;)
</p><p>
Make sure you read over:
<a href="http://www.winehq.org/site/sending_patches">
http://www.winehq.org/site/sending_patches</a></p><p>

  I put DOCS: at the beginning of the subject when sending this way Dimi
  can easily pick it out.</p></quote>

<p>Then I sent a long email describing work I've already done.  It's
a little outdated, but it's a good starting point:</p>
<quote who="Brian Vincent"><p>

I started in on this about a year ago and there's a pretty good
outline to work from.  Some of the actual content is just plain wrong
now, but it's probably about 90% accurate.  There have been changes
the the DLL Overrides and Drive Settings part of Winecfg.  I'd also
consider this stuff to be a little light on the configuration side. 
For example, to configure just application settings you need to add an
app on the first tab of winecfg and then make the overrides on the
second tab.  I don't think this discusses how that per-app stuff is
done (it also affects Graphics.)

</p><p>
Last year I sent this to wine-devel talking about it:
</p><p>--------------------------------

</p><p>

For now, the biggest changes can be found in configuring.sgml  (which
translates into the "Configuring Wine" part of the guide.)  A diff is
available here:

 <ul><a href="http://www.theshell.com/~vinn/wine-user-guide.diff">
 http://www.theshell.com/~vinn/wine-user-guide.diff</a></ul></p><p>

However, this stuff is best looked at as a side-by-side comparison with
the existing docs.  You can find that here:

 <ul><a href="http://www.theshell.com/~vinn/wine-user-guide.html">
 http://www.theshell.com/~vinn/wine-user-guide.html</a></ul></p><p>

(Not having looked at Mike's recent patches, I'm sure this will soon be out
of date.  Things like drive detection are missing.  There's also parts that
I left undone: such as the printing config, an appendix listing reg keys would
be nice once we know what they all are.  Other parts probably need a
better explanation, such as font configuration.  Anything you notice missing
is probably worth telling me about, though it won't be hard to find lots of
mistakes.)
</p><p>

One of the big goals of all this is to reduce the amount of documentation
and outdated stuff.  Therefore, registry.sgml, printing.sgml, and fonts.sgml
have been somewhat merged into configuring.sgml.  fonts.sgml contained a
lot of outdated info in it that probably caused more confusion than helped.
</p><p>

Going forward, we have a lot of documentation in the User Guide about
downloading Wine, compiling Wine, CVS, etc; mostly stuff that's already
duplicated in some form or another on the web site.  I'd like to see as
much stuff like that removed from the User Guide as possible, we can
simply refer people to WineHQ for more info.  (I think the reason for the
duplication is that the website docs simply didn't exist when the User
Guide was written, now the website has superceded the User Guide.)
When it's all said and done we should be left with the following sections:
<ul> 
<li> Introduction</li>
 <li> Configuration</li>
 <li> Running</li>
 <li> Troubleshooting</li></ul>
</p><p>--------------------------------</p></quote>

<p>Holly Bostick sounded interested in working on it, but more help is
definitely welcome.  For example, the part about documenting the
various registry keys could be done in parallel.  </p>

</section>
<section 
	title="FreeDCE &amp; Wine"
	subject="freedce/win32 - making progress."
	archive="http://www.winehq.com/pipermail/wine-devel/2005-September/040194.html"
	posts="7"
>
<topic>RPC / COM / OLE</topic>
<mention>Mike McCormack</mention>

<p>Luke Leighton of Samba (and later Samba TNG) infamy has popped on and off 
wine-devel for several months.  Luke has tried to persuade Wine's developers
to use the <a href="http://sourceforge.net/projects/freedce">FreeDCE</a> code 
for RPC.  We actually covered this in the past and there's pretty
good explanation of the whole process in WWN
<a href="http://www.winehq.org/?issue=258#FreeDCE%20&amp;%20Wine%20&amp;%20DCOM">#258</a>.
Now, as you read the threads on wine-devel you'd probably be tempted to
take Luke's view that Wine is insane for duplicating all this work.  Well,
read Mike McCormack's response in that WWN issue - we're really not
reinventing a bunch of code.  The stuff Wine really needs happens at a
different level and there's nowhere to get that from.  Wine's DCOM only
very recently hooked into the actual RPC code.  In theory that means
wire-level compatibility could begin to take place.  </p>
<p>Now, a lot of Luke's ideas have sort of been taken with a grain of
salt.  It's one thing to ask others to port 250,000 lines of code to
another platform, it's another to prove that it's possible.  So
apparently Luke is trying to prove that not only can it be done, but
that it can be useful.  As Luke started down that road, he posted a
sort of roadmap:</p>
<quote who="Luke Leighton"><p>
what i'm going to try to do is take a shot at simply compiling
dcethreads - on win32.
</p><p>
if that _works_ (the tests pass) it'll be great - it will prove two
things: 1) that pthreads-win32 works 2) that the dce exception handling
will fly, on win32, and _that_ means pretty much zero (urk! let's hope!)
work.
</p><p>
for now.
</p><p>
my main goal: "GetItWorking(tm)".
</p><p>
i couldn't care less about binary compatibility for now: i want
"services" - i want srvsvcd, i want winregd, i want lsarpcd, i want
samrd - all compiled, all working, using TCP/IP.
</p><p>
i can then work on rewriting freedce's ntlmsspauth.so to be a DLL
(starting off as my favourite - a stub with username and password of
"test").
</p><p>
i can then work on writing an "ncalrpc" plugin transport (which is very
straightforward: a matter of filling in about 25 functions in a vector
table).
</p><p>
and also on a ncacn_np plugin transport.
</p><p>

"working" means that other people will then be able to focus on issues
like binary compatibility.
</p><p>
guys (wine team) i have to say this.  you were utterly insane to not use
freedce as your starting point - and i am still bewildered by you not
even looking at its source code (which is topologically identical in
almost all areas, to what you've created) or the opengroup's documentation.
</p><p>
i say that with the greatest of respect for what you've achieved without
freedce.
</p></quote>

<p>Then a few days later, he reported some success:</p>
<quote who="Luke Leighton"><p>
What i have working so far can be found at the freedce-devel
sf.net mailing list archives, and as of today, rpcd (the endpoint mapper
on port 135) works.
</p><p>
And also when i add a NamedPipes transport (ncacn_np) it will
be on \PIPE\epmapper, too.  that'll be a fun job.  no, really!
</p><p>
Tomorrow's job is to link the echo_server and test that, and if that
works, try the echo_client too.
</p><p>
If those work, then the free software community will have its own
DCE/RPC reference implementation running on win32.
</p></quote>

<p>So wait.. what could that mean for Wine?  Well, it's not exactly
clear to me.  Now that our DCOM uses the rpcrt4 library, it could hook
into rewritten functions to access Luke's work.  I have no idea if 
real-world applications need anything like that or not.  </p>

</section>
<section 
	title="WineD3D and DirectX7"
	subject="D3D7 -&gt; WineD3D"
	archive="http://www.winehq.com/hypermail/wine-devel/2005-September/040212.html"
	posts="5"
>
<topic>DirectX</topic>
<p>
Most modern games use DirectX 8 or 9, and the near-term
focus in Wine is to develop that area.  Those two versions are
relatively similar and can share a lot of functionality.  Wine's DX7
and earlier implementations don't share any code with the newer versions.
However, the plan that's been discussed is to develop a new library,
wined3d, and use it to implement DirectX 9 code.  From there, the existing
DirectX 8 code can be migrated to it.  Then DirectX 7 can be added, etc.
Now, the DirectX 9 code is really taking shape and it looks like migrating
DirectX 8 is in the works.  This week a thread took a bit of a tangent
and Oliver Stieber talked a little bit about DX 7 and wined3d.  Stefan
D&#246;singer apparently has worked on this a little and gave a quick
synopsis of where the scary monsters live:</p>
<quote who="Stefan Dosinger"><p>
I decided to give it a try without thinking for a long time, and I've made 
little progress: I've replaced the old OpenGL interface with a stub which is 
ready to take calls to WineD3D. I've noticed the following problems so far:
<ul>
<li> Headers: WineD3D depends on the d3d8 or d3d9 headers. I've made the check 
pass with d3d.h, but I had to copy a lot of definitions from d3d9types.h. The 
thing compiles without errors or warnings now, but there may be side effects 
I don't know for now.</li>

<li> Surfaces... You mentioned it, I think I don't need to explain anything 
here ;-)</li>

<li> Not a problem, but a suggestion: Does it make sense to have DirectDraw using 
WineD3D? Without direct access to the video memory it's slow, and DGA has 
permission problems. Using WineD3D here might make surfaces less trouble, and 
it could give better performance without needing rw access to /dev/mem.</li>

</ul></p></quote>

<p>Oliver didn't think the header issue would be much of a problem:</p>
<quote who="Oliver Stieber"><p>

Where there is a difference between d3d8 and d3d9 headers a new type is 
created WINED3DFOOBAR and put into include/wine/wined3dtypes.h, this 
should be easy enough to extend to d3d7.
</p><p>

p.s. the reason for intergrating with ddraw is so that X11Drv works properly 
with wined3d, this affects things like locking the mouse to a window in full 
screen mode and being able to Get and Release the DC for the surface.
</p></quote>

<p>Stefan followed up later by mentioning he was running into a lot of
problems.  </p>

</section>
<section 
	title="Wine &amp; WindowsCE"
	subject="Windows CE on Wine"
	archive="http://www.winehq.com/hypermail/wine-devel/2005-September/040161.html"
	posts="3"
>
<topic>Ports</topic>
<mention>Microsoft</mention>
<mention>ReactOS</mention>

<p>Pop quiz: how many times has Microsoft written the Win32 API?  Not one..
not two.. not three.. yup - four different times.  Imagine coming up with an
API and then being doomed to implement it four different times.  For those
wanting to keep  track, there's the short-lived Win32S, the Win32 of NT, Win32 
in Windows 9x, and the baby of the group, Windows CE.  As you can imagine,
there's no way for perfect compatibility.  (Have you seen the "Compatibility
Mode" offerings in Windows XP?  There's something positively evil lurking
in there.)  
</p><p>
Boaz Harrosh asked an interesting question this week, one that's 
surprisingly never come up in the past four years:</p>
<quote who="Boaz Harrosh"><p>
Ok, what do you guys think.

</p><p>
I have an Arm based machine Running Windows CE. Same machine also runs 
Linux...
</p><p>
Do you think it can be the same Wine codebase, implementing Both Win32 
API as well as WindowsCE API?
</p><p>
What areas must be rewritten (or not) ?<ol>
  <li>Loader</li>
  <li>HAL (is there an HAL in Wine)</li>
  <li>Debugging / exceptions</li></ol></p><p>

any thing else? Other CPU(s)?
</p><p>
What if I want to do the same but for WindowsCE x86?
</p></quote>

<p>Of course someone had already thought about it.  Filip Navara replied,
<quote who="Filip Navara">
We have already made this experiment once ... you can find info about it 
in the ros-dev (or ros-kernel) mailing list archives and skeletons of 
the two WinCE DLLs in the ReactOS SVN history 
(trunk/reactos/lib/commctrl and trunk/reactos/lib/coredll ... revision 
~14000). It was proved that to run simple WinCE/x86 programs all that is 
needed is to get the loader to accept the WinCE PE signature (which Wine 
used to ignore and probably still does) and have implementation of the 
DLLs...
</quote></p>

<p>Steven Edwards also had a tip,
<quote who="Steven Edwards">
I had to flip the subsystem ID of a WinCE test app using one of the
msvc build tools. My sample application just called a message box api.
I don't know if any more complex WinCE applications would work due to
threading and memory management differences.
</quote></p>

<p>Boaz began working on it and quickly noticed something very 
strange:</p>
<quote who="Boaz Harrosh"><p>
  Funny how Microsoft uses a totally different set of Headers for CE. 
Even the Wine-headers are closer to the original SDK than CE. The order 
of function is different, the macros, the styling. There is no 
resemblance, not even one name of one parameter. Just the Function name 
and the Header name. Its like they had a copyright problem and needed to 
write it from scratch.:)</p><p>
  Now for wine I will not do the same. I'll try to keep the same 
headers, and where there are ABI differences. Like calling convention 
parameter sizes.. I'll try to use a macro.</p><p>
  On the implementation side Linux is Linux is Linux so I guess that 
should work well. But it looks like The Win32 API was shifted around a 
bit so in CE functions don't sit in the same Dll's as they sit in Win32, 
and apps are linked differently. So spec files and Makefiles will have 
to be different.</p><p>

What I'm afraid of is the things I don't know, which is how x86 is Wine. 
And how separated is that from the rest of the code.</p></quote>

<p>Andi Mohr took a stab at why Windows CE appeared so foreign,
<quote who="Andreas Mohr">
Just an outrageously wild guess: OS/2?
Maybe the standard Windows headers were going back to the time where they
cooperated with IBM to create OS/2, so they decided to play it safe and create
a completely new header set that they would be able to reuse for their main
Windows tree in case IBM were to sue them in the very distant future?
The same goes for the actual CE source code, I guess.</quote>
</p>

</section>
<section 
	title="Finding Memory Leaks"
	subject="memory leak detection patch"
	archive="http://www.winehq.com/hypermail/wine-devel/2005-September/040218.html"
	posts="3"
>
<topic>Memory Management</topic>
<p>
Mike McCormack came up with a nice way to find memory leaks in 
Wine's code.  It needs to be adapted for each DLL to make use
of it and Mike did it for MSI:</p>
<quote who="Mike McCormack"><p>

This patch is written for MSI, but could be adapted to other code.  It 
keeps a linked list of allocated memory and removes free'd memory from 
the list.
</p><p>
It requires that you change all the HeapAlloc's or mallocs in a dll to 
msi_alloc (for example), but can detect unfree'd memory and invalid free's.
</p><p>
I have discovered quite a few problems in my own code with this patch, 
so hopefully somebody else will find it useful too.
</p></quote>

<p>Andi Mohr thought Valgrind would be better:</p>
<quote who="Andreas Mohr"><p>
First, thanks for fixing so many leaks!
</p><p>
I think that we should concentrate on making valgrind the default leak
detection method in Wine, however.
</p><p>
Reasons:
<ul>
<li> it catches many, many leaks <i>without any reprogramming effort</i></li>
<li> it catches many, many other problems</li>
<li> it has other tools which are very useful, too (cache profiling, ...)</li>
<li> it's so much better than any other "clever hack" that people come up with
  in 2 hours</li>
</ul></p><p>
Thus IMHO valgrind should work perfectly with Wine, and it should be the
first thing that pops up when people want to do things like this: IOW
it should be documented rather prominently which are some useful ways of
using it in combination with Wine.
</p><p>
OTOH we might want to put a safety net in place in case valgrind somehow
becomes impossible to use in combination with Wine, so maybe we should
investigate a second leak tracer, too.
</p><p>
Or am I completely mistaken here?
</p></quote>

<p>Mike thought his patch was just another, and in some ways better,
way to tackle the problem:</p>
<quote who="Mike McCormack"><p>
Valgrind is great, and I've used it before, but it's a little heavy duty 
for what I want at the moment.
</p><p>
The main disadvantages are:
<ul>
<li> it slows down Wine and programs running Wine. (Office 2003 install 
already takes a minute or so)</li>
<li> it doesn't differenciate between Wine leaking memory and a program 
running in Wine leaking memory</li>
<li> it requires a patched version of Wine to run</li>
<li> it isn't built into Wine (ie. I could ship this patch with minimal 
overhead, and have my users point out memory leaks)</li>
<li> it has issues following forks, and being run from scripts</li>
</ul></p><p>
The patch is not meant to replace valgrind, just to provide another way 
of finding problems in Wine code.</p></quote>
</section>
<section 
	title="Printing &amp; Acrobat Reader"
	subject="question about the status of the wine printing system"
	archive="http://www.winehq.com/hypermail/wine-devel/2005-September/040144.html"
	posts="3"
>
<p>Dan Kegel stumbled across an odd problem, one that fortunately has
a good workaround:</p>
<quote who="Dan Kegel"><p>

How much work is left before printing in Wine is
more or less working with most major applications
(like, say, Photoshop and Acrobat Reader)?</p></quote>

<p>Francois Gouget described why Acrobat Reader had problems,
<quote who="Francois Gouget">
I don't know much about printing, but as I was explained it, the problem 
is that Acrobat Reader uses a special EMF escape to directly send 
Postscript or something like it to the printer and that does not work 
right in Wine. As far as I know Acrobat Reader is the only application 
with this problem.</quote></p>

<p>Well, the solution seems to be to simply use the native Linux 
Acrobat Reader.</p> 

</section>
<section 
	title="Running Wine From Source Tree"
	subject="Running Wine from source tree"
	archive="http://www.winehq.com/hypermail/wine-devel/2005-September/040238.html"
	posts="5"
>
<topic>Build Process</topic>
<mention>cvs</mention>

<p>If you're working on Wine and have a lot of different versions
laying around, it might get confusing to actually install it.  Not
to mention the few extra minutes it takes to do a make install.  
James Liggett asked,
<quote who="James Liggett">
I'm doing a lot of testing, and I was wondering if I can run Wine from
within its source tree without having to reinstall it after every build.
If it can be done without conflicting with an existing installation of
Wine, how do I do it?</quote></p>

<p>Mike McCormack gave a quick recipe:</p>
<quote who="Mike McCormack"><p>
I have the attached script (exists at ~/bin/wine_envsetup) to set up my 
environment (assumes wine in ~/wine), but running ~/wine/wine will also 
work.</p><p>

You can set up a ~/.wine from the source tree using:
<ul><code>
./tools/wineprefixcreate --use-wine-tree .</code></ul>
</p><p>
Then add an alias to set up your environment to your ~/.bashrc, 
something like this:
<ul><code>
export OLDPATH=$PATH
alias winehq='. $HOME/bin/wine_envsetup'</code></ul>
</p><p>
You can then run 'winehq' to setup your environment.  I find this 
configuration useful to because I have multiple wine environments, so 
multiple ~/bin/*_envsetup scripts.  It points everything to the right 
place so that running 'wine' on the command line will run the wine 
binary from the setup I'm interested in, not a shell script.
</p><p>
Again, you don't need to go to all this trouble if you're happy to run 
the ~/wine/wine script in the source directory.

<ul><code>
#!/bin/sh<br />
# set up the Wine environment<br /><br />

CVSROOT=:pserver:cvs at cvs.winehq.org:/home/wine<br />
PATH=$OLDPATH:$HOME/wine:$HOME/wine/tools/winegcc<br />
WINESERVER=$HOME/wine/server/wineserver <br />
WINELOADER=$HOME/wine/loader/wineloader <br />
WINEPREFIX=$HOME/.cxoffice/default <br />
LD_LIBRARY_PATH=$HOME/wine/libs/unicode:$HOME/wine/dlls:$HOME/wine/libs/wine<br />
WINEDBG=$HOME/wine/debugger/winedbg <br />
WINEDLLPATH=$HOME/wine/dlls:$HOME/wine/programs <br />
export CVSROOT PATH WINESERVER WINEPREFIX LD_LIBRARY_PATH WINEDBG WINEDLLPATH WINELOADER</code></ul></p></quote>

</section>
</kc>
