Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Native Windows PE File Loading on OS X?

Journal written by ozmanjusri (601766) and posted by Zonk on Sat Dec 01, 2007 04:25 PM
from the to-what-purpose-and-determination dept.
ozmanjusri writes "Coders working on Wine for Mac have found that the Mac loader has gained its own undocumented ability to load and understand Windows Portable Executable (PE) files. They found PE loading capabilities in Leopard that weren't there in Tiger. Further dissection showed that Apple is masking references to 'Win' and 'PE' in the dll, which means it's not an accidental inclusion. Is Apple planning native PE execution within OS X?"
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • noooo FP (Score:5, Insightful)

    by Anonymous Coward on Saturday December 01 2007, @04:31PM (#21546949)
    please not - i don't need every windows malware able to run on my mac...
    • Re:noooo FP (Score:5, Interesting)

      by onefriedrice (1171917) on Saturday December 01 2007, @05:32PM (#21547483)
      > please not - i don't need every windows malware able to run on my mac...

      Except windows malware is just that: malware written for Windows. While it could potentially run, malware wouldn't automatically become a problem. You'd have a much easier time accidently running OS X malware than Windows malware. Think of it as WINE for OS X (which is apparently exactly what it is or will be except Jaguar can load the binaries itself). People running Windows binaries via WINE on Linux don't experience the same problems with malware because the expected security flaws in the underlying OS and/or applications aren't there.

      In short, if Apple plans to implement a built-in WINE-like ability to run some Windows binaries in OS X, there is no reason to suspect it will cause a breeding ground for Windows malware. Malware only has the opportunity to run if it can somehow get installed.
        • Re:noooo FP (Score:5, Informative)

          by 99BottlesOfBeerInMyF (813746) on Saturday December 01 2007, @07:13PM (#21548113)

          The trouble is they have NIH and so won't just work with the wine project.

          Apple? NIH?!? Umm, the BSD subsystem, Webkit from KDE, OpenStep from Next, BeOS bits recreated, MAC from TrustedBSD, PDF as the basis for their display from Adobe, dtrace from Solaris, Apache, CalDav from Oracle... I could go on.

          Apple might avoid the WINE codebase, but only because they have rights to much of an older version of the Windows API directly from having won a lawsuit against MS quite a while ago when MS stole their code. I don't think Apple would otherwise have a problem supporting WINE and I would not be surprised if Apple employees have submitted code to WINE or one of the offshoot projects. I think, however, they're probably content with the current ease of running Windows apps, inconvenient enough that not many mainstream developers can ignore OS X, but easy enough so that businesses are not put off and people are not afraid of trying OS X as their primary OS. I would not be surprised, actually, if this feature was added at the request of Parallels, whose latest RC supports making Windows apps the default for opening filetypes in OS X (which will launch the VM and open the file in the specified application.

          • Re:noooo FP (Score:4, Interesting)

            by ozmanjusri (601766) <(aussie_bob) (at) (hotmail.com)> on Sunday December 02 2007, @12:21AM (#21549703) Journal
            Apple might avoid the WINE codebase, but only because they have rights to much of an older version of the Windows API directly from having won a lawsuit against MS quite a while ago when MS stole their code.

            Apple might even license Win32 code from Microsoft.

            There's writing on a lot of walls for Microsoft.
            The EU legal settlement will eventually, despite the bitter fighting, force them to open their APIs to anyone.
            They're facing an onslaught of low-end Linux machines like Asus Eee PC and the Walmart $199 box. So far, their response has been to lower the price of Windows below $40 for Eee PC owners. That's going to be hard to sustain when other buyers balk at paying three times Asus' price.
            Vista won't drive any new sales, and looks losing anyone who was waiting for a sign from above.
            Essentially, all MS has left to sell on the OS front is compatibility with the enormous back-catalogue of Windows applications.

            Being able to sell Win32/FX as an API pack to other OS vendors might be a way out for MS. The future of computing looks like hypervisors and VMs anyway. Most tech savvy people already run Windows in a VM on their preferred OS (or vice versa) already.

            Selling a portable API would just be going with the flow.

            • by 99BottlesOfBeerInMyF (813746) on Sunday December 02 2007, @03:16PM (#21553873)

              What I find frustrating about Apple is their need to so tightly control every bit of code they borrow.

              Partly I think this is because Apple relies upon secrecy in order to be competitive against MS's offerings so they don't like people looking at their codebase for future releases, unlike most OSS projects. They tend to wait until they have a project completely and ready to go before they let anyone outside Apple know it exists, which often means they've reworked code for a year and the original projects has a massive load of work dumped upon them at once.

              Look how long it's taken for Webkit to go back into Konqueror...

              That is actually a good example, although a bit clouded by all the nonsense people posted about it, when they had no idea what they're talking about. For some fairly obvious for business reasons Apple could not have let slip to MS they were working on their own browser, lest MS retaliate by canceling IE before it is ready, or introducing a lock-in into IE in some way. When Apple did release the code, they did not well document the evolution of their version. Someone commented on this in a forum and suddenly all sorts of people were claiming Apple was screwing over the Konquerer team, or intentionally obfuscating things, or violating the spirit of the license. Of course at that point, no one had asked anyone at Apple for a better breakdown and when someone did, the guys working at Apple went out of their way to help make things easier for them to re-integrate into KHTML. Mind you, because the Konquerer team was not happy with some of the design decisions Apple had made, they delayed implementing most of them. They had been used to being the only ones contributing and were not used to dealing with major contributions from other coders. Lately, they've come around with Apple and several other making regular contributions (something the Konquerer guys consider the best thing to come out of Apple's adoption) and they're moving to merging the WebKit and KHTML branches back together since Apple's contributions are more useful than the inconvenience caused by Apple's architectural decisions. The delay in getting Apple's changes incorporated, however, can't really be blamed on Apple, more than a few days, for the most part it was a conscious decision by the Konquerer developers.

              ...and don't even get me started on BSD/Darwin, whose policy seems to be "Open whenever we feel like it."

              Credit where credit is due, the BSD license does not require Apple to release their changes at all, so doing so on a delayed timetable is still a lot better than most vendors.

              Thus, I suspect that, were Apple to include Wine, they'd fork it, improve it quite a lot (though largely in ways that can't easily be integrated back into Wine), assuming they didn't just fork Crossover, Cedega, or the newest version of Wine that's not LGPL'd.

              I doubt it. Why do you suppose Apple publishes the Darwin source or any of the other low-level technologies they code (ZeroConf, LaunchD, etc.). They publish them because they actually see the business case for sharing the work with other companies and gaining wider adoption of said technologies. Windows API re-implementations fit in that same category. If possible, Apple would try to share the load with other players. Realistically, I think they would be prevented from using WINE because of their license to MS's code nor do I think they have a lot interest in such a project.

            • Re: (Score:3, Informative)

              You can't read articles on censorship through the RSS feed. It's one of those clever meta jokes by the editors.
  • by SigILL (6475) on Saturday December 01 2007, @04:32PM (#21546961) Homepage
    I don't think this is intended for Win32 compatibility. Apple has every reason not to do that, because it will mean there will be no more native versions of high-profile applications such as Photoshop. Adobe is probably already pissed off there won't be a 64-bit version of Carbon, which requires them to rewrite the entire UI of Photoshop in Cocoa to be able to release a 64-bit version of it. Giving them an easy way out by offering Win32 binary-level compatibility isn't in Apple's best interest there.

    However, consider that the PE file format is also used by Microsoft's Common Language Runtime (CLR/.NET). Therefore, I think this is a preparatory move to start offering a native implementation of the .NET platform for OS X.
    • by iJed (594606) on Saturday December 01 2007, @05:44PM (#21547581) Homepage

      However, consider that the PE file format is also used by Microsoft's Common Language Runtime (CLR/.NET). Therefore, I think this is a preparatory move to start offering a native implementation of the .NET platform for OS X.

      I was just about to post this myself... It makes a lot of sense for Apple to support .NET on Mac OS X. For a start C# is now the flagship language for Windows development and not supporting it may be the difference between getting hundreds of ported apps and not getting them at all. As a Mac user and .NET developer I think it would be a big mistake for Apple to ignore .NET.

      I wonder if this is how the sandboxed iPhone SDK, which is to be available in February, will be implemented

    • by noewun (591275) on Sunday December 02 2007, @04:04AM (#21550479) Journal

      Adobe is probably already pissed off there won't be a 64-bit version of Carbon, which requires them to rewrite the entire UI of Photoshop in Cocoa to be able to release a 64-bit version of it.

      Adobe is pissed because it can't figure out how to squeeze more money out of a saturated market. Even though the design/print/pre-press market is large, it's finite and it's not growing much. Adobe has already sold everyone who wants or needs one a copy of Photoshop, and so they've been forced into release-constant-upgrades cycle to try and generate more revenue. So, I think Adobe's pissed they can't dump the print and pre-press market altogether and just move full scale into Flash, PDF and whatever other web technologies they can think of. And I think they're doubly pissed that, last I checked their annual report, about half the revenue from their print/design/pre-press sales come from the Apple world. So, instead of dumping that business, or spinning it off, they have to expend the time, money and effort to support two platforms. Adobe isn't pissed because of anything Apple's done. Adobe's pissed they can't dump their "legacy" apps and follow whatever will make them the most short-term profit, overall corporate health be damned.

      Adobe hasn't been the same since Warnock and Company sold out and the bean counters took over. They're now a marketing company which happens to release some software from time to time. Their days as a company which produced technology which got you excited are long over.

      • by cnettel (836611) on Saturday December 01 2007, @04:38PM (#21547025)
        UI includes showing the actual images. Sending them over IPC is certainly not wise from a performance standpoint.
        • Re: (Score:3, Informative)

          by Anonymous Coward
          Dude, most X servers running on Linux, Solaris, *BSD and a host of other modern UNIX systems make liberal use of IPC, in the form of the MIT-SHM [reptiles.org] shared memory extension:

          The basic capability provided is that of shared memory XImages. This is essentially a version of the ximage interface where the actual image data is stored in a shared memory segment, and thus need not be moved through the Xlib interprocess communication channel. For large images, use of this facility can result in some real performance incr
            • by setagllib (753300) on Saturday December 01 2007, @05:56PM (#21547649)
              With SystemV shared memory (shmem) it's trivial, and that's a decades-old feature of Real Unixes. What, doesn't OSX support it?

              Even so, of course Photoshop should be rewritten for the new framework. After all, when a proprietary technology corporation decides to screw over their third-party developers and customers, isn't it the American Way to bear all the costs and keep paying them money?
      • Re: (Score:3, Insightful)

        You have any special insight that would suggest why they _wouldn't_ want to be as compatible with Windows as possible, being that they're trying hard to convince people to switch?

        Because if they did, customers could choose between machines that sorta run Windows applications (Macs) or machines that run Windows applications properly (PCs). As Wine proves, any reimplementation of the Win32 API is inevitably not going to be as good as the real thing.

        Providing compatibility with Windows through VMWare or Parall

      • by jcr (53032) <jcr@mac. c o m> on Saturday December 01 2007, @04:59PM (#21547239) Journal
        one of Apple's biggest selling points for the Mac if you go into any store that sells one is that it can "still run all of your Windows stuff."

        No. The big selling points are what you can do with the Mac OS. Boot camp is more in the vein of removing a common barrier to a sale.

        -jcr

          • by jcr (53032) <jcr@mac. c o m> on Saturday December 01 2007, @05:22PM (#21547423) Journal
            Mind telling me what the difference is between a selling point and removing a barrier to sale, exactly?

            A selling point is a reason why a product is superior to another product. A barrier to sale is a reason why a customer might be bound to stay with a different product.

            You don't buy a Mac because it can run a windows app, since the cheap shit from Dell will do that, too. You buy the Mac for the things that it offers over and above what the Dell box can do.

            -jcr

          • by EveLibertine (847955) on Saturday December 01 2007, @06:20PM (#21547817)
            bullhonky. Apple _was_ a hardware company. Since they started selling x86 pc's, the only way to distinguish them from any other pc out there is with their software. They are a software company when it comes down to it.
            • by duffbeer703 (177751) * on Saturday December 01 2007, @07:36PM (#21548235)
              Q: Where do I go to buy OS X for my commodity PC?
              A: I don't.

              Mac OS, iTunes, the iTunes Music store, etc exist for one purpose: to sell Macs, iPhones, iPods, etc. The software simply isn't where the company makes the money. The old regime almost bankrupted Apple by switching to a Microsoft-like software licensing model... so I doubt that Apple would go back to that.
            • by The One and Only (691315) * <phil@philwelch.net> on Saturday December 01 2007, @09:30PM (#21548901) Homepage
              Apple isn't a hardware company or a software company. They're a systems company. They sell a complete system that they put together. The hardware might have an Intel CPU, an nVidia graphics card or a Marvell WiFi controller, and the software might have a Mach kernel, a KDE-derived web browser, or a GNU compiler, but you don't have to invent your own kitchen sink or air conditioner to build a great house, either.
          • Apple sell complete systems...
            A bundle of hardware and software designed to work properly together. That's a big selling point, no hassle with drivers, no hardware conflicts etc.
            Windows could never provide the same level of integration unless microsoft start producing hardware against (remember the jazz platform?) and linux could but would really need the hardware maker to roll their own distro.

            The only other place you get good integration between hardware and software, is at the high end.. Think z/OS, Solaris/Sparc, AIX etc
      • by SigILL (6475) on Saturday December 01 2007, @05:02PM (#21547257) Homepage

        Not likely. Apple's not about to sign up to support a Microsoft API on OS X.

        You realise it's an open standard [wikipedia.org], do you? Hell, it's even ISO approved [iso.org].

        Apple would gain a _lot_ by providing support for .NET, without losing much.
        • Re: (Score:3, Insightful)

          If I had mod points, you'd get them. This is a good point. There are a lot of .NET programmers out there, and anything to encourage coding for a platform has to be a good thing.

          On the otherhand, I doubt this is the full story. I'd bet on "you can run your windows apps without running windows" before I'd bet on, ".NET programmers wanted, no Mac experience necessary."
        • Re: (Score:3, Interesting)

          So why to the EULA's of MS's own apps forbid you from running them on non-MS operating systems?

          • by SigILL (6475) on Saturday December 01 2007, @05:42PM (#21547557) Homepage

            Can you quantify this supposed gain?

            Sure I can... a little.

            Right now, the world's colleges and universities are churning out Java & C# programmers. Those are the popular languages, the ones for which you can almost literally open up a can of programmers for.

            Not so with Objective C. It's even starting to get problematic to find competent C++ programmers.

            Microsoft's seen the proverbial storm coming, and has been working on an alternative for their aging and clunky Win32 API. Remember a few years back, when the Redmontians announced that Vista (then called Longhorn) would only support .NET programs natively? Back then the world evidently wasn't ready for it. But it's slowly becoming ready, because it's getting harder and harder to find competent C++ programmers.

            Meanwhile, Apple is tied to Objective C. A language few people are willing to learn (remember "Objectionable C"?). For very valid technical reasons, Apple is slowly moving its developer base over from C/C++-written Carbon apps to Cocoa apps written in Objective C. However, this makes it even harder for software vendors to find competent developers for their Mac OS X offerings.

            So, enter .NET. It's reasonably fast (getting faster), it has plenty of mindshare, and most importantly: there isn't much in the way of a legacy code base for it. Supporting .NET doesn't mean hurting your own APIs, its simply an additional one.

            Is that enough of a quantification for you?
            • by Durandal64 (658649) on Saturday December 01 2007, @06:49PM (#21547955)

              Right now, the world's colleges and universities are churning out Java & C# programmers. Those are the popular languages, the ones for which you can almost literally open up a can of programmers for.
              Having the "dime a dozen" crowd develop for your platform isn't without its drawbacks. I hear a lot of comments from Windows converts saying that the Mac indy developer scene is smaller than Windows, but the software is almost always of much higher quality and polish. When you make it easy to develop for your platform, you attract lots of developers (good), but the signal-to-noise ratio drops significantly (bad).

              Microsoft's seen the proverbial storm coming, and has been working on an alternative for their aging and clunky Win32 API. Remember a few years back, when the Redmontians announced that Vista (then called Longhorn) would only support .NET programs natively? Back then the world evidently wasn't ready for it. But it's slowly becoming ready, because it's getting harder and harder to find competent C++ programmers.
              Based on what I've heard from Windows developers, Microsoft needed a good Win32 replacement because Win32 sucked. I've seen some Win32 code; it's not pretty, and the way the UI code connects to what's happening on the screen is a complete mystery to me. When I learned Cocoa and Objective-C, the connections were intuitive and obvious.

              Meanwhile, Apple is tied to Objective C. A language few people are willing to learn (remember "Objectionable C"?).
              I'm sure that'll change in February of 2008. Then lots of people will probably be interested in learning Objective-C.

              So, enter .NET. It's reasonably fast (getting faster), it has plenty of mindshare, and most importantly: there isn't much in the way of a legacy code base for it. Supporting .NET doesn't mean hurting your own APIs, its simply an additional one.
              Apple tried that kind of thing before with the Java/Cocoa bridge. It's now been deprecated because it was a pain in the ass to maintain, and no one was using it. A .Net bridge would require that Apple map all the .Net standard classes to their own. They might be able to do toll-free bridging to underlying CoreFoundation types (like dictionaries, strings, etc ...), but I don't know if C# supports the kind of dynamic typing that makes it possible through the C/Objective-C combination. I suspect it does. But it'd still be a lot of work.

              Instead, Apple is offering Python and Ruby Objective-C bridges, and that makes a lot more sense. They've got bridging support for arbitrary scripting languages into the Objective-C runtime, enabling web developers to write native Mac OS X applications using native APIs. Whatever Apple does with respect to additional language support in the future, you can bet Objective-C will be a part of it. The language allows for a lot of dynamism and flexibility, and on top of that, it's a strict C superset, which means that there are no special wrappers required to call down to the POSIX layer. So it's just easy to bridge other languages with it.

              At the end of the day, Objective-C just doesn't get the credit it deserves. It's a very well thought-out language with lots of power. Most people just don't see it because they think Objective-C is Apple's "proprietary" language or some such nonsense.
              • by SigILL (6475) on Saturday December 01 2007, @06:41PM (#21547921) Homepage

                Nope. Do you even know what "quantification" means?

                Not right now, no. But it's half past twelve here. In the morning. And I'm writing posts in a language that's not my mother tongue. I'm actually amazed my posts are halfway coherent and readable.

                But to get back on the subject, you probably want to see hard numbers regarding this. Well, there aren't any. Developing a platform has always and will always depend on guesses. That's because we're dealing with people here, who have those nasty undefinable things called "preferences". We can only guess what's going to work out, and what isn't.

                And right now, .NET looks like a pretty good bet.
                  • right now, .NET looks like a pretty good bet.

                    I'm sure that jumping on the Windows NT bandwagon looked like a good bet to Tandem, DEC, and SGI.

                    -jcr
                    No, it was their only bet. It was obvious by then that all of their other choices were losers. The Windows NT bandwagon was the only chance they had left, it didn't work either.
      • Re: (Score:3, Insightful)

        I'd personally love it if Apple replaced its aging Cocoa/Objective-C/XCode infrastructure with something more modern like .NET or Java, but I don't think it's going to happen anytime soon.

        Well, Apple has cut loose the Java bindings to Cocoa, so I guess you're right.

        I've only dabbled with Cocoa in order to learn Objective-C, but the whole thing seems super elegant, and Objective-C itself is SO much nicer to work with than Java - it's like C combined with Python (very dynamic). The class hierarchy is clean and not particularly deep. I don't know, I personally think moving to, say, Java for infrastructure would be a step backwards (and I say this as someone whose current contracts are all big

        • Re: (Score:3, Informative)

          it's like C combined with Python

          Ugh, you make it sound hideous. Objective-C is C combined with Smalltalk. It's not quite as elegant as C combined with Self would be, but it's quite close. The Smalltalk philosophy is very different from Python. Python piles a load of badly thought-out crap into the language and makes something that's a third rate OO language, a second rate procedural language and a fourth rate functional language. Smalltalk aims to make the language almost as small as possible an implements everything at the library

      • by Space cowboy (13680) * on Saturday December 01 2007, @05:25PM (#21547435) Journal
        I'd personally hate it if they gave up the beautiful elegance that is ObjC and forced Apple developers to move to Java or .NET.

        I've said it before, and I'll say it again now: Objective C is exactly at the sweet spot for a computer language - it has all the power of C (it's a formal superset), the nice features of a true object-orientated language (OOP, garbage collection, protocols, etc.), adds in dynamic dispatch (thus removing the need for generics), and does it all by adding about a dozen commands to the C language. The only thing against it is the unfamiliar (to C/C++ programmers) syntax. Really, though, how hard is it to make the mental leap to [myObject insertObject:xxx atPosition:yyy] from myObject->insertObjectAtPosition(xxx,yyy) ? And which is the more readable ?

        Plus, the class library is *very* well designed. It makes easy things easy, and hard things possible. A lot of hard things are pretty easy too... There's a site [dotnetdeve...ournal.com] that often compares .NET and ObjC/Cocoa. It frequently (despite the obvious potential bias given the name of the site) argues that the ObjC method for doing something is better thought out, more elegant, or simply more capable than the corresponding .NET approach.

        Objective C is a classic example of how a simple clear approach can reap huge rewards in terms of usability and flexibility. It's not the over-designed bloat-fest that is C++ (template metaprogramming ? Really ?), and it's not the raw pedal-to-the-metal-hear-the-engine-scream-in-protest of plain old C. I've never yet met anyone give it a fair try (ie: write a real program in it) and not end up loving the language.

        Simon
        • Re: (Score:3, Insightful)

          Really, though, how hard is it to make the mental leap to [myObject insertObject:xxx atPosition:yyy] from myObject->insertObjectAtPosition(xxx,yyy) ? And which is the more readable ?

          As far as a layman is concerned, the former is more readable, but less understandable. I expect most formally educated programmers (meaning college) to prefer the latter. Why? A few reasons:

          • Most institutions teach java, C#, or C++ in their core curriculum. Programmers simply know the syntax better.
          • The programming paradigms
            • by coolGuyZak (844482) on Sunday December 02 2007, @12:49PM (#21552637)

              You fail to differentiate between .Net and C#. By and large, I criticize the former. I can see where you might get the wrong idea, though, so I'll elaborate.

              The .Net framework suggests that the prototype for an event is as follows: "ret_type event( Object sender, EventArgs_subclass e )". Compare with a "typical" windows callback mechanism: "ret_type function( HWND hParam, WPARAM wParam, LPARAM lParam )". Suspiciously similar, neh? HWND corresponds to "Object sender", and the W- and L- PARAM objects are wrapped into EventArgs.

              EventArgs and its sub-classes encapsulate all of the data given to a particular handler, much like W- and L- params, which changed meanings depending on call context. Some EventArgs subclasses also perform odd tasks, for instance the CancelEventArgs.Cancel [microsoft.com] property. This is the downright stupidest OOP implementation I've ever seen. Cancel is not data, it's an action. I don't want to specify the "cancelness" of the data, I want to cancel an operation. A better design would be to send a message back to the sending object that says, "I can't validate this." Unfortunately, because .Net event handlers use the ambiguous "object handle." I'd need a cast before I could send my response.

              The complexity of implementing a cancel message is likely greater than CancelEventArgs, but the solution is far more intuitive. We don't even need to go as far as sending a message, though. Provide a real type to the sender argument (for instance, ICancelableControl, or just Control), and provide a Cancel method, and I'd be happy.

              Performance is a shoddy argument for the lack of a message passing system, because .Net treats the event system as a messaging network anyway. AFAIAC, use events, but add more formality to the event system. Call your EventArgs what they are -- a message--and type the sending object appropriately. Finally, differentiate functioanlly between events and multicast delegates. Events should manage their subscription list; if an object subscribing to an event is garbage collected, fail silently. If the event lacks subscribers, then succeed.

              And now for something completely different.

              Everyone knows MSDN is a steaming pile of crap. What's worse, Microsoft seems to be doing very little to correct that image. IMHO, this is a mistake. As a developer, my first exposure to .Net is through MSDN--fundamentally, it's marketing for techies. It should be thorough, describing how components interact, typical real-world use cases for code, the history or motivation of a particular interface, etc. MSDN should serve the same function as an O'Reilly book--set a mood and mindset for development.

              MS can spend as much money developing the perfect language as they want, but without the proper supporting tools--and don't get me started on the woes of VS--their efforts piss people off. This is precisely the motivation for the GGP's note that Objective-C developers are so "happy" and my "bullshit" post.

  • by jim.hansson (1181963) on Saturday December 01 2007, @04:45PM (#21547101)
    wine is LGPL so apple maybe already is using wine.
    • I think you've probably misunderstood something. The LPGL doesn't mean that Apple would be free to hide its presence or source code or anything of the kind. It just means that it is allowed to link Wine into proprietary programs. They would still need to both inform the world that they have included Wine, and to provide its source code and a way to rebuild both Wine itself and any programs that would be linked statically against Wine. This is in contrast with the GPL only in the way that proprietary program
  • Hmm... (Score:4, Funny)

    by FlyByPC (841016) on Saturday December 01 2007, @04:48PM (#21547125) Homepage
    A recent article was talking about how much less reliable Leopard seems to be than Tiger.

    Now we find out that Leopard has some Windows compatibility. Maybe they're just making it bug-for-bug compatible?

    How long until we hear Apple take up the "it's-not-a-bug-it's-a-feature" line?
  • by dpokorny (241008) on Saturday December 01 2007, @04:50PM (#21547153)
    The most probable reason for Apple to have partial support for the PE executable format is EFI. Both the firmware itself and all of the drivers embedded within it use the PE object format.

    If they want to natively host EFI development and not use Windows to do it, then some level PE support is required.

    Just take a look at /System/Library/CoreServices/boot.efi -- it has the same "This program cannot be run in DOS mode." at the beginning of the executable like every other PE executable.
    • Re: (Score:3, Interesting)

      That's my bet too. EFI on IA64 runs Windows PE binaries (for IA64). EFI on X64 (which hasn't been implemented by many hardware manufacturers btw) runs Windows PE binaries.

      I, for one, griped at Intel about EFI the first time we tried to do any useful automation on Itanium with it -- EFI is glorified DOS, except without any of the useful tools available for DOS. Intel would have been miles ahead if the would have made a linux BIOS/preboot environment instead.
  • by apankrat (314147) on Saturday December 01 2007, @04:53PM (#21547179) Homepage
    The actual problem is resolving all external dependencies of Windows-bound binaries. If the Win32 API is somehow emulated (see Wine project for some "minor" details), this leaves (an ungodly mess of) COM interfaces. Then even if this is taken care of, Apple is going to be quite exposed to a legal beating from MS.

    Lastly, "Is Apple planning native PE execution within OSX?" - if they were _planning_ that, they wouldn't include this into a production release of the OS. This means that it's already used for something. The big question is what exactly.
  • by Jeff_at_RAD (121656) on Saturday December 01 2007, @06:10PM (#21547747) Homepage
    Our game middleware products load PE format binaries on GNU/Linux and MacOS. It's like 200 lines of code to load and fix up a DLL - not difficult at all.

    The two wins are that we have one binary on all x86 platforms (which usually means testing on one platform is sufficient) and that the MS compiler generates faster binaries. The downside is that when you *do* have to debug on the non-native platforms, you must resort to printf-style debugging.

    You also have to replace the default MS crt, because they make a lot of Win32 calls that you don't want to have to emulate. We just have a tiny OS layer for memory, file IO, threading, audio, and video that is native (about 30 functions).
  • by LKM (227954) on Saturday December 01 2007, @08:03PM (#21548397) Homepage
    I think Gruber had it right when he said that Apple wants its users to think of Windows as the new Classic, [daringfireball.net] i.e. if Windows apps run inside Mac OS X, they should do so the way Mac OS 9 apps used to run inside OS X: With distinctly different windows, in a separate environment, and a bit glitchy. Users need to be reminded that running Windows apps is not the preferred choice, but merely a last resort.

    The idea is to tell users "Yeah, you can run your Windows apps using Parallels or VMWare if you really have to, but if you can, we'd much rather you ran real Mac applications." Running Windows apps quasi-natively by implementing the APIs would send the wrong message; it would put Windows apps on the same or a similar level as Mac apps. That's a bad thing: The Mac relies on Mac-only or "better on Macs" applications; the high quality of software is one of the Mac's selling point. If developers could write Windows apps and they would run on Macs just fine, hey, why not write Windows apps and have five or ten times the market at no additional cost?

    Of course, I'd personally love to see something like this; Office for Macs is about to lose support for Macros, so I'll probably have to run Office in Parallels, soon. Come to think of it... Maybe that's Apple's way of fixing Microsoft's Macro Mistake? Maybe the idea is to let Windows Office run natively on Macs?

    Anyway, Apple's actions have been extremely hard to predict recently, so I'm not ruling out anything. Maybe they are indeed going to give the Windows APIs the Carbon treatment...
    • by g0at (135364) <.ac.taogyz. .ta. .neb.> on Saturday December 01 2007, @04:49PM (#21547137) Homepage Journal

      Interesting. One of the major downsides to using OSX is that there isn't as much software available for it. If OSX were able to run windows executables natively (think Microsoft Office and games) that would be a major coup for Apple. Plus you wouldn't need to sit around hoping that WINE decides to support that application.
      Eh? Did you copy/paste this from a discussion five years ago?

      -b

          • Re: (Score:3, Interesting)

            there have also been plenty of complaints that the OSX version is buggy and doesn't run as well.

            From who? Most of the people I know who have used both say that Mac Office 2004 is better than Office 2003 for Windows (and they think that makes no sense and they don't get what the hell is wrong with Microsoft).

          • by 99BottlesOfBeerInMyF (813746) on Saturday December 01 2007, @07:50PM (#21548317)

            ...there have also been plenty of complaints that the OSX version is buggy and doesn't run as well.

            Umm, I've mostly heard complaints that the Windows version is buggier actually. There is plenty of software that is badly ported or not available on OS X, but you picked a crappy example. Of course it cuts both ways, since iTunes on Windows is pretty crappy by comparison, and you can't get OmniGraffle at all.

            Plus how many people avoids becoming switchers because you can't run games?

            Some, but not as many as most people on Slashdot probably think. The hardcore gamer market is not as large as it is vocal. The casual gamer has a several year old machine and by the time they own one that can play a given game, most of them (especially outside the hardcore market) are ported to OS X. The top 10 games in a given year account for about half of game sales, and the last time I checked, 8 out of 10 had been ported within a year.

            When did they release a Mac version of Halo? What about Halflife?

            That's where a lot of people are misled. Most gamers could not run Halo on their machine for years, even if the owned a PC. And what most people care about is The Sims. In fact, if you look at the list of top selling games of all time, according to wikipedia you have:

            1. The Sims (16 million shipped) - simultaneous Windows and Mac release
            2. StarCraft (9.5 million) - simultaneous Windows and Mac release
            3. World of Warcraft (9.3 million subscribers) - simultaneous Windows and Mac release
            4. Half-Life (8 million) - Windows release only, no Mac - there are some interesting theories why.
            5. Diablo II (4 million) - simultaneous Windows and Mac release
            6. Myst (6 million) - Mac release before Windows

            Do you see how the average, gamer who is not hardcore would not be too perturbed by the lack of choice?

    • One of the major downsides to using OSX is that there isn't as much software available for it.
      Quite true. I've not seen an OSX virus, trojan or spyware in years.
      • Try not to say the same thing twice in your subject, because that's redundant, which means you're saying the same thing twice and being redundant.
    • by Anonymous Coward on Saturday December 01 2007, @05:16PM (#21547385)
      That is not true. Anyone remember when IBM did this with OS/2? It killed the market for OS/2 software, because every developer just wrote for the lowest common denominator (Windows) instead of making "native" OS/2 software. Adding Windows application support in Mac OS X would kill the platform slowly.
    • The Mac equivalent of Win32's WriteProcessMemory requires your program to be setgid procmod, so essentially you'd need Administrator access. This probably makes Mac malware considerably more difficult to make than on other platforms. Even Linux lets programs ptrace each other on all by the strictest of SELinux modes. Also, on Linux, a lot more machines have GDB installed, so malware could pipe to it when SELinux does interfere. Few Mac users have GDB installed.
    • Unlikely (Score:4, Informative)

      by makomk (752139) on Saturday December 01 2007, @05:58PM (#21547673) Journal
      This seems unlikely. Self-extracting zips are basically a standard zip file with an extractor .exe stuck on the front. Since the zip header is at the end of the file, there shouldn't be any need to parse the PE format (in fact, I don't think it'd help).
    • Re: (Score:3, Interesting)

      if Microsoft included support for running OSX binaries, people would be crying "Anti-competition!" faster than it would take to load up Notepad.

      Why would anyone cry that? If Microsoft started doing that folks would mostly be too busy being shocked, because it would primarily benefit Apple: Developers could write software natively for OSX using Objective C, Cocoa, and (otherwise) Apple's native toolkit, and be able to still target Microsoft's audience, rather than writing only for the lone larger-audience pr

      • Developers could write software natively for OSX using Objective C, Cocoa, and (otherwise) Apple's native toolkit, and be able to still target Microsoft's audience, rather than writing only for the lone larger-audience proprietary platform and leaving Apple's userbase unable to run their software.

        Back to the future! NeXT did exactly that in a previous life, after their hardware business dried up, as OPENSTEP [wikipedia.org].

        Any software Apple produces for Windows will probably be using this win-cocoa layer, particularly as carbon and any legacy carbon support they might have had in Windows is defunct. For everyone else there's GNUstep [gnustep.org]