Page 1 of 1
Porting windows apps to Linux/mac
Posted: Fri Jul 29, 2005 3:39 am
by dezmund
Someone said on wednesday's show (sorry, haven't learnt your voices yet), if it is supposedly so easy to port Windows to OSX/i386, why can't they be ported to Linux/i386. I think there's a basic misunderstanding here: its not that windows apps will be automagically recompiled and ran on OSX/i386 with no effort. Apple's claim is the OSX/ppc applications will be easily ported to OSX/i386.
And this is (sorta) believable because most people write their code against the API provided by the OS and various libraries. And from the WWDC keynote, it seems at least Cocoa (the major application framework for OSX) worked fine of i386. Think about it: you can easy build Gnome on Linux running on any platform with X (well, okay, thats not exactly true, but you see my point). The switch will primarily affect drivers (maybe), code written in assembly, and code written with OSX-only libraries (rare, since Apple has such a small market).
The real reason why windows applications are so hard to port over to Linux/Mac/etc is that windows developers insist on using non-portable, closed sourced libraries. If someone writes a program using DirectX, or MFC, or .NET (no, Mono isn't adequate yet), you can't recompile it on Linux because obviously MS doesn't provide those libs/API's for Linux. If a company sells an (otherwise portable) library as a windows-only binary (say, b/c they don't want to support Apple users), you can't use it a Mac.
So, I personally don't think the architecture switch will greatly effect the flow of software from Windows to OSX, or the existing apps on OSX.
Posted: Fri Jul 29, 2005 8:02 am
by Gomer_X
All good points, I think.
There are, of course, plenty of companies already porting Windows software to the Mac. I wonder if companies like Adobe and Microsoft are maintaining 2 code bases or using cross platform tools? It would be really interesting to see how Microsoft ports Office to the Mac. Surely Microsoft is a heavy user of proprietary Microsoft APIs and libraries?
There's also the case of either copying the API or using cross platform tools. Before OS/2 died, they implemented the Win32 API so Windows 95 apps could easily be ported to OS/2. Wine is another example. It's not trivial, but it's a path.
I can also see people moving to things like Qt and other cross platform tool kits and away from proprietary stuff. I've never heard anything good about MFC, and we don't need DirectX if we've got OpenGL.
I agree it won't be easy to port Windows apps to the Mac, but it'll be easier than it is now.
Posted: Fri Jul 29, 2005 6:19 pm
by CptnObvious999
If Mac got more popular it would also help Linux support from developers because more companies would use cross-platform libraries like OpenGL more.
Posted: Sat Jul 30, 2005 12:58 am
by jameslporter
People think that apple only wants OS X on apple hardware because they are greedy..They truly are addressing the main reason desktop linux fails...D R I V E R S U P P O R T
OS X runs reliable and everything "Just Works" because the kernel is made for only mac hardware.
For apple to intel move, apple just changed compile flags, used intel compiler, bug stomped and now they are ready to go. Much faster then rewriting OS X to also be completely compatible with all others.
One last thing for people talking about arch switch, the only thing this changes is that windows can run on apple hardware(because otherwise xp would have to be recompiled for PPC).
Posted: Sat Jul 30, 2005 3:40 am
by Guest
jameslporter wrote:People think that apple only wants OS X on apple hardware because they are greedy..They truly are addressing the main reason desktop linux fails...D R I V E R S U P P O R T
Are you sure? In my experience, Knoppix often recognizes more devices than even Windows XP itself (why haven't all other distro's reached this level? beyond me). If you're talking about drivers for specialized hardware, like my mom's USB microscope, you'd have a point, but such drivers are also a problem on apple.
jameslporter wrote:OS X runs reliable and everything "Just Works" because the kernel is made for only mac hardware.
You're right, because non-Apple hardware often works poorly, or not at all, on OS X.
jameslporter wrote:For apple to intel move, apple just changed compile flags, used intel compiler, bug stomped and now they are ready to go. Much faster then rewriting OS X to also be completely compatible with all others.
For plain old Cocoa/XCode apps with no 3rd party lib dependencies, sure.
jameslporter wrote:One last thing for people talking about arch switch, the only thing this changes is that windows can run on apple hardware(because otherwise xp would have to be recompiled for PPC).
Other way around. Within 3 months OS X will be running on beige boxes, OSX iso torrents will have thousands of seeds, Mac hardware sales will plummet. And you Mac users will be reduced to mere PC users, no longer special or unique or different. MUHAHAHA.
i'm personally hoping someone will get it running on Xen...
Posted: Sat Jul 30, 2005 4:45 pm
by CptnObvious999
The reason Apple has their own hardware is because they want control. Some of the Macs do look good and are very small. Appearence is what Apple is all about and by making their own hardware they can make it look how they want.
Posted: Sat Jul 30, 2005 10:40 pm
by Guest
By driver support I meant that apple only has to make sure that thier hardware works. They see MS falling on thier ass with the whole WHQL shit. Since they do hardware and software, if someone call complaining about how thier old ass usb d-link wireless adapter doesn't work because d-links mac wifi utility sucks, they can say something like, Sorrry but only first generation airport cards are supported on that machine.
I have seen dells with 2000 on them not boot because we loaded the wrong audio driver(there were only 30 for that model, don't know why I picked the wrong one...).
A lot of the driver problems with linux and mac is that the manufacturers just make sure that it works on windows. They know that they can make sales with that.
Posted: Mon Aug 01, 2005 9:51 am
by Gomer_X
Anonymous wrote:By driver support I meant that apple only has to make sure that thier hardware works. They see MS falling on thier ass with the whole WHQL shat. Since they do hardware and software, if someone call complaining about how thier old ass usb d-link wireless adapter doesn't work because d-links mac wifi utility sucks, they can say something like, Sorrry but only first generation airport cards are supported on that machine.
The original post was about porting apps to OS X from Windows. Applications don't care about drivers. They just access what they need through the OS.
Posted: Tue Aug 09, 2005 1:00 pm
by houze
I'm not an application developer. I have decent programming knowledge, and it also seems to me that porting an app would be hindered mostly by dependcies and possibly compiler support. Use gentoo, you'll learn about dependcies. I'd hate to be the guy(s)/gal(s) that have been working an apple's gcc version for compiling x86 code for the "just in case" scenario.
Anonymous wrote:jameslporter wrote:People think that apple only wants OS X on apple hardware because they are greedy..They truly are addressing the main reason desktop linux fails...D R I V E R S U P P O R T
Are you sure? In my experience, Knoppix often recognizes more devices than even Windows XP itself (why haven't all other distro's reached this level? beyond me). If you're talking about drivers for specialized hardware, like my mom's USB microscope, you'd have a point, but such drivers are also a problem on apple.
Even if Windows deosn't have the drivers.
Which happened with my tv tuner, 3com nic, nvidia nic, etc. when a did slipstremed sp2 install.
They are available from hardware manufacturor.
With OS X and Linux one can't assume hardware is well supported.
Gomer_X wrote:
It would be really interesting to see how Microsoft ports Office to the Mac. Surely Microsoft is a heavy user of proprietary Microsoft APIs and libraries?
I think it is a different branch. I use office v.x on mac. I the floating "formatting pallete" is great. The buttons, menus, etc. change automatically depending on what your doing, providing quick access to changing font, font size, spacing, wrapping, image size, etc. I find MS Office on windows to be very frustating to find things.
Last note I like OS X windows management/dock thing. The windows95 esque taskbar, minmize windows paradigm just doesn't scale up to modern setting with 10+ windows opened. I can't find the window I want,
Posted: Sat Aug 20, 2005 8:30 am
by Shack
I just joined the forums and wanted to comment on this topic. Porting apps is easy if the app is written in something like C++. C++ is designed to be portable. Recomile it on the new OS and it should work. Problem is when you use OS spacific code like .net framework. Then you have problems.