<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>YokoZar's Writings &#187; Wine</title>
	<atom:link href="http://yokozar.org/blog/archives/category/wine/feed" rel="self" type="application/rss+xml" />
	<link>http://yokozar.org/blog</link>
	<description>A blog about Ubuntu, Wine, and the occasional other interest</description>
	<lastBuildDate>Wed, 24 Aug 2011 15:17:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Becoming a real Wine developer</title>
		<link>http://yokozar.org/blog/archives/302</link>
		<comments>http://yokozar.org/blog/archives/302#comments</comments>
		<pubDate>Wed, 24 Aug 2011 14:59:07 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=302</guid>
		<description><![CDATA[I began to feel the consequences of the impression I'd given.  "Well, we want a <em>real</em> developer."  Without thinking, I'd managed to frame my years of experience in precisely the wrong way.  All that integration work, application testing, knowledge of scripting languages and the deep internals of Ubuntu suddenly counted for nothing.  It didn't matter how much work I'd done or how many developer summits I'd been sponsored to: in this moment I was someone who didn't even write simple Wine conformance tests.]]></description>
			<content:encoded><![CDATA[<p>It was Thursday afternoon, a completely sensible hour, but for me I had been woken up by the call.  In my sleepy haze I hadn&#8217;t realized that this quickly turned into a surprise job interview.  I made the mistake of saying that, while I had worked plenty with Ubuntu packaging and scripted application tests, I hadn&#8217;t actually written any of Wine&#8217;s C code.</p>
<p>&#8220;Oh.&#8221;</p>
<p>I began to feel the consequences of the impression I&#8217;d given.  &#8220;Well, we want a <em>real</em> developer.&#8221;  Without thinking, I&#8217;d managed to frame my years of experience in precisely the wrong way.  All that integration work, application testing, knowledge of scripting languages and the deep internals of Ubuntu suddenly counted for nothing.  It didn&#8217;t matter how much work I&#8217;d done or how many developer summits I&#8217;d been sponsored to: in this moment I was someone who didn&#8217;t even write simple Wine conformance tests.</p>
<p>We talked some more, and I went back to bed to wake at midnight, technically Friday.  Too late and too early to go out, everything was quiet enough to get some real work done.  I thought about the earlier conversation, and while I hadn&#8217;t written C code since high school I decided to dive right back in and hack at Wine myself.  Within minutes I found a bug, and four hours later I had code not only proving it, but also fixing it for good.</p>
<p><strong>Test driven development</strong></p>
<p>Today&#8217;s Wine consists of two equally important parts: a series of <em>implementations</em> pretending to be parts of Windows, and an ever-growing suite of unit tests.  The implementations are straightforward once you know the right thing to do: if the waiter function in Windows&#8217; restaurant.dll asks for a tip, then ours needs to as well.  Similarly, the tests prove what the right thing actually <em>is</em>, on both Wine and Windows.  They help us answer weird questions, like if the Windows waiter still demands a tip with a negative bill.  Somewhere out there, there&#8217;s a Windows program that depends on this behavior, and it will be broken in Wine if we make the mistake of assuming Windows acts reasonably.</p>
<p>I asked a developer to recommend a DLL that needed better tests, picked a random C file in it, and started looking.  I soon found my target, a documented and complete implementation of a function with only partial tests. This code is already written, and believed working, in Wine.  I was supposed to write a bunch of tests that should pass in Wine.  That&#8217;s when I learned the function is already broken.</p>
<p><img src="http://yokozar.org/blog/content/awesome50.png" alt="Awesome Face" /></p>
<p><strong>The Wine Testbot</strong></p>
<p>Wine owes a lot to the late Greg Geldorp, an employee of VMware who originally created a Windows testbot for us.  Any developer can submit a test patch to it, and those tests will be run on multiple versions of Windows to make sure they pass.  It saves us the trouble of having to reboot into 10 different versions of Windows when hacking on Wine.</p>
<p>When I used the testbot to run my new tests, however, I found that while they passed on Wine they actually failed on Windows.  Since we&#8217;re supposed to do what Windows does, no matter how stupid, that meant two problems: my new tests were bad, and Wine had a bug.  Fixing the tests is simple enough &#8211; you just change the definition of &#8220;pass&#8221; &#8211; but this kind of unexpected failure can also inspire even more tests.  By the end of it I had 6 patches adding different tests to just one function, 3 of which were marked &#8220;todo_wine&#8221;.</p>
<p><strong>Fixing Wine</strong></p>
<p>While simply submitting tests would certainly be a useful contribution, I felt like I could do more.  &#8220;You found the mess, you clean it up&#8221; is an annoying cliché, but here it has a ring of truth to it: my recent experience writing these tests meant that I had become <em>the</em> world expert on this function.  At least, for the next few days, after which I planned on forgetting it forever.  That&#8217;s what good tests are for &#8211; they let us confidently ignore the internals of done code.  In the off chance we break it unintentionally, they tell us exactly what&#8217;s wrong.</p>
<p>And so I wrote what was supposed to be my final patch: one that fixed Wine and marked the tests as no longer todo.  In true open source fashion, I sent it to a friend for review, where he promptly informed me that, while my new tests were passing, I&#8217;d created a place where Wine could crash.  The solution is, unsurprisingly, yet more tests to see how Windows handles the situation (keeping in mind that sometimes Windows handles things by crashing).  This is typical in Wine development: your first attempt at a patch often results in mere discovery that the problem is harder to solve than you thought.</p>
<p><img src="http://yokozar.org/blog/content/awesome50.png" alt="Awesome Face" /></p>
<p><strong>The real world</strong></p>
<p>None of this actually matters, of course, unless the bug I&#8217;d fixed was actually affecting a real application that someone would want to run.  Did I actually fix anything useful?  I don&#8217;t know.  It&#8217;s not exactly easy to get a list of all Windows applications that rely on edge-case behavior of shlwapi.dll&#8217;s StrFromTimeInterval function, but at least Wine is more correct now.</p>
<p>Apparent correctness isn&#8217;t the end-all of software development, of course. It&#8217;s possible doing something seemingly correct in Wine can make things worse: if my initial version of a fix slipped in to the code, for instance, an application could go from displaying a slightly wrong string to flat-out crashing.  That&#8217;s why unit tests are just one part of software QA &#8211; you still need peer review of code and actual application testing.</p>
<p><strong>Part of something greater</strong></p>
<p>Incidentally, the whole experience reminded me of a blog post I had written over a year ago about <a href="http://yokozar.org/blog/archives/48" title="Modeling Wine development and Linux adoption">modeling Wine development</a>.  My model was telling me that what I had just done was a bit inefficient: I made a modest improvement to Wine, but it wasn&#8217;t directly inspired by a particular real world application.  Perhaps it would have been better had I tackled a more salient bug in a big name application, rather than polishing off some random function in string.c.  But it wasn&#8217;t random: another developer recommended this particular code section to me because it was missing tests, and he noticed this precisely because in the past some untested behavior in a similar function was breaking a real application for him.</p>
<p>This function is now done.  The coding was relatively simple by Wine standards &#8211; no need for expertise in COM, Direct3D, OLE, or any number of Windows conventions that O&#8217;Reilly writes entire books about.  Wine doesn&#8217;t need experts: it needs a lot of grunt work from people like me.  People willing to tackle one function at a time until by sheer attrition we end up with a test suite so exhaustive that everything can be simply guaranteed to work.  That&#8217;s how we win in the end.  That&#8217;s how real developers do it.</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/302/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Designing for Multiple Wines</title>
		<link>http://yokozar.org/blog/archives/271</link>
		<comments>http://yokozar.org/blog/archives/271#comments</comments>
		<pubDate>Thu, 10 Mar 2011 08:01:31 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=271</guid>
		<description><![CDATA[The solution to this is to have more than one version of Wine installed on the system, and have the system determine which version of Wine is best for the application.  This implies two different levels of usability - advanced users may want to configure and tweak which Wine runs which App, but mere humans won't even want to know such a thing exists.]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><a href="http://www.toothpastefordinner.com/index.php?date=032007"><img class="aligncenter" title="The computer demands a blog" src="http://www.toothpastefordinner.com/032007/the-computer-demands-a-blog.gif" alt="" width="550" height="330" /></a><strong></strong></p>
<p style="text-align: left;"><strong>The problem:</strong></p>
<p style="text-align: left;">Sometimes one version of Wine can run an application, but fail on others.  Maybe there&#8217;s a regression in the latest Wine version, or you&#8217;ve installed an optional patch that fixes one application but breaks another.</p>
<p style="text-align: left;">The solution to this is to have more than one version of Wine installed on the system, and have the system determine which version of Wine is best for the application.  This implies two different levels of usability &#8211; advanced users may want to configure and tweak which Wine runs which App, but mere humans won&#8217;t even want to know such a thing exists.</p>
<p style="text-align: left;">This is the reason why many people have created Wine <a title="Third party Wine applications" href="http://wiki.winehq.org/ThirdPartyApplications">front ends</a>: they worry about things like patches and registry hacks and native DLLs so that users won&#8217;t have to.  You just click a button for the application you want to install, put in the requisite disc or password, and it does all the shaman dances for you.  Codeweaver&#8217;s, the chief sponsor of Wine, stays in business through sales of <a title="Codeweavers products" href="http://www.codeweavers.com/products/">Crossover</a>, which is basically just a front end to a special version of Wine.</p>
<p style="text-align: left;">So, these front ends exist to solve some very real and important problems. But now we have a <em>new</em> problem, in that we might have more than one front end &#8212; playonlinux, winetricks, and others all need to deal with this too.  In true open source fashion, we need to work together and come up with a standard.</p>
<p style="text-align: left;"><a href="http://yokozar.org/blog/wp-content/uploads/2011/03/sharing.png"><img class="alignnone size-full wp-image-268" title="Sharing is Caring" src="http://yokozar.org/blog/wp-content/uploads/2011/03/sharing.png" alt="Sharing is Caring" width="300" height="300" /></a></p>
<p style="text-align: left;"><strong>My proposed solution:</strong></p>
<p style="text-align: left;">Distribution packagers like me make a separate package, say, wine-hotfixes.  This package replaces (on Ubuntu via dpkg-diversions) the /usr/bin/wine binary, moving the existing one to /usr/bin/wine-default.</p>
<p style="text-align: left;">The new /usr/bin/wine will pass everything to wine-default, unless it detects the environment variable WINEHOTFIXES is set to something other than null. If it is set (to, say WINEHOTFIXES=&#8221;6971,12234&#8243;), then the script will look in /etc/wine/hotfixes.d/ and /etc/wine/hotfixes.conf for alternative wine versions that might make it happy.  In the case of a partial match it will prioritize bugs in the listed order.</p>
<p style="text-align: left;">hotfixes.d will contain a series of config files, one for each alternative version of wine.  These could be installed manually, but generally they&#8217;ll come from special packages &#8212; say, a version of Wine built with a workaround for that <a title="Wine bug 6971" href="http://bugs.winehq.org/show_bug.cgi?id=6971">annoying mouse escape bug</a>.  Each file will give a path (say, /opt/wine-hotfixes/yokos-tweaked-wine) and which bugs it hotfixes.  hotfixes.conf can specify a list of bugs that the default Wine already fixes, as well as which bugs to ignore (eg that are probably fixed by every hotfix).</p>
<p style="text-align: left;">Start menu items (.desktop entries) can then work exactly as they do now, except they will have the WINEHOTFIXES environment variable set, generally as created by a front end.  If the user has no alternative wine versions, or no wine-hotfixes package, nothing different will happen and everything will still use the wine-default.  If the user upgrades Wine to a version that fixes all the worked around bugs, the default will be used again (forward-compatible) &#8212; all that&#8217;s needed is for the newer Wine package to ship an updated hotfixes.conf.</p>
<p style="text-align: left;">The beauty of this is that a front end can specify a list of bugs to workaround without actually having a ready hotfix &#8211; if needed that can be handled by someone else.  Similarly, the hotfixed Wines don&#8217;t actually need to know about which app they&#8217;ll be running, as wine-hotfixes will do all the matchmaking.  We also keep /usr/bin free, except for one added binary.</p>
<p style="text-align: left;"><strong>Wrapping it all up</strong></p>
<p style="text-align: left;">The real test of a design, of course, is if it can be any simpler.  With the above, we&#8217;ve got it down to a single configuration item depending on who&#8217;s using it &#8212; hotfixes.d for the packager, hotfixes.conf for a manual tweaker, and the WINEHOTFIXES environment variable for the front end author.</p>
<p style="text-align: left;">It is of course worth asking if we should be doing this at all.  Zero configurations are better than one, after all, and ideally one magic Wine package would run every application flawlessly.  But that&#8217;s what we&#8217;ve been trying for years now, and people keep feeling the need to write these front ends anyway &#8212; we&#8217;re clearly <em>not</em> doing well enough without them, so we might as well manage them and work together.  This way, at least everything is backwards <em>(and forwards) </em>compatible: environment variables mean nothing without wine-hotfixes, and if we ever do invent a perfect version of Wine all the applications installed by front ends will continue to work just fine.</p>
<p style="text-align: left;">That should wrap it up, unless I&#8217;ve missed something.</p>
<p style="text-align: left;"><img class="alignnone" title="Pool shot that sinks every ball" src="http://wine.budgetdedicated.com/offsite/poolshot.gif" alt="Pool shot that sinks every ball" width="333" height="190" /></p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/271/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running Internet Explorer 6 and 7 in Wine</title>
		<link>http://yokozar.org/blog/archives/236</link>
		<comments>http://yokozar.org/blog/archives/236#comments</comments>
		<pubDate>Wed, 28 Jul 2010 11:30:12 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=236</guid>
		<description><![CDATA[I introduced myself, and Brian quickly recognized that I could probably help him with a Wine problem.  He needed to run Internet Explorer 6 for the most benevolent reason of all: to prove to a client it didn't work and that they shouldn't bother trying to support it.]]></description>
			<content:encoded><![CDATA[<p>Recently I ran into <a title="Brian Behlendorf on Wikipedia" href="http://en.wikipedia.org/wiki/Brian_Behlendorf">Brian Behlendorf</a> (from Apache) at a conference on medical record systems.  Brian was there demoing a new open source protocol for medical record systems to securely send eachother patient records (<a title="NHIN Direct website" href="http://nhindirect.org/">NHIN Direct</a>).  Combined, we were the only two who weren&#8217;t doctors, vendors, bureaucrats, or hotel staff at the conference.</p>
<p>I introduced myself, and Brian quickly recognized that I could probably help him with a Wine problem.  He needed to run Internet Explorer 6 for the most benevolent reason of all: to prove to a client it didn&#8217;t work and that they shouldn&#8217;t bother trying to support it.</p>
<p><strong>Internet Explorer in Wine</strong></p>
<p>The good news is these days it&#8217;s very simple on the terminal.  On Ubuntu:</p>
<ul>
<li style="text-align: left;">Add the Wine Team PPA:<em><br />
sudo add-apt-repository ppa:ubuntu-wine/ppa</em></li>
<li style="text-align: left;">Install the wine1.2 and winetricks packages:<em><br />
sudo apt-get update &amp;&amp; sudo apt-get install wine1.2 winetricks</em></li>
<li style="text-align: left;">Run winetricks:<br />
<em>winetricks ie6 </em><strong>or</strong><em> winetricks ie7</em></li>
<li style="text-align: left;">Run IE:<em><br />
wine iexplore</em></li>
</ul>
<p><strong>Using the WINEPREFIX environment variable:</strong></p>
<p>Note that, just like in Windows, you cannot have both ie6 and ie7 at the same time, at least not in the same virtual C: drive.  Fortunately, it is easy to set up multiple wine folders (&#8220;prefixes&#8221;) for your version of IE to run.  We do this with the <em>WINEPREFIX</em> environment variable.</p>
<p><strong><em>WINEPREFIX=~/.wine-ie6 winetricks ie6</em></strong> to install ie6 into its own virtual C: drive<strong><br />
<em>WINEPREFIX=~/.wine-ie7 winetricks ie7</em></strong> to install ie7 into its own virtual C: drive<br />
<strong><em>WINEPREFIX=~/.wine-ie6 wine iexplore</em></strong> to run ie6<br />
<strong><em>WINEPREFIX=~/.wine-ie7 wine iexplore</em></strong> to run ie7</p>
<p>As an aside, Internet Explorer 8 doesn&#8217;t currently work in Wine, however once it does there will also be a winetricks ie8 for you to test with.</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/236/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Making Wine 1.2 Fresh</title>
		<link>http://yokozar.org/blog/archives/225</link>
		<comments>http://yokozar.org/blog/archives/225#comments</comments>
		<pubDate>Thu, 17 Jun 2010 09:34:12 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=225</guid>
		<description><![CDATA[But while we've already found and fixed hundreds of regressions, there are a whole mess of applications we still haven't tested.  Wine doesn't really have a QA team to handle this kind of thing - it's just you and me, folks.

So please, join the Platinum Regression Hunt.  It's as simple as running your applications in Wine and telling us if they don't work anymore.]]></description>
			<content:encoded><![CDATA[<p>Those of you who have been using the Wine 1.2 betas may have noticed it looks better.</p>
<p style="text-align: center;"><img class="alignnone" title="Old Wine Logo" src="http://yokozar.org/blog/content/wine-logo-2d-48px.png" alt="" width="30" height="48" /> is now<img class="alignnone" title="New Wine logo" src="http://yokozar.org/blog/content/wine-logo-3d-48px.png" alt="" width="48" height="48" /></p>
<p style="text-align: left;"><strong>Giving Windows applications their own Icon<br />
</strong></p>
<p style="text-align: left;">Today, however, I want to show you another kind of icon that until now has been represented by a boring default diamond with a question mark.</p>
<p style="text-align: center;"><img class="alignnone" title="Happy about the icons" src="http://yokozar.org/blog/content/ahhhhuuuu.gif" alt="" width="214" height="143" /><img class="alignnone" title="New exe and dll icons" src="http://yokozar.org/blog/content/exe-thumbnail-icons-example.png" alt="" width="214" height="143" /></p>
<p style="text-align: left;">The small numbers in the corner show the version of the program when it&#8217;s available.  This is a piece of metadata that Windows has supported for years, but since it&#8217;s not visible in the user interface no one&#8217;s really known about it.</p>
<p style="text-align: left;">The new icons will be available tomorrow in the next Wine 1.2 release candidate package from <a title="Wine on Ubuntu" href="http://www.winehq.org/download/deb">my PPA</a>.  My intention in Maverick is to include them by default, before Wine is even installed.</p>
<p style="text-align: left;"><strong>Working together</strong></p>
<p style="text-align: left;">I&#8217;ll be honest: Wine needs your help.  The above work was heavily based on community input (and code by Jan Nekvasil).  I&#8217;ve got some more visual and UI changes in store for Maverick as well, but what Wine really needs is help testing its release candidate.</p>
<p style="text-align: left;">We need to hunt down every application that worked perfectly in older versions of Wine and make sure they haven&#8217;t broken.  Literally millions of people will be using Wine&#8217;s 1.2 release for at least the next year, and if we allow even one major regression it&#8217;ll be the digital equivalent of <a title="Vuvuzelas on the Platinum Regression Hunt" href="http://www.vuvuzela-time.co.uk/wiki.winehq.org/PlatinumRegressionHunt">the vuvuzela</a>.</p>
<p style="text-align: center;"><img class="alignnone" title="Vuvuzela smiley" src="http://yokozar.org/blog/content/vuvuzela.gif" alt="" width="64" height="25" /><img class="alignnone" src="http://yokozar.org/blog/content/vuvuzela.gif" alt="" width="64" height="25" /><img class="alignnone" src="http://yokozar.org/blog/content/vuvuzela.gif" alt="" width="64" height="25" /><img class="alignnone" src="http://yokozar.org/blog/content/vuvuzela.gif" alt="" width="64" height="25" /><img class="alignnone" src="http://yokozar.org/blog/content/vuvuzela.gif" alt="" width="64" height="25" /></p>
<p style="text-align: left;">But while we&#8217;ve already found and fixed <em>hundreds</em> of regressions, there are a whole mess of applications we still haven&#8217;t tested.  Wine doesn&#8217;t really have a QA team to handle this kind of thing &#8211; it&#8217;s just you and me, folks.</p>
<p>So please, <a title="Platinum Regression Hunt" href="http://wiki.winehq.org/PlatinumRegressionHunt">join the Platinum Regression Hunt</a>.  It&#8217;s as simple as running your applications in Wine and telling us if they don&#8217;t work anymore.</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/225/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>A quick favor if you’re bilingual</title>
		<link>http://yokozar.org/blog/archives/221</link>
		<comments>http://yokozar.org/blog/archives/221#comments</comments>
		<pubDate>Fri, 16 Apr 2010 23:57:29 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=221</guid>
		<description><![CDATA[Long story short, these menu items can be translated, but with the exception of a couple of languages they aren't.  The translations are Ubuntu-specific at this point: they're neither handled upstream nor through Rosetta.  I was originally planning to get rid of all of them (more on this later), so I never converted them into the standard translation infrastructure.  But that's delayed until Wine 1.2 in some months, so for now what we have needs to be localized and I need to handle the translation manually.]]></description>
			<content:encoded><![CDATA[<p>Please, a quick favor.  If you&#8217;re using a foreign locale and install Wine, you&#8217;ll probably see this:</p>
<p><img class="aligncenter" title="Wine menu items to translate" src="http://yokozar.org/blog/content/Wine-menus-to-translate.png" alt="" width="604" height="138" /></p>
<p>I need the words above translated.</p>
<p>With the exception of a couple of languages they aren&#8217;t.  The translations are Ubuntu-specific at this point: they&#8217;re neither handled upstream nor through Rosetta.  I was planning to get rid of all of them (more on this later), so I never converted the menu items into our existing translation infrastructure.  But removing them is delayed until Wine 1.2 in some months, so for now what we have needs to be localized and I need to handle the translation manually.</p>
<p>Please post translations here or <a href="https://bugs.launchpad.net/ubuntu/+source/wine/+bug/386125">in this bug report</a>.  If you can do it in patch form that&#8217;s great, if not it doesn&#8217;t matter.</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/221/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Fixing a build failure</title>
		<link>http://yokozar.org/blog/archives/192</link>
		<comments>http://yokozar.org/blog/archives/192#comments</comments>
		<pubDate>Fri, 26 Feb 2010 03:14:16 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=192</guid>
		<description><![CDATA[This sort of collaboration is exactly what Open Source is about.  Everyone involved could just go to the same bug tracker and simply get to work - it didn't matter that all 6 of us were in different continents working for different companies on different projects.  Everything is laid bare, easy to see and thus easy to fix.]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted in a while, so I figured I&#8217;d just give a sample of the kinds of things I deal with as an Ubuntu developer.</p>
<p>When a Wine developer wants to implement support for playing mp3 files, the smart thing to do is to use a software library, in this case mpg123.  Wine is a good example of a large and still growing piece of software with a similarly expanding list of dependencies.</p>
<p>It&#8217;s my job to make sure all these bits work well together so that Wine can be built in a complete way for you &#8211; without mpg123, Wine would have to be built without full support for mp3s, and sound on some apps would simply break.  Sometimes this means packaging software that isn&#8217;t in the distribution yet.  Usually it means fixing bugs, and here we can see the true strength of the open source approach.</p>
<p><strong>It starts with a bug report</strong></p>
<p>I was ready to put out a Wine release with its new mpg123 support, but Wine wasn&#8217;t building on 64 bit.  This was a case where the mystery was more interesting because it was only partially broken: 32 bit worked perfectly.</p>
<p>I knew right away that it was probably an Ubuntu-specific issue, although other distributions (especially Debian) might also be affected.  I <a title="Wine bug - mpg123 not building" href="http://bugs.winehq.org/show_bug.cgi?id=20042">filed a bug</a> upstream to try and nail down the specifics.  Everyone shares their relevant expertise here: a Wine developer notes that it&#8217;s a mismatched symbol-header problem, I figure out the cause is Ubuntu&#8217;s unexpected use of 32-bit headers on 64-bit systems, a community member provides a temporary workaround patch, an mpg123 developer tells why things were the way they were and how Ubuntu+Wine was the first to expose this problem, and Alexandre Julliard says what he&#8217;d ultimately like as a best practice.</p>
<p>This sort of collaboration is exactly what Open Source is about.  Everyone involved could just go to the same bug tracker and simply <em>get to work</em> &#8211; it didn&#8217;t matter that all 6 of us were in different continents working for different companies on different projects.  Everything is laid bare, easy to see and thus easy to fix.</p>
<p><strong>Getting it done</strong></p>
<p>At the end of the day, getting the fix out to users is what actually matters.  It&#8217;s really disappointing when great code like mp3 support just doesn&#8217;t happens because of something silly like an out of date distribution library.</p>
<p>So, that&#8217;s the final step in the chain &#8211; the mpg123 developer puts out a new version of mpg123, and then I have to package that up and put it into the latest Ubuntu alpha.  This is where Launchpad&#8217;s ability to have a single bug exist against multiple packages becomes especially helpful: by <a title="Launchpad bug - Wine not building" href="https://bugs.edge.launchpad.net/ubuntu/+source/ia32-libs/+bug/522916">filing a launchpad bug</a> I could track the changes I had to make to all 3 packages (mpg123, ia32-libs, and then wine).</p>
<p><strong>Technical details for the interested</strong></p>
<p>It&#8217;s worth noting that this bug could have been prevented entirely if Ubuntu had proper multiarch support.  Multiarch means the ability to install 32-bit packages directly onto a 64-bit system, rather than having to use special separate 32-on-64 packages like ia32-libs.  Multiarch has been a slow, gradual redesign under development in Debian and Ubuntu for years now, and it just barely missed the Lucid cycle.</p>
<p>This leaves us with the current implementation, which can at best be described as &#8220;a tremendous hack.&#8221;  32-bit libraries from needed packages are manually added to a giant list.  Then they&#8217;re processed by a script and all thrown into one gigantic, 600+ megabyte package named ia32-libs.  This means that any program which needs 32-bit compatibility (such as Wine) has to depend on this massive source package, and any time a single component changes it needs to be manually updated.</p>
<p>However, ia32-libs contains only the library files, not the header files, so when you build a 32-bit application on 64-bit Ubuntu you&#8217;re actually building with the header files installed from the 64-bit version of the package.  This is normally fine, as most header files are identical across different architectures, however this wasn&#8217;t the case with mpg123.  So we were using a 32-bit library that had different symbols than the 64-bit header file, and the build then fails with symbol errors.</p>
<p>There are quite a few applications for 64-bit Ubuntu that need to make use of 32-bit libraries for various reasons, however Wine is by far the most dominant.  This makes me, the one responsible for Wine, also the official babysitter of ia32-libs and similarly broken packages.  Wine is special in a way, though, as unlike other applications there is no way to fix it by just making it 64-bit &#8212; Wine will always need 32 bit libraries in order to run 32 bit Windows applications, which will remain incredibly common for at least another decade.</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/192/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The future of Wine sound</title>
		<link>http://yokozar.org/blog/archives/178</link>
		<comments>http://yokozar.org/blog/archives/178#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:38:23 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=178</guid>
		<description><![CDATA[So, that's the plan - Wine will use a sound library.  And then we'll let them worry about actually talking to whatever sound system happens to be working best.  OpenAL is the smart choice here, for much the same reason that OpenGL was the smart choice for graphics.  We get Mac compatibility "for free" too.]]></description>
			<content:encoded><![CDATA[<p>Sound in Wine has been a big issue.  From a user&#8217;s perspective, it didn&#8217;t work well.  From a technical user&#8217;s perspective, there were 3 different drivers to choose from and none of them worked well.  From a developer&#8217;s perspective, no sound driver would ever work well.</p>
<p>Wine was a victim of the proliferation of sound drivers on Linux.</p>
<p style="text-align: center;"><img class="aligncenter" title="Linux Audio Jungle" src="http://yokozar.org/blog/content/linuxaudio.png" alt="" width="674" height="438" /></p>
<p>At one point, Wine had separate sound drivers for ARTS, ESD, OSS, JACK, and ALSA.  None of them worked right, even if the user could figure out how to configure Wine to use the &#8220;correct&#8221; one.  Subtle changes to each API and differences between distribution versions made matters even worse.</p>
<p>PulseAudio was supposed to be a solution to problems like this by being the one true Linux Sound System, but in some ways it made the problem worse.  Now Wine needed a separate PulseAudio sound driver, and no one wanted to write sound driver code since the whole thing was a big mess to begin with.  Worse, the most work had gone into making the ALSA driver better, and there were a few technical reasons why it seemed like a good choice to stick with ALSA and use it as a default.<strong>*</strong></p>
<p>So, the decision was made to go with ALSA and improve it a bit, and hope that PulseAudio&#8217;s ALSA-compatibility layer would work well enough.  That didn&#8217;t exactly happen &#8211; PulseAudio didn&#8217;t actually want to support some &#8220;abuses&#8221; of the ALSA API, as one dev put it.  Some users took to killing PulseAudio outright every time they wanted to use Wine.</p>
<p>Things got a bit political.  Was Wine at fault here, or PulseAudio?  Should Wine include a PulseAudio driver, even if it was poorly maintained?  What would the default be?  Also, what the <em>hell</em> were we gonna do about the Mac?</p>
<p><strong>The solution, which in retrospect is pretty obvious</strong></p>
<p>Wine wasn&#8217;t the only program facing this problem.  Anyone writing or porting a Linux game had to answer the question about how they would play sound &#8211; almost none chose to write 7 separate audio drivers.  Instead they all did the smart thing, and used a higher level library.</p>
<p>So, that&#8217;s the plan &#8211; Wine will use a sound library.  And then we&#8217;ll let <em>them</em> worry about actually talking to whatever sound system happens to be working best.  OpenAL is the smart choice here, for much the same reason that OpenGL was the smart choice for graphics.  We get Mac compatibility &#8220;for free&#8221; too.</p>
<p>Now, why didn&#8217;t this happen earlier?  Well, in fairness to Wine, OpenAL didn&#8217;t actually exist in a usable form until Wine already had sound drivers for a few years.  A similar thing happened with wikis and distributed version control systems &#8211; we eventually saw the light that <em>new</em> open source projects had been following for years, and the project is better because of it.</p>
<p><strong>*</strong> As I understand it, a lot of Windows programs expected to be very close to the hardware and at the time many users were having issues with PulseAudio latency.</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/178/feed</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>A brief summary of Wineconf 2009</title>
		<link>http://yokozar.org/blog/archives/171</link>
		<comments>http://yokozar.org/blog/archives/171#comments</comments>
		<pubDate>Mon, 16 Nov 2009 07:21:12 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=171</guid>
		<description><![CDATA[We're serious about a 1.2 release in the next few months.  As Alexandre said, "it's time".]]></description>
			<content:encoded><![CDATA[<p>In bullet point form.</p>
<ul>
<li>We&#8217;re serious about a 1.2 release in the next few months.  As Alexandre said, &#8220;it&#8217;s time&#8221;.</li>
<li>64 bit support will be the major new release goal.</li>
<li>For most people, having no regressions and working with way more apps than 1.0.1 did will be the actual feature they care about.</li>
<li>Users will need to make a new Wine installation to migrate from 32-bit to 64/32-bit capable.  It is left to me to figure out and code a humane way to present this.  This is also a convenient time to make their Wine folder case insensitive.</li>
<li>We&#8217;re giving up on separate Pulse/ALSA/OSS/Jack sound driver layers and instead doing the smart thing: passing everything to OpenAL.  Maarten Lankhorst will handle most of it.</li>
<li>Packagers like me will have to work out CJK font support for our respective distros.  Wine will need manual links to whatever font is actually provided by the distro when it&#8217;s in a CJK locale.</li>
<li>We need some help from Freedesktop.org for solving bug 10841.  Essentially we need a standard way of saying &#8220;hey reset the resolution when I&#8217;m done, even if I crash.&#8221; I was &#8220;volunteered&#8221; for the task of approaching the respective projects.</li>
<li>We need user help finishing up the Tahoma replacement font.  It&#8217;s still missing some glyphs for certain languages and some users report it as &#8220;ugly&#8221;.</li>
<li>VMware is an ally of Wine.  They use our test suite on Thinapp, and even contribute test fixes and new tests back to us.  Tests are just as good as &#8220;real&#8221; code.</li>
<li>We need more users to run git update and winetest daily (with their screens unlocked).</li>
<li>Alexander announced a new patch tracking system to prevent patches from getting lost in the nether (and for devs to know when a rejection occurs)</li>
<li>By far the largest concentration of wine developers is in the netherlands.  It has something to do with being below sea level, which means global warming is an ally of Wine as well.</li>
<li>Francois Gouget has promised to teach me every nuance to Winelib so that I can document it properly.</li>
<li>I need to update about 10 different wiki pages to give them more modern instructions, such as how to get a good backtrace (eg on Ubuntu you install wine1.2-dbg).  A recurring theme to this conference seemed to be that if it&#8217;s written in English and concerns the Wine project, it&#8217;s probably my responsibility at this point.</li>
<li>Owen is going to setup planet.winehq.org, since he&#8217;s done it before for another project.  There you&#8217;ll see my blog and a few others.  I might actually update more than once a month too!</li>
<li>Andre Hentschel is working on a Wine port to ARM.  I&#8217;ll see if I can get him a first generation Pandora (I had the misfortune of preordering two about a year ago, and they may actually arrive sometime next month).</li>
<li>Jeremy White wants help recognizing people who should come to wineconf.</li>
<li>I need to make a proper message box to indicate that Wine is loading immediately after a user opens an application (currently there can be about 5 seconds of nothing, resulting in either frustration or opening the application multiple times).  Wine should be sending the signals it needs (with xdg message) already, we just need to have the desktop listen to them.</li>
<li>I need to make a &#8220;Press&#8221; page for the website, including an email address for press@winehq.org which will probably direct to me possibly several others.  I&#8217;m curious how other projects have handled this &#8211; is it a good idea to have multiple press contacts?</li>
<li>All documentation needs to be moved to the wiki.  From there it shouldn&#8217;t be too hard to setup a wiki-&gt;pdf-&gt;docbook/xml conversion script and have the documentation build automatically based on the latest wiki pages.  Then we can start shipping it with packages again (since offline documentation still matters somewhat).</li>
<li>I&#8217;m going to experiment setting up Redmine for the Wine project.  If I can get it running well on a separate server and have it fully import Bugzilla, the Wiki, and our Git repositories then we can switch to it and start using its nice management features.  Budgetdedicated will provide the server.</li>
<li>The winehq.org Donation link needs to go to a proper web page that actually says where the money goes and what we&#8217;ll do when we raise enough.  Currently it just dumps you off to paypal without explanation.  Amazingly, some people actually give money (enough to partially fund WineConf).  This task is also mine.</li>
</ul>
<p>I need to finish preparing for the Ubuntu Developer Summit that starts in a few hours, so the bullet points will have to suffice for now.  I&#8217;ve got my work cut out for me it seems.</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/171/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>IBM&#8217;s Linux Chief says we should focus on everything but winning</title>
		<link>http://yokozar.org/blog/archives/151</link>
		<comments>http://yokozar.org/blog/archives/151#comments</comments>
		<pubDate>Tue, 22 Sep 2009 07:06:47 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=151</guid>
		<description><![CDATA[We're pretty good at hardware.  My girlfriend got confused by the manual that came with her latest printer: it gave 12 steps for Windows, another 12 for Mac, and then an additional 6 for both.  There were no Ubuntu instructions.  Turns out all she had to do was plug it in, the first thing she would have tried if there wasn't a scary manual making her think printer setup required some sort of shaman dance.  This is a good problem to have, although having to tell your girlfriend to stop shaking her hips at the printer is perhaps an even better problem to have.]]></description>
			<content:encoded><![CDATA[<blockquote><p><em>Sutor said they need to focus on usability, stability, security, reliability, performance, with some cool thrown in, as well&#8230;  I think making it a complete drop-in replacement is a dead-end strategy.</em></p></blockquote>
<p>Sutor&#8217;s <a title="Sutor keynote at LinuxCon 2009" href="http://www.channelregister.co.uk/2009/09/21/linuxcon_2009_sutor_keynote/">speech</a> on desktop Linux has inspired me.  Accordingly, I&#8217;d like to present the&#8230;</p>
<blockquote>
<p style="text-align: center;"><strong>Bob Sutor Guide to Running a Marathon</strong></p>
<ul>
<li><strong> </strong>Overall fitness is important on race day. You&#8217;ll need to focus on your endurance, your heart, your leg muscles, your feet, your abs, your waist, and some arms thrown in too.</li>
<li>Running form is important on race day. You&#8217;ll need to focus on your breathing, your leg motion, your arm movements, the length of your strides, and some pacing practice thrown in too.</li>
<li>The training routine is important on race day. You&#8217;ll need to focus on finding other runners to practice with, self discipline, getting a top personal trainer, and some knowledge of the track thrown in too.</li>
<li>Don&#8217;t try and win the race.  That&#8217;s a dead-end strategy.</li>
</ul>
</blockquote>
<p>You&#8217;ll note that Bob left out &#8220;compatibility&#8221; from his list of things to focus on.  A strange omission, coming from the company that witnessed <em>IBM Compatible</em> computers dominate the PC industry without actually being sold by IBM.  Compatibility then meant being able to run Microsoft with the same hardware and software.  It still does today.</p>
<p>We&#8217;re pretty good at hardware.  My girlfriend got confused by <a title="Printer install instructions" href="http://yokozar.org/blog/content/printer-install-instructions.jpg">the manual</a> that came with her latest printer: it gave 12 steps for Windows, another 12 for Mac, and then an additional 6 for both.  There were no Ubuntu instructions.  Turns out all she had to do was plug it in, the first thing she would have tried if there wasn&#8217;t a scary manual making her think printer setup required some sort of shaman dance.  This is a good problem to have, although having to tell your girlfriend to stop shaking her hips at the printer is perhaps an even <em>better</em> problem to have.</p>
<p><strong>Winning</strong></p>
<p>Hardware works, but we haven&#8217;t won yet.  We could make every single graphics card, printer, digital camera, and music player work out of the box flawlessly and we&#8217;d still miss the market completely. We wouldn&#8217;t actually be <em>compatible</em>.  What we have is a <em>software</em> problem. That&#8217;s why I work on Wine.</p>
<p>IBM management has never really believed in Wine as a technology, even though their own engineers <a title="IBM HCM Client Wine Instructions" href="http://www-03.ibm.com/servers/eserver/zseries/zos/hcm/news/newsletter30.html">find it useful</a>. Jeremy White has even said that IBM Managers <a title="Jeremy White on IBM and Wine" href="http://www.winehq.org/pipermail/wine-devel/2005-March/035019.html">weren&#8217;t very helpful</a>.</p>
<p>For my part, I&#8217;m going to ignore IBM&#8217;s failed attempt at leadership and focus on what actually matters: making things work for users. Only if we become <em>compatible</em> can we be <em>at least as good</em>. Then people give us a try, and notice we&#8217;re actually <em>better. </em>That&#8217;s when we win.</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/151/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>My presentation at the Ubuntu Developer Summit</title>
		<link>http://yokozar.org/blog/archives/138</link>
		<comments>http://yokozar.org/blog/archives/138#comments</comments>
		<pubDate>Tue, 11 Aug 2009 09:40:35 +0000</pubDate>
		<dc:creator>YokoZar</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://yokozar.org/blog/?p=138</guid>
		<description><![CDATA[This was a short, unrehearsed talk I gave to briefly convince the Ubuntu developer community that Wine isn't a threat to free software, but rather an important tool that makes migration to a free platform possible.]]></description>
			<content:encoded><![CDATA[<p>It was a few months ago, however the videos from the Ubuntu Developer Summit have finally been made available to me in a streamable form.  This was a short, unrehearsed talk I gave to briefly convince the Ubuntu developer community that Wine isn&#8217;t a threat to free software, but rather an important tool that makes migration to a free platform possible.</p>
<p><object width="480" height="414" data="http://blip.tv/play/AYGSwXMC" type="application/x-shockwave-flash"><param name="src" value="http://blip.tv/play/AYGSwXMC" /><param name="allowfullscreen" value="true" /></object></p>
<p><strong>Advice for those giving presentations</strong></p>
<p>After rewatching the above, I can say the following things with confidence.</p>
<ol>
<li>The fewer words on your slides, the better.</li>
<li>Bullet points aren&#8217;t short enough.</li>
<li>If you start with a borrowed joke it will come off awkward.</li>
<li>Unless you can&#8217;t be funny, write your own jokes.</li>
<li>Never let someone control the slides for you.</li>
</ol>
<p><strong>Wine Bug Day this Sunday</strong></p>
<p>Now, while I have your attention, how about you participate in the next Wine Bug Day for this Sunday?  It&#8217;s very simple &#8211; mostly we&#8217;re just downloading random games and playing them for a bit to see if a bug is still there.  And it all helps Wine development, so it&#8217;s good.  Check out <a title="Bug Day on Wine Wiki" href="http://wiki.winehq.org/BugDay">the wiki page</a> and join us!</p>
]]></content:encoded>
			<wfw:commentRss>http://yokozar.org/blog/archives/138/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

