Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Apple Businesses

Apple Win32 to OS X Porting Guide 322

BoomerSooner writes "Apple has released a Win32 to Mac OS X Porting Guide for C/C++ developers. This Guide is to get you started porting an existing procedural Win32 application written in C or C++ to Mac OS X. It looks like Apple is getting a bit more aggressive toward Microsoft."
This discussion has been archived. No new comments can be posted.

Apple Win32 to OS X Porting Guide

Comments Filter:
  • Step #1 (Score:3, Interesting)

    by swordboy ( 472941 ) on Tuesday December 24, 2002 @11:53AM (#4952621) Journal
    Get this [codewarrior.com]!

    It does wonders for cross-platform development.
    • Re:Step #1 (Score:5, Informative)

      by Anonymous Coward on Tuesday December 24, 2002 @12:02PM (#4952693)
      I have developed with Codewarrior for years. Yes, the compiler suite is cross platform... or more correctly "Metrowerks make products for both platforms".

      NO, the API is not cross platform. MFC/Win32 on Windows, Carbon/Cocoa/Toolbox on the Mac. API code you write for one is not compatible with the other

      Just so you know, before you go out downloading CW from hotline.

    • Re:Step #1 (Score:3, Funny)

      by ajiva ( 156759 )
      Get this [sun.com]

      It does wonders for cross-platform development
  • Huh? (Score:4, Funny)

    by phillymjs ( 234426 ) <slashdotNO@SPAMstango.org> on Tuesday December 24, 2002 @11:53AM (#4952624) Homepage Journal
    That's funny. I'm on a Mac and yet my mouse has two buttons and a scroll wheel that can be a 3rd button.

    And what are these "floppies" of which you speak?

    ~Philly
    • Hit the wrong 'reply' link.

      This should be a reply to this post. [slashdot.org]

      ~Philly
    • by goombah99 ( 560566 ) on Tuesday December 24, 2002 @12:18PM (#4952827)
      Sorry to repost this but it gets tiresome to see the same misinformation out there. read on.

      Dear Unix user, welcome to mac. If you trust me you will just do all of the following without asking why, before you start whining about features you miss. The following is a no-fat-added list of essential customization for unix users converting to the mac world.

      1. The Mouse.
      Go buy a 3 button USB mouse. Make sure you get an optical mouse with a wheel. Buy the most expensive one you can. Heriditary mac users prefer a 1 button mouse, but you wont.

      2. The Terminal.
      Open /Applications/Utilities. Drag the terminal.app to the Dock

      3. File system journaling
      Open the terminal.app and type
      sudo diskutil enableJournal /Users
      Just do it. This can be undone and you can change how you want it later.

      4. The Compiler
      Regardless of what compiler you prefer, you need the native compiler and libs. Go to
      http://developer.lanl.gov and register for free. Enter the site and select the downloads option. Scroll through the list till you find "developer tools", download and install it.

      5. Installing GNU ports part 1.
      Goto http://sourceforge.com and find the latest stable release of "fink" for mac os X. download and install it. There will be some questions to answer, just choose the defaults except if offered, ask it to get updates from CVS.

      6. Install X-windows part 1
      If you have 5 hours to you can wait, type in the terminal
      fink install xfree86-rootless
      this is preferred as it gets the latest release of a fast changing package.
      If you are in a hurry you can install the binary.
      Type
      sudo dselect
      Quick intro to dselect: after some preliminaries you are offered the chance to choose packages from a list. Use the down-arrow key to move down and find xfree86-rootless.
      Press the + key to select it. You will be offered "conflict resolution": accept the defaults by pressing return. Then return again to exit the selection. DO NOT GET GREEDY and select other packages yet. Finish the installation.

      7. Installing X-windows part 2: the window manager
      You may prefer fvwm2 or some other window manager but take my advice and try out oroborus first. Oroborus does things the mac way, and later you will be glad you did even if its not familiar at first. Oroborus deliberately eschews many popular features, letting the OS provide those services. For example, if you want virtual screens you DO NOT want them as part of the windows manager! You want them as part of Aqua so that they apply to both aqua and to x-windows. Likewise you want the Dock to manage minimizing windows not the window manager.
      Go to http://apple.com click the OSX tab, then the downloads tab and find oroborus.
      Note: the oroborus that comes with Fink/dselect is not quite the same thing.

      8. Installing GNU ports part 2.
      Use dselect or fink to install a few packages. Fink has about 2000 packages available including your favorite parts of kde and gnome. To see what's avalaible type
      fink list | more
      just for practice try installing gv (ghost view) and xemacs.
      Remember, dselect will install binaries (fast), and fink will install source (slow), generally dselect is a good idea. Once a month type "fink update-all" or update packages in dselect.

      9. Text editor
      Goto http://www.barebones.com and get a free copy of bbedit "lite". I recommend buying the full version, especially to geeks. Note that you can save files in unix/mac/PC formats which have different end of line characters. Despite the name, on a mac you should normally use unix format. Mac mode is mainly for historic reasons but gums up unix commands. Even if this (amazingly) does not turn out to be your preferred editor, you should install it anyhow so that it is there for guests.

      10. Mounting network disks
      You can mount NFS disks by creating a file that looks just like the usual /etc/fstab file. It does not matter where you put it since the mac will ignore it. To mount the disks type "sudo niload fstab" followed by the file path name. However, don't do this right away till you have more experience. Instead do the following.
      In the finder window, select go>servers. In the text field type
      nfs://xxx.xxx.xxx.xxx/hostpath
      Where xxx.xxx.xxx.xxx is the ip address or domain name of the host with the disk, and /hostpath is the exported fs. The disk will be mounted in /Volumes and be "aliased" to the desktop.
      To mount windows network disks we use
      smb://xxx.xxx.xxx.xxx/path
      Be nice and unmount your disks (throw them in the trash) before disconnecting from the net.

      11. using X windows across the network.
      All the usual stuff (like xhosts and DISPLAY) works as expected. However you do need to activate oroborus (which will fire up X-windows) since its not on by default. However, before you do this let me suggest an alternative you may find better. Goto http://apple.com and on the osx downloads page locate VNCdimension (or VNCthing) and install this application. On the X windows client, run vncserver. And on the mac attatch to it using VNC dimension. On anything but the fastest network connection you will find this smoother and faster than using x-windows. Plus its more secure and even runs through firewalls. At present much of X-windows on the mac is not graphics accelerated, but VNC dimension which runs in aqua is.

      12. Shortcuts worth knowing about
      On your unix machine to run netscape you type /usr/bin/Netscape &
      on a mac you type
      open /Applications/Netscape
      to open the file browser at the current working directory type
      open . (note the period)
      to open a web page type
      open http://macosxhints.com

      13. Pitfalls
      There are few pitfalls in the file system you need to know about early on.
      First be careful with cp,mv,rsync, and tar. For 99.9% of the time they work as expected. But a lot of mac applications and mac documents store info in something called the "resource fork" of a file. Unix files only have a single data fork. Mac files have a data and a resource fork. The data fork is the same as what you would see on the unix system. The resource fork can contain almost anything, but usually contains unimportant meta-information about the file itself like what app created it, and so on. But sometimes it contains crucial information (e.g quicken).
      When you do a unix cp or mv or tar all you get are the data forks. The rule of thumb is this: if your file can be used by a unix program then dont worry about the resource fork. Most modern mac apps do not use the resource fork but older ones do.

      Second, mac filenames are case-insensitive but case preserving. Thus ReadME and readme are the same file.

      Third, unfortunately, for backwards compatibility there are two different kinds of soft links on a mac. One is the usual unix soft link and the other is the "alias" function of the OS. The OS is smart enough to recognize the unix links and treat them as file aliases in the GUI. But the reverse is not true. Generally you are better off using the unix soft links.

      Fourth, macs have three layers of file permissions where unix has one. Macs have the usual unix permissions. Plus there is an ability to lock a file against changes or deletion, and finally there is the ability to lock a file against modification even by root. generally you wont ever need either of the latter two, but you may someday find a file you cant seem to delete! just in case, the normal file lock is accessed via "get info"

      Fifth, fstab, exports, shadowpassword, passwd, and most unix configs don't work the way you expect. Use the admin tools to alter netinfo configuration data. (see root below)

      14. Thinking mac-like.
      First off you never need to touch the other mouse buttons outside of x-windows. Second, try to adopt apple applications where they exist to replace you current favorites. For example, use the mail.app instead of pine or Eudora. Sure these have nice features, but long term apple apps will stay more tightly integrated: for example, mail.app links to addressbook which links to iCal. Third, Chill-out dude. Macs force you to do things a certain ways with warning dialog boxes or focus-on-click windows. These are not worse than other ways, and long term you will come to see the benefits from the cross-application uniformity of operations. Unmount disks, especially network disks, by tossing them in the trash. (you may want to add an eject button to the finder menu)

      15. Viruses, Worms, holes, etc...
      Regularly use the software update feature. Bugs get patched quickly. Historically, the only security holes you must stay on top of are Microsoft Internet Explorer holes, Microsoft Entourage/outlook holes, and Microsoft macro viruses. Don't bother worrying about anything else till you worry about these. Many people use Chimera for this reason.

      16. Root
      If you read just one book try "mac OS X for unix geeks", most other books aren't for you because they are trying to explain unix to mac-heads. Avoid using root when you can use an admin tool or sudo instead. Apple has not fully document root admin, so stick with tools. Except don't ever play with netinfo manager or niload until you have a lot of experience, as there is no faster way to make your mac unbootable.

      17. Goodies
      There are virtual window managers at mac OSX downloads.
      Try out Watson at http://www.karelia.com/watson/
      Microsoft office X is a great program even if it is made by Microsoft.
      Scientific plotting: You may like Igor from wavemetrics.com since it has both command line and menu driven interface. Fink comes with R, Octave and Gnu-plot. Mathematicians may prefer mathematica.
      If you have a powerbook, put the dock on the left and make it small.
      Turn off autostart on OS 9.0
      Discover iTunes.
      Consider a mac.com account
      Read http://macosxhints.com

      • I know your intention was good.

        But, wouldn't it be easier and cheaper to buy a PC and install Linux.

        Answers on your thinking what to say next
        1. No, I don't need any commercial applications, at least mac doesn't cover that department of software
        2. No, I my case is much nicer than Apple case, I'm very selective one
        3. Yes, I tryed OSX, even Jaguar, toooo sloooow

        • If you don't want what OS X has to offer (which is quite a bit), then yes goddammit, use Linux on x86. The only reason there is a long explanation for all this stuff is because this is the way to get comfortable with the Mac OS X environment if you are a Linux user.

          So, yes, your implied conclusion is correct-- it's easier to do what you have always done and not try something new, especially if you don't care about the advantages of the alternative.

          Congratulations.
          • Wrong, nature of my bussines forces me to use MacOS and MacOSX.

            So after 4.5 years of use of Apple. Where's that something new you say about? This interests me, really no trolling.
            My point of view is: (no troll)
            1.slower than MacOS
            2.more ofensive to the eyes than MacOS
            3.Not as friendly
            4.confusion is on much higher level than MacOS (read as, not that simple), well confusion is even higher than in Linux (at least linux is a Unix like and not some semi hidden (system level) unix like OSX made with compromises)

            I care about alternative, That's the main reason I switched from Windows (was using it at home (and ashamed of the fact) and it's still 30% need in my bussines), Mac (slowly moving off), SGI and HP-UX (my first and best) to Linux:-).

            "way to get comfortable with the Mac OS X environment if you are a Linux user"
            So I should buy expensive material and build my self a Mercedes? Well, it's way more simple if you buy a Mercedes. To stay at the fact, he was promoting administrators desktop not users desktop, so... why all that work when there is a better solution? Isn't that what Apple promotes or is just me?
            On the other hand this "comfortable" is not correct, this would be running from the fact and evading running native tools and software. You don't mean to say they will run on OSX forever, at last, Apple is a commercial company

            But damn, you should listen sometimes to what you say, what you said at the end is smart and you can say that to almost every begginer or promoting almost anything. So try alternative, I did

        • But, wouldn't it be easier and cheaper to buy a PC and install Linux.

          Run photoshop, dreamweaver|flash|director, logic and microsoft office at a reasonable speed and stability in linux out of the box. I dare you. If you dont need any commercial applications you must be living in some sort of cave or crazy commune.

          The parent post was just illustrating that osx does nearly all the things people like about free unix-like operating systems.
          • I run
            Gimp (photoshop, thanks but screen doesn't need CMYK or process colors, for anything better Gimp suites me better, but maybe is that just me),
            HTML, DHTML, perl and php and SVG (dreamweaver|flash|director no thanks, I don't wanna burn someones processor, and as you guessed in any editor that support them),
            (what is that? I guess I don't need it) logic
            Open Ofice (microsoft office - all my documentation is larger than 50 pages so I'm tired of reformating)
        • Well, considering points 1, 2 and 3 I suppose it would be easier for you to buy a PC and install linux. However, I have this sneaking suspicion that the world does not revolve around you. I could be wrong, of course.
      • You forgot about signing up for a free Apple Developer Connection membership and getting Apple's developer software for free!

        http://connect.apple.com/

      • 13. Pitfalls

        Third, unfortunately, for backwards compatibility there are two different kinds of soft links on a mac. One is the usual unix soft link and the other is the "alias" function of the OS. The OS is smart enough to recognize the unix links and treat them as file aliases in the GUI. But the reverse is not true. Generally you are better off using the unix soft links.


        Great post, but I have to take issue with this one. MacOS aliases are far superior to symlinks IMHO. By storing the file ID and other meta-information about the original file (creation date/time, modification date/time, file name, size, creator, type, etc...), the alias has a much higher chance of identifying the proper file should the original file move.

        In fact, you can do pretty much anything to a file you want (short of moving it to another volume and deleting the original) and chances are the alias will still be able to track it down (and update itself) when you double-click it.

        It's an old-school MacOS concept that Unix geeks would do well to learn from.

        • In fact, you can do pretty much anything to a file you want (short of moving it to another volume and deleting the original) and chances are the alias will still be able to track it down (and update itself) when you double-click it.

          If you do manage to "confuse" an alias, a friendly dialog box will pop up when you double-click on it asking you if you'd like to manually associate it with the original, or just delete it. It's stuff like that that really puts Mac OS X head and shoulders above the other UNIX-based and UNIX-like operating systems.

          It's an old-school MacOS concept that Unix geeks would do well to learn from.

          It's not that old school, is it? If I remember correctly, aliases were a new feature of System 7, back in 1990 or thereabouts. Old school Mac stuff dates back to the mid-1980's. Man, I remember early '86 and the first Mac Plus. System 3.0 was sweeeeeet. It had filesystem caching and allowed you to create nested folders. And it won InfoWorld's People's Choice Award for OS of the Year.

          Those were the days, man. I can still close my eyes and hear the sound of the startup beep and of the original Mac floppy drive humming quietly to itself as the machine booted up. So warm and friendly. Mmm.
      • Don't forget to shut off the silly bouncing icons in the dock.

        I have a 266 Mhz Wallstreet Powerbook, with 192MB RAM, and a 20 GB HDD.

        It makes a bigger diffrence than you would believe to the speed of the machine.
      • by jafac ( 1449 ) on Tuesday December 24, 2002 @03:08PM (#4953923) Homepage
        SWEET.

        Even as a veteran Mac user and unix wannabe for the past several years, I learned a lot from your post. Comments:

        1. Older Macs (Beige G3) have ADB instead of USB - and nobody is writing device drivers for ADB devices in OSX. So if you have one of these older machines, *DO* invest in a USB card. However, with 10.2, there seems to be some whacked out performance bug with USB devices that slows the whole system down, so you might want to stick with 10.1.5 until they've nailed it. No, 10.2.3 does NOT fix it.

        2. I can't recommend highly enough, the wonderful shareware terminal replacement, GLTerm. It's so much faster than the regular terminal, you'll often wonder just what the hell terminal.app is doing with all it's time. Maybe browsing the net for porn? Who knows?

        7. Orobourous is extreeeeeeemely unstable. Unless they've fixed it since I tried it 6 months ago. I think Windowmaker is best. It's patterened after the NeXT GUI - so it's really the GUI OS X *should* have, was meant to have.

        9. mi is a great little editor - and it's free.

        13. 'ditto' is the command-line copy utility that is "resource fork" aware.

        14. One of the great joys in life is opening new browser tabs in the background by clicking on links with the scroll-wheel button in Chimera. Chimera is great for it's non-bloatedness, but it REALLY need's ad-server blocking like it's older brother, Mozilla.

      • I'm a unix user since 1996, I don't mind using a
        one-button mouse.

        Why journaling? It's not useful for most people.

        The compiler should be gotten from Apple, not from
        lanl.gov. And developer.lanl.gov doesn't exist.

        The window manager to use is OroborOSX, not
        oroboros. That's why it's different from the one
        in fink.

        The "extra layers of file permissions" you speak
        of are not unique to Mac OS X. On any BSD
        system, look at the man page for chflags(1), and
        see the '-o' option to ls(1).

        Starting with version 10.2, some of the files in /etc are checked before NetInfo. So some of
        those files you mention _can_ be used in the
        traditional way.

        I don't think it's very cool to complain about
        misinformation and then post a ton of it. You
        posted some excellent advice as well, but I was
        only able to tell the wheat from the chaff
        because I'm already familiar with unix and Mac OS X.
    • How much extra did the new mouse cost ya? I guess you can afford it, what with saving all that money by buying a Mac and all...
    • That you can fix the brain damage doesn't mean it should have shipped with brain damage.

  • Cool....does Apple happen to have a similar guide to porting Unix apps to use the Cocoa interface? I know OSX supports X apps natively, but it would be nice to be able to make, say, the Gimp to be a true Mac app.
    • Re:X-OSX? (Score:5, Informative)

      by Anonymous Coward on Tuesday December 24, 2002 @11:57AM (#4952658)
      Why yes there is....

      http://developer.apple.com/techpubs/macosx/Darwi n/ GettingStarted/PortingUNIX/
    • I know OSX supports X apps natively,

      That's not quite right. There is an X11 server that runs on OS X, a port of XFree86. But it works by doing drawing off-screen in software and then blitting the result into OS X windows. While it's usable, it's not what I would consider a high quality implementation. It's also too confusing to install and use for regular Mac users.

      OS X could support X11 natively so that the difference between an X11 application and a Cocoa application would appear to be no larger than the difference between a Carbon or Classic application and a Cocoa application, but Apple has chosen not to be that compatible.

      but it would be nice to be able to make, say, the Gimp to be a true Mac app.

      That would mean making an OS X backend for Gtk+. That may well happen (there is a Win32 backend). It's really a question of resources and volunteers. Do you volunteer?

  • by masonbrown ( 208074 ) on Tuesday December 24, 2002 @11:57AM (#4952664) Homepage
    It's great to see all this documentation coming out. For the first couple of years, it was difficult at best to find any information about the internals of MacOS X. I still don't know of any decent reference for NetInfo administration. O'Reilly's helped alot though.....
    • For the first couple of years, it was difficult at best to find any information about the internals of MacOS X.
      It's a Unix box: man(1) works.
      I still don't know of any decent reference for NetInfo administration.
      man netinfo
      • [localhost:~] twirlip% man netinfo

        NETINFO(3)

        NAME
        netinfo - library routines for NetInfo calls

        SYNOPSIS
        #include <netinfo/ni.h>

        DESCRIPTION
        These calls are the programming interface to NetInfo.
        Typically, a handle (of type "void *") is allocated
        through a call to ni_new, ni_open, or ni_connect. This
        handle opens a connection to the given NetInfo domain.
        Read calls may go to either the master or the clone
        servers, while writes will always go to the master server.
        If the master is unavailable, no writes can be performed.
        The handle is then passed to one of several NetInfo rou-
        tines for database operations and then freed using
        ni_free. Several utility routines are also supplied which
        operate on NetInfo data structures. These routines don't
        require NetInfo handles.
        Great advice, you jerk. If you're going to respond to something like this, the least you could do is offer help that's actually helpful [apple.com]. (Note: that link points to a 62-page, 1.9 MB PDF called "Understanding and Using NetInfo.")
        • If you're going to respond to something like this, the least you could do is offer help that's actually helpful.
          It is helpful to those who have been programming Unix systems longer than you've probably been alive. The fact that it may not be helpful to you isn't relevant.
          • It is helpful to those who have been programming Unix systems longer than you've probably been alive. The fact that it may not be helpful to you isn't relevant.

            No, it's not helpful in the slightest. The poster said he was looking for information on administering NetInfo. You pointed him to the NetInfo API documentation. You missed the boat, friend.
            • The poster said he was looking for information on administering NetInfo. You pointed him to the NetInfo API documentation.
              OK, you got me there. But still, any old Unix salt would reflexively try apropos(1):

              $ apropos netinfo
              netinfo(3) - library routines for NetInfo calls
              netinfo(5) - network administrative information
              netinfod(8) - NetInfo daemon
              nibindd(8) - NetInfo binder
              nicl(1) - NetInfo command line utility
              nidomain(8) - NetInfo domain utility
              nidump(8) - extract text or flat-file-format data from NetInfo
              nifind(1) - find a directory in the NetInfo hierarchy
              nigrep(1) - search for a regular expression in the NetInfo hierarchy
              niload(8) - load text or flat-file-format data into NetInfo
              nireport(1) - print tables from the NetInfo hierarchy
              niutil(1) - NetInfo utility

              Looks like oodles of relevant information to me.

    • by apuku ( 576996 )
      "Mac OS X Unleashed" by John Ray and William C Ray has a lot of good stuff on NetInfo - clustering, NFS mounts, user management, etc.

  • Marklar (Score:4, Interesting)

    by Znonymous Coward ( 615009 ) on Tuesday December 24, 2002 @12:03PM (#4952709) Journal
    >> It looks like Apple is getting a bit more aggressive toward Microsoft.

    The ultimate aggressive move would be to release Marklar [eweek.com], the x86 version of Mac OS X.

    • Re:Marklar (Score:4, Funny)

      by Twirlip of the Mists ( 615030 ) <twirlipofthemists@yahoo.com> on Tuesday December 24, 2002 @12:14PM (#4952798)
      The ultimate aggressive move would be to release Marklar, the x86 version of Mac OS X.

      I'm sorry, but I think you typed "aggressive" when you meant to type "suicidal."

      It's a common mistake. The keys are right next to each other.
    • I don't think it's time yet. Marklar would be the equivalent of going nuclear. Apple needs a solid MS-compatible office suite first. Appleworks 6.x isn't sufficient, and Open Office is MILES away from being ready.

      Beyond a professional office product, what else would Apple need from Microsoft? Chimera/Navigator is already superior to IE as a browser (just a few more show-stoppers, and it will be ready to come out of beta). Almost all the major commercial wares are ported over. When the time is right, I think Apple should go it alone.

      OS X on x86. Boy, that would beat the heck out of Win XP.
      • "Open Office is MILES away from being ready."

        Not really. It certainly needs polishing, but it's hardly hackware. In fact if Apple put half a dozen engineers on it for a year, they'd have their own MS Office killer within a year.
        • > Not really. It certainly needs polishing, but it's hardly hackware. In fact if Apple put half a dozen engineers on it for a year, they'd have their own MS Office killer within a year.

          Absolutely--but it's not ready now.

          God bless the developers who work on Open Office, but I think they have forther to go on the OS X port than you indicate. They're not close to getting it onto Aqua. Beyond that, Open Office will need substantial modification if it's going to conform to Apple's user interface standards.

          It MUST be super-stable for professional use.

          You're right: an Apple development team and a supported commercial release would be best. It was rumored last summer that Apple was working on a port of Star Office. The reports were followed by all manner of denials after the Open Office developers heard of it.

          My guess is that Apple is hard at work on AppleWorks 7.0, and it's based on Star Office. Guess we'll see.

          Go, Apple!

  • by Y-Crate ( 540566 ) on Tuesday December 24, 2002 @12:05PM (#4952725)
    ......is that if you decide the Apple Interface Guidelines do not suit you, and you just keep using whatever scheme you decided on for your Windows app, you may find yourself staring failure in the face.

    Over the years, many people have ported many Windows apps over the Mac without bothering to make them work like Mac apps. The Mac UI is a a look and feel. Users expect and demand that applications follow certain guidelines. They expect and demand that their apps will look and function like something Apple churned out last week.

    Many have thought these expectations would be overhshadowed by the desire by users to run their apps or other conditions.

    It rarely happens.

    Developers who port apps to the Mac without following the Interface Guidelines to the letter more often than not find themselves with few customers and little goodwill in the community. Which can doom any futher efforts on their part in the future.
    • I think the look-and-feel issues would also apply to Java applications; yet Apple provides and supports a Java runtime as part of Mac OS X. Apple users are quite right to demand a consistent look and feel from their applications; nonetheless it's better to have a slightly quirky port of application Foo than no port at all. At least this is true if you are migrating from Windows and there are certain apps you still need to run (which seems to be Apple's target market ATM).

      Would it make sense to port Wine to Mac OS X - perhaps using an X server or maybe rewriting Wine's display code to use Mac OS native widgets?
      • Would it make sense to port Wine to Mac OS X
        From what I understand (and this may be wrong), that would be impossible.
        Wine Is Not an Emulator - it does not emulate the PC, it just provides libraries to replace the functionality provided by all the windows DLLs and libs. Due to that, it is incapable of running Win programs on a different processor type. To run Win32 progs on Macs would require a full-fledged pentium Emulator, which WINE is not.
        This may be incorrect, but this is my understanding of the situation.
      • I think the look-and-feel issues would also apply to Java applications; yet Apple provides and supports a Java runtime as part of Mac OS X.

        It's possible that I'm misunderstanding your point here, but you are aware that native Java Swing apps can easily tweaked to use the Aqua UI, right? By default, Swing apps use Aqua widgets, but just a few minor (and cross-platform compatible) tweaks can enable things like the system menu bar, Aqua scrollbars, Aqua pop-up menus, and so on. The result is a Java Swing application that runs on any platform with the right JRE, but that on a Mac is indistinguishable from a native Cocoa or Carbon application.

        There's a tech note here [apple.com].
      • Would it make sense to port Wine to Mac OS X - perhaps using an X server or maybe rewriting Wine's display code to use Mac OS native widgets?

        The amount of effort required to simply make WineLib (ie windows apps recompiled for wine) work on Linux/PPC was huge. Making it work on MacOS would require the integration of a Pentium Emulator, as well as completely rewriting large parts of it (the x11drv is huge). Forget native look and feel - Windows apps expect to look like Windows apps and start looking really wierd if you try and fit them elsewhere: just imagine 32x32 8bit icons in OS X.

    • ......is that if you decide the Windows Interface Guidelines [microsoft.com] do not suit you, and you just keep using whatever scheme you decided on for your Motif/Gnome/Qt app, you may find yourself staring failure in the face.

      Over the years, many people have ported many [ethereal.com] Unix [nedit.org] apps over the Windows without bothering [wingimp.org] to make them work like Win apps. The Win UI has a look and feel. Users expect and demand that applications follow certain guidelines. They expect and demand that their apps will look and function like something Microsoft churned out last week [microsoft.com].

      Many have thought these expectations would be overhshadowed by the desire by users to run their apps or other conditions.

      It rarely happens.

    • Let me just say "ditto" to Mac developers porting to Windows. Filemaker in particular (it might be better now, I don't know), but even early Photoshop versions had just atrocious interfaces that tended to violate all the Windows standards as well.

    • All platforms have a way of doing things, or paradigm if you like that word. You need to learn that, and develop for it properly, or your apps will suffer. I've seen with with UNIX and Mac apps ported to Windows, Windows apps ported to Mac, and so on. The fact that users want a consistent interface aside, there are right and wrong ways to do something ona given OS from a system standpoint. Something that may be a good optimization under one OS may be a hell of a performance problem under another.

      No matter what platform you develop for, you need to learn it's look, feel and way of doing things. Doesn't matter if you agree with it or not, you need to understand it WELL and use it.
    • People keep talking about "consistency" on Mac OS X and how users hate it when applications are inconsistent. I'd like to see some actual proof of that.

      As far as I can tell, those claims are all a bunch of b.s. Out of the box, OS X ships with a set of applications that are far from consistent: there are Classic applications, there are Carbon applications, and there are Cocoa applications, there are applications like IE that have been clearly ported from Windows, and there are Java applications. They look different from one another. They behave different from one another.

      And you know what? I have watched quite a number of people switch to OS X (on my recommendation!), and they don't generally even notice the differences between OS X applications. As long as there is a menu bar somewhere, a bunch of clearly labeled buttons, text entry fields, etc., the applications all look and feel the same to them.

      The things that trip up users are much more subtle and happen with distressing regularity on all major operating systems: programmer centric language, confusing terminology, badly placed buttons, bad translations into foreign languages, confusing installers, etc. OS X applications are slightly better in that regard than Windows, but not a whole lot.

      A well-designed Windows or Linux or Java application ported without adaptation to OS X is probably still much more usable for OS X users than an average OS X application: in the end, ease of use isn't about having all your buttons gum-drop shaped, it's about communicating with the user clearly. And, by analogy, a good speaker with a slight foreign accent still communicates a whole lot more clearly than an average speaker with no accent.

      • OK, I'll bite. I use Mozilla on Mac OS X, but it
        frustrates me because it behaves differently from
        other applications. The major case in point: when
        an app is running and has no open windows, clicking
        on its icon in the Dock is supposed to open a new
        window. Mozilla doesn't do this, and it trips me
        up frequently.
        • The major case in point: when an app is running and has no open windows, clicking on its icon in the Dock is supposed to open a new window. Mozilla doesn't do this, and it trips me up frequently.

          That has really nothing to do with "consistency": not doing anything when the user clicks on a program icon is bad design in any GUI. This drives Linux and Windows users just as mad as OS X users. And Mozilla's startup sequence really has some serious usability problems on all platforms.

          Note that until 10.2, Apple shipped quite a number of applications that behaved the same way (I think IE used to do the same thing): those applications looked and felt "consistent", they just were confusing.

          If you want to argue that consistency matters, you have to come up with examples where consistency isn't obviously the consequence of good design. And I maintain that good design is more important than consistency: a poorly designed application that follows all Apple UI guidelines is much worse than one that looks foreign but is well-designed.

    • Users expect and demand that applications follow certain guidelines. They expect and demand that their apps will look and function like something Apple churned out last week.

      Considering that the app Apple churned out last week may or may not look like the app they churned out the week before that, and the sacred Apple HIG is basically adapted to suit whatever they think looks cool (the dock? brushed metal - introduced after 10.2 came out), I think it's a tad unfair to expect app authors to keep up with such constantly changing guidelines.

  • Useless (Score:2, Informative)

    by jon_c ( 100593 )
    Wow that's a pretty short guide. I think it came be summarized as:

    "Welcome to OSX, based on unix, which means you get protected memory, threads and other stuff. This is new to Macs, which is why we're even bothering to mention it.

    Their are a poop-load of different ways to develop for the Mac; Cocoa, Carbon, Java, Classic and even old school bsd/posix, but since Carbon is the only one that resembles Win32 we will talk about that one.

    I'm going to mention that Win32 message are a lot like the old school messages, doesn't this make it easy?, oh and we have some type of form/resource editor n' stuff.

    Now to read more here are some other articles you'll absolutely need to read before you can anything... you know what.. Why don't you just come to the developer conference: Worldwide Developers Conference sessions on Mac OS X (available for purchase) [apple.com]

    -Jon

    • Re:Useless (Score:4, Informative)

      by blamanj ( 253811 ) on Tuesday December 24, 2002 @12:19PM (#4952838)
      Perhaps you didnt notice there were links [apple.com] to additional pages?

      * 2D graphics
      * 3D graphics
      * User Interface
      * Text
      * Networking
      * Multiprocessing
  • by Anonymous Coward on Tuesday December 24, 2002 @12:06PM (#4952731)
    It looks like Apple is getting a bit more aggressive toward Microsoft.

    Yeah, I heard the Fiji Islands are getting more aggressive towards the USA, too. Somehow, I don't think that will make much of a difference. Apple has two percent of the market, people. That's less than Linux. Hell, that's probably less than OS/2! If Apple had any guts, they'd release an x86 version of OS X. But they know they'd lose, so they won't.
    • >> If Apple had any guts, they'd release an x86 version of OS X. But they know they'd lose, so they won't.

      Wait until Microsoft starts with this Palladium thing. Market conditions will be just right for an x86 release for Mac OS X [macrumors.com].

    • If Apple had any guts, they'd release an x86 version of OS X. But they know they'd lose, so they won't.

      Well, they might, but the fact that it's running on an x86 will be entirely incidental - it will still be a proprietary Apple machine, with a proprietary motherboard and probably a bunch of proprietary ROMs. Apple are a hardware company. It's where they make their money, and they are reliant on controlling the hardware for their "it just works" capability.

      The x86 version exists to give Apple leverage over Motorola, not Microsoft.
  • Now, if only... (Score:2, Offtopic)

    by Chicane-UK ( 455253 )
    I wish Apple would hurry the hell up and read the 'Porting OSX to x86' guide! :)

    That would be some serious competition, and I know for one that I would definately go and buy a copy of OSX!

    I think OSX is a fantastic systems, but I just cant afford, nor can justify the buying of a mac.
    • They've ported Darwin to x86 a while ago.

      Also, their machines are nearly as elegant as the OS. Try out an ibook someday - the intro price is only $999 right now.

    • Re:Now, if only... (Score:2, Interesting)

      by Cheesewhiz ( 61745 )
      For the last time...

      Apple is a hardware company. They make money from selling hardware, not software. OS X is great in part BECAUSE it's running on a unified Apple hardware architecture. Apple does NOT, however, make money by developing software that enhances their hardware, and then selling it to an unrelated platform. Sun is another example of this, I believe.

      As a result, OS X for x86 is not going to happen. If, by some freak of an accident it does, it's going to be on proprietary, Apple-designed hardware, and it won't run on any old machine.

      If you don't believe me, go to Apple.com's support or specs section and look at how much OS X depends on the concept of OpenFirmware. This, and speed, were two reasons why OS X was not installable on Macs older than the G3. Anything without OpenFirmware is out.
    • If Apple ever released OSX for PC's, it would be their death knell. Why?

      1. Hardware: OSX will only run on a small percentage of hardware, insuring that its stability is much higher than that of Windows. If OSX were to move to x86, then it would have to support the huge swath of shitty hardware, bringing down its stability level a great deal.

      2. Customer Outrage: Mac users & Mac zealots pride themselves on being different from everyone else. If Apple made OSX available to the horde of beige boxes, they'd riot and go looking for Steve Jobs' blood.

      3. No MS Office: If OSX is released for x86, you can be damn sure that Microsoft won't port Office to it at all. And while you can use OpenOffice, or any other office app, most people don't realize they exist, and won't use them.

    • I know for one that I would definately go and buy a copy of OSX!

      No you wouldn't. It's pretty much 95% certain that your hardware wouldn't work with it. Do you see how long it took for Linux to get decent hardware compatability? Over 10 years, and it's still not perfect. The moment people started putting OS X to work anything less than highly controlled hardware, the "Just Works(tm)" factor would go out the window. Nobody, I repeat, nobody has ever been able to crack the x86 OS market before, partly because of this problem. In the real world, computers are at saturation because you can pay basically what you want for them - doesn't mean the hardware is high quality but for many low quality is better than nothing at all.

      It's for this reason that OS X will never be mainstream. Just forget about it.

  • MFC?? (Score:4, Insightful)

    by shlong ( 121504 ) on Tuesday December 24, 2002 @12:13PM (#4952786) Homepage
    I hate to say this, but this 'guide' is rather useless and looks to be little more than a reprint of marketing glossies. Don't get me wrong, I love OSX. But to imply that you can easily port MFC apps to Cocoa is humorous. Even rewriting an MFC app in Cocoa will most likely be highly frustrating due to your engineers having to change their mentality from one to the other.
  • Great! (Score:4, Funny)

    by JoshuaDFranklin ( 147726 ) <joshuadfranklin.NOSPAMNO@SPAMyahoo.com> on Tuesday December 24, 2002 @12:24PM (#4952863) Homepage
    Soon we will be able to use Cygwin on MacOSX!

    Well, as long as those lazy open-source developers hurry up and follow the guidelines.

  • by mbogosian ( 537034 ) <(matt) (at) (arenaunlimited.com)> on Tuesday December 24, 2002 @12:47PM (#4953020) Homepage
    From the guide: You will use Interface Builder to translate your application's visual appearance into the visual appearance of a well-designed Mac OS X application.

    You don't need to see his interface specification. These aren't the design elements you're looking for. He can go about his development.
  • If they were really serious about seeing developers adopt Cocoa they would have released API's allowing native access from C++.

    Instead, they were more interested in punishing everybody who didn't jump on the Objective C bandwagon back in the '80s.
  • by tc ( 93768 ) on Tuesday December 24, 2002 @01:24PM (#4953278)
    To summarise, it basically says: "We support OpenGL, so if your app uses OpenGL, you'll have no problem". It then goes on to list a few things about OpenGL, which a seasoned OpenGL developer would already know.

    At no point does it say what you should do if your Windows app is written using Direct3D. Not even a link to a D3D-to-GL porting guide.

    Regardless of the relative merits of the two APIs, it's an undeniable fact that many 3D Windows apps use Direct3D, and it therefore seems like a pretty huge oversight for Apple to not even mention how one might go about porting them.
    • They actually should have a whole section on DirectX in general. It's more than just a 3d interface, it does 2d, video, audio (music, and both 2d and 3d sound), networking, input, and also provides a common interface for audio and video filters. Plenty of stuff is written to use more than just the 3d part and that is a legitimate concern for porting as well. They really should work on producing a guide covering ALL of DirectX, and how to easiest port a program that uses the various features of it.
  • by kraksmoka ( 561333 ) <grantstern@gmail.FREEBSDcom minus bsd> on Tuesday December 24, 2002 @01:32PM (#4953329) Homepage Journal
    a /.'er livin in a hole might say: It looks like Apple is getting a bit more aggressive toward Microsoft.

    didn't you see the switchers campaign????? isn't that just a bit aggressive?

    lemme guess, you've been wearing that Ellen Fiess t-shirt this whole time, and couldn't remember why or what the ad was about?????????

  • Or perhaps Apple just had the crazy notion to discuss the cocoa analogues to the Win32 API in the hopes of attracting more developers into porting their apps to OS X.

    No Win32 with an interest in their prosperity is going to drop the holy grail for the styrofoam cup.
  • Classic (Score:2, Interesting)

    by frooyo ( 583600 )
    I find it interesting that not only does the article mention the Classic API but almost promotes the API. They never mention that Apple wants to migrate away from Classic, they only mention the pro's and con's of Cocoa vs. Carbon
  • by g4dget ( 579145 ) on Tuesday December 24, 2002 @02:34PM (#4953726)
    All you need to know is wxWindows [wxwindows.org]. The wxWindows library is quite similar in terms of design and functionality to Win32, and once you have ported to it, you can compile your application for Win32, Linux/X11, OS X, and several other platforms.

Someday somebody has got to decide whether the typewriter is the machine, or the person who operates it.

Working...