On Fri, 2005-06-24 at 10:52 +0800, Neil Houghton wrote: > Very interesting, I think!
I agree. I've been hoping someone would take an interest in porting/improving wine/winelib for Mac OS X on Intel. > Sort of like VPC but completely different? (Wine is not an emulator) Completely different. VMWare and as far as I know VPC emulate a whole "virtual" computer, including CPU, disk, etc. They run the Windows OS in its entirety on that emulated hardware, then run programs with that OS. Under PowerPC they must emulate the CPU, but when running on Intel they'll be able to virtualize it instead (WAY faster, but still quite a bit slower than not emulating/virtualizing). Wine, on the other hand, is a "compatibility layer" that sort of translates Windows program formats and API calls into something that the host OS (eg Linux, and soon Mac OS X) can understand and run. No emulation involved, so it's way faster, but it can't run all the programs VPC can. Technically, wine: - Provides facilties to understand and load the Windows binary format (Windows doesn't use Mach-O or ELF, but its own format). - Implements enough of the Windows API (the "language" programs use to ask the system to do things) for a majority of programs to run. This includes the Windows graphical user interface libraries, file system access, etc. - Tries to make its implementation of the Windows API "translate" to similar native calls where possible. Good examples here are file read/write calls, which translate very well. The GUI doesn't translate as well, so Wine has to implement a lot of the Windows GUI layer. - Makes everything look to the program as if it's still running on Windows. > Does that mean you get to use your Windows applications without having to > pay Microsoft for either VPC OR any incarnation of Windows? Yes, since Wine doesn't use any parts of Windows. This is, however, only *if* the application will run under wine. Some won't, because they require kernel extensions / drivers to be installed (games with copy protection are a big one for that, but support for them is being added currently) or they rely on parts of the Windows API that Wine doesn't know how to translate. In general, best results will be achieved if the company that makes the program does a small amount of work to tweak their program so it'll run well under Wine, or a bit more work to convert it to use WineLib (permitting it to run stand-alone). Alternately, a program can often run well if the Wine developers have spent some time tweaking Wine to work for that particular program. Lots of the things Wine works well with now are things Mac users won't care as much about - MS Office for Windows, Adobe Acrobat, Adobe Photoshop, etc. However, I can see MYOB and Quicken support being really popular requests (I don't know - Wine might be able to run them already). > Does that make it better/worse than (or just different to) the VPC/windows > solution - which I have found to not be a real solution for me - sometimes > things that work after a fashion but are too slow to be actually usable - > other times I just can't get them to work! Different. Some things that work with VPC won't with Wine (VPC provides a *full* Windows API and can load drivers) and a few things that don't work with VPC will with wine. The main advantage of Wine is that you just run the program - you don't have to load up a whole emulated Windows OS first. It's much more memory efficient, and you don't have to worry about having essentially two OSes running. You also don't have to pay for a copy of Windows, directly or indirectly. It should even be possible to let you just double click on the .exe, or or even make the Windows app into a .app bundle. The speed issue should be partially solved by the move to Intel anyway. With that move, VPC won't need to emulate the Intel CPU anymore - instead, it can let the emulated OS run on the real CPU, and only has to emulate some instructions. That's part of what's called virtualization - you'll be hearing that term more and more I suspect. Despite what some folks have said, this does NOT mean that the emulated OS will run at full speed - even VMWare takes something like a 30% peformance hit, and I doubt Virtual PC will be able to do even that well. It's a heck of a lot faster than full emulation like VPC currently has to do, though. Wine will not have to take that 30% performance hit. There is some performance cost from the additional "wrapper" the program runs within, but not all that much. Programs do tend to be slower to start up, though. To give you an idea of performance under Wine, modern games that run under Wine are generally quite playable, only suffering a small performance hit frequently estimated at less than 10%. -- Craig Ringer