%include "default.mgp" %default 1 bgrad 0 0 256 0 1 "black" "blue" %page %nodefault %center, size 7, font "standard", fore "white", vgap 20 Wine: Where it came from, how to use it, where it's going %center, size 5, font "standard", fore "white" SGVLUG 10 Jan 2008 %center, size 7, font "standard", fore "white", vgap 20 Dan Kegel www.kegel.com %page Wine Desktop Linux is healthier than ever Distros are more polished than ever Wireless and multimedia support good Dell and Wal-Mart are selling Linux PCs %pause But ... market share still tiny! Why? %pause One big reason is the Application Barrier to Entry: no market -> no apps -> no market %page Wine Key applications missing The #1 requested app on Linux is Photoshop Gimp 2.4's not a sufficient substitute: Unfamiliar UI Can't do CMYK images Can't do 64 bit per pixel images Can't run third-party Photoshop plugins Photoshop has a real plugin ecosystem Other apps (e.g. Paint Shop Pro) accept Photoshop plugins %page Wine Key applications missing (cont'd) Most Windows applications in the world are probably custom-written in MS Visual Basic or MS Access for a small number of users These are key applications for those users A lot of work went into those apps Little incentive to rewrite them for Linux %page Wine Wine to the Rescue If Linux is to succeed on the desktop, we need a way to run Windows apps on Linux You can run Windows in a virtual machine... ... but then you're still paying $200 for Windows Better: Wine, a free implementation of win32 on Linux Started in 1993, 1.0 some time in 2008 Project's benevolent dict^H^H^H^Hmaintainer is Alexandre Julliard %page Wine Wine Status Wine can already run some Windows apps well: Microsoft Office 97,2000,2003 OpenOffice 2.2 Firefox 2.0 World of Warcrack but it has still trouble with most large apps Any new app probably exposes a few Wine bugs Cost to improve Wine for a new app $0 - $250K %page Wine Wine's Innards Wine consists of: An .exe loader A control panel Notepad, regedit, explorer, cmd Core DLLs (that know about Unix) User DLLs (eg riched20.dll, not Unix specific) A few essential fonts In short, everything needed to run a Windows app %page Wine Wine is already useful Thousands of people run MS Office with Wine Several companies use Wine to ship commercial apps As we fix Wine to handle each new app, it makes it easier to fix the next app %page Wine A little Wine history - Before Wine 1991: IBM says OS/2 2.0 will run Windows apps 1991: Bristol ports Win apps to Unix with Wind/U 1993: MS promises "Windows Everywhere", Mac "Windows Compatibility Library", showcases Wind/U 1993: Sun announces WABI and PWI 1993: Users want "PWI for Linux", start Wine %page Wine A little Wine history - First Usenet Message From: bob@amscons.com (Bob Amstadt) Subject: Re: Impressions of WABI/Univel vs Linux Date: Fri, 2 Jul 1993 Of course, for those of you who are interested in running Windows programs there is an effort in progress to create something similar to Sun's WABI. There is an activists channel, "WABI", for discussion of this project. There is need for many volunteers to complete this project. %page Wine A little Wine history - Early Days 1994: Alexandre Julliard becomes maintainer 1994: Solitaire runs 1996: Wine adds win32 support 1997: Word 95 starts working %page Wine Word 95 first light From: Martin Boehme Subject: Wine and Word95 - Success! Date: 1997/11/18 Wine-971116 has been one of the most exciting releases of Wine for me... I tried $ wine -dll -shell32 -winver win95 winword I stared. I goggled. I gaped. Shock. Disbelief. Amazement. There was Word 95. On my Linux desktop. Word 95. A mainstream 32-bit application. To whoever made this possible: You are my God. %page Wine A little Wine history - WineHQ Era 1997: winehq.com created 1999: Corel hires engineers to improve Wine 1999: Codeweavers funded to improve Wine 2000: Alexandre moves to Codeweavers 2000: Borland hires Codeweavers to improve Wine 2001: Lindows hires Codeweavers to improve Wine 2002: Wine switches to LGPL 2002: Codeweavers releases Crossover Office 2002: Wine starts Conformance Test Suite 2003: Disney pays to fix Wine to run Photoshop 7 2005: COM, MSI implemented; DLL separation complete 2006: Google uses Wine to port Picasa to Linux %page Wine What about Microsoft DLLs? Wine does not need or include any Microsoft code If apps install copies of VB/VC++ runtime libs vbrun, msvcrt, and mfc40 they will be used by the app under Wine. This is ok; check the VB/VC++ EULA. %page Wine What about Microsoft IE? IE provides the IWebBrowser interface to let apps embed web browser windows Wine now includes an implementation of IWebBrowser based on Mozilla's ActiveX plugin %page Wine What about fonts? Wine only includes a few basic fonts Linux doesn't include many, either Apps look better if you install good fonts Fortunately, MS provided redistributable free fonts You can download them from http://corefonts.sf.net This is ok; check the fonts' EULA. %page Wine What about the C: drive? Wine maps the Z: drive to Unix's root by default This lets Windows apps access all files on system Wine is currently a single-user application Each user gets their own "fake" C: drive in ~/.wine/drive_c Registry stored in ~/.wine/{system,user,userdef}.reg %page Wine Winecfg, cmd, regedit, notepad winecfg is an applet to tell Wine: use a different audio driver act like an older version of Windows cmd, regedit, notepad are just like in Windows %page Wine Shipping a Windows App for Linux Windows apps can be packaged as RPM or deb It's easiest with a "zero-footprint install" like winzip Bundle Wine in the RPM if you want a standalone app That's what Google did with Picasa %page Wine Wine is not finished Still not feature-complete Doesn't run most Windows apps well yet e.g. OpenOffice 2.0 File/Open dialog has trouble Photoshop CS3 doesn't install yet %page Wine Demo This page intentionally blank %page Wine Key challenges Most core components just need bugfixes Some still need to be written, e.g. BITS GDI+ Oleacc Pen API / Ink ... We fix whatever's needed for the apps we care about %page Wine Wine is "easy" to contribute to CS 130 students at UCLA are implementing one GDI+ feature each this term Students implemented Wine's IE, MSI, crypt32, and gdi+ Easy to find some missing feature to add Easy to verify it works like Windows Hard because you have to be a C programmer and convince the maintainers your code is good %page Wine GDI+ GDI+ was introduced in 1999, not commonly used until 2007 It replaces the classic GDI (Graphics Drawing Interface) Better because: Stateless Fancier graphics Modern file formats More object oriented Wine's implementation was written in 2007 by Evan Stade, just to get Powerpoint Viewer working %page Wine Questions Slides online at http://kegel.com/wine/sgvlug-2008-01-10 More info at http://kegel.com/wine The views presented in this talk are my own personal views, and do not represent the views or positions of my employer