Slashdot Mirror


Apple's Unix Porting Guide

hysterion writes "Just came across the nice Unix Porting Guide (pdf) posted by Apple earlier this month. Topics include NetInfo, using Project Builder with gnumake, autoconf, XFree86, Tcl/Tk, Qt ... it is a bit short on scripting languages, and they speak as if KDE were already ported, but other than that I found it an informative read." They also didn't mention fink, and they put "Unix" in all caps. However, they were honest about the shell scripting limitations of AppleScript, although they didn't mention that AppleScript -- especially via osascript -- is pretty buggy in Mac OS X right now (this is my annoyance of the week, so allow me to indulge myself).

8 of 27 comments (clear)

  1. "As if KDE was already ported"? by Anonymous Coward · · Score: 3, Informative
    1. Re:"As if KDE was already ported"? by Ranger+Rick · · Score: 4, Informative

      Yeah, it's not 100% but we've got things mostly working. I've got screenshots (including KDE in rootless mode, very nice =) up at my web page.

      --

      WWJD? JWRTFM!!!

  2. Of course they do by Clue4All · · Score: 3, Informative

    The operating system is UNIX, not Unix, though admittedly at this point it's more of a paradigm than an OS.

    --

    Is your browser retarded?
  3. Java porting guide by pmorelli · · Score: 4, Informative

    Here's a link on porting Java apps to Mac OS X, eg, menu bar issues, tweaks that don't break cross-platform compatibility but help the Mac experience. Pretty good.

  4. As for Fink.... by zhiwenchong · · Score: 3, Informative

    This is from Fink's FAQ:

    Q2.3: What is your relation with Apple?
    A: Apple is aware of Fink and has given us some support as part of their Open Source relations efforts. In the summer and fall of 2001, they provided us with pre-release seeds of new Mac OS X versions in the hope that Fink packages can be adapted in time for the release. Quote: "Hopefully it underscores the commitment that many suspect we're not willing to provide. We'll get better at the open source game over time." Thanks Apple!

  5. Re:KDE + Darwin? by Ranger+Rick · · Score: 4, Informative

    Yes it is possible, one of the other guys on our porting team has gotten it running, we're now working on incorporating those bits so it's reproducable. :)

    That's one of the reasons we moved things over to OpenDarwin rather than keeping it just in Fink, is so the Darwin folks can take advantage of it as well...

    --

    WWJD? JWRTFM!!!

  6. OSAScript ickiness by dr00g911 · · Score: 2, Informative

    OSAscript is pretty darned cool, but it's been my annoyance of the week as well. Been playing with it the past couple of days to write a nice-looking iTunes remote for our office jukebox -- controlled via a browser, not the shell (doing it from the shell is cake, even on remote machines.)

    As Pudge mentioned, it's VERY buggy though. A few things I've noticed:

    • For remote scripting, you've gotta hard-code user names and passwords into the script that's getting executed. They don't get saved in the keychain like you're led to believe... documentation is very light, but eppc://user:pass@192.168.1.1 works. Beats typing in a user name and password repeatedly (possibly on multiple machines) even if it's an ugly and non-portable solution.
    • You can't natively launch commands via a passthru(), system() or shell_exec() command through Apache, even if they're in an external, pre-compiled .acgi or Perl file. Fortunately, I stumbled upon ACGI Dispatcher tonight (after 3 days on and off trying to control iTunes and Photoshop through apache, getting condition expected errors like mad, when the same commands work fine from the shell). Dispatcher allows you to do all of that stuff easily, and includes a iTunes remote CGI (D'oh!). Hopefully Apple will add in some provisions to facilitate OSAScript more robustly, as I'd like to stick to PHP/Perl for the heavy lifting on this stuff, and automating Photoshop (a stock photographer's back-end is one of my gigs right now) via PHP one-liners triggering 'Shop actions would absolutely rule. GDLib and Imagemagick are cool and all, but... the image quality difference on imageresample (even bicubic) and a Photoshop image size command can't even be compared when you've got people as picky about their images as photographers.
    1. Re:OSAScript ickiness by dr00g911 · · Score: 2, Informative

      I've got a way to do live data from iTunes instead of the cron task way... (I read about the cron job on MacOShints, and it seemed a bit of a kludge). It requires the ACGI dispatcher I mentioned earlier.

      Many thanks to a pile of people that wrote code for me to pick apart to get this working in my case...

      My method of grabbing info like that is:

      (from a PHP or Perl script):

      if ($cmd == "status")
      {
      $itunesreadout = virtual('/cgi-bin/itunesstatus.acgi');
      }

      Then in the itunesstatus applescript:

      tell application "iTunes" of machine "eppc://user:pass@itunes.yourplace.com"
      set ThePlayerState = player state as string

      [do state checking, decide what to do if it's not playing]

      set ThisTrack to current track
      set TrackName to name of ThisTrack
      set TrackArtist to artist of ThisTrack
      set TrackAlbum to album of ThisTrack
      set TrackLength to time of ThisTrack
      set Length to duration of ThisTrack
      set Position to player position

      set ReturnInfo to "iTunes currently playing: " & TrackArtist & TrackName & " whatever else you want to include"

      return ReturnInfo

      end tell

      This stuff is from memory, but the process and flow are up and running on our network at the office.

      The first time it runs, it'll be a bit slow, but should return info instantly afterward