radsicle.com

June17

Leopardy Shared Mac Icons

When Mac OS X Leopard shipped, it included some gorgeous illustrations of Apple’s Mac line-up that display in the “Shared” section of Finder’s sidebar and when looking at “Network” in the Finder. A Cocoa application can also take advantage of this resource for representing your machine in its interface.

These icons are hidden amongst the System Library shipped with Leopard. The folder they reside in is easily accessed by launching Finder, selecting “Go”, then selecting “Go to Folder” and entering in the following string:

/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources

All the icons beginning with “com.apple” are the Mac models that Finder recognizes (you can see them in Cover Flow or by launching them with Preview). Pretty, right? The only problem is that the Macs with built-in displays have a blue Tiger-style desktop picture.

It might seem a little late with Snow Leopard’s launch just around the corner, but I have no clue if Snow Leopard will fix this issue. So I spent a little time grafting the default Leopard desktop picture to all the Mac models with displays.

Here’s a preview of what my Finder looks like after changing these icons:

Shared MacBook Air
Finder Sidebar

Icons preview
Row of prettier Macs

I really do want to make an app like mimiFoto that modifies all of these icons. If there is enough interest, I’ll definitely look in to it.

But for the time being, I’m sharing the updated icons so that they may be installed any Mac with Leopard right now.

Installation instructions:

  1. Download the Leopardy Icons (3.6MB mediafire)
  2. Extract the zip file (if your browser doesn’t automatically)
  3. In Finder, press ⇧⌘G (or Selecting “Go” then “Go to Folder”)
  4. Copy/Paste in the following string into the text box then click “Go”

    /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources  
    
  5. Make a backup of this folder (in case something goes wrong)

  6. Copy over all the .icns files from the extracted zip file into this directory. (you may be asked to authenticate)
  7. Logout / Login to your user account or restart your Mac.

If there are shared Macs on your network, Finder’s sidebar should be looking more purple. If you have any trouble, hit me up on twitter: @kennardsmith

June11

Mac Gaming Surgery

Back when I switched from Windows to Linux, my biggest desire was to get my Windows-only apps to run in the OS. At the time, the only way to make this work was by installing WINE from source and hassling with copying DLLs from Windows into a virtual Windows installation and playing around with a fake Windows registry. It wasn’t very fun. But in the end maybe I had a chance to use KaZaA and download some MP3s.

I gave up this endeavor when I switched from Linux to a PowerBook. There was no realistic way to get this stuff working on a PowerPC Machine. Since then, there has been many advances in a Windows compatibility for Mac and Linux from WINE and in the commercial space. CodeWeavers builds CrossOver for Mac and Linux, a WINE fork that provides support for a targeted selection of Windows Apps and Games. Transgaming was the first to bring DirectX capability to the Windows compatibility layer with Cedega, a games-focused version of WINE for Linux.

Transgaming decided to position their technology as a way for game publishers to quickly get a port of their Windows-only game to Mac in the form of their platform, Cider. Essentially, each game that uses this technology gets a full distribution of Cedega built specifically for it. If you poke around the application packages of a Cider release (Spore, The Sims 3, Tiger Woods PGA, Command and Conquer 3), you’ll see a “transgaming” folder containing a faux Windows folder structure.

This structure provides pretty good coverage of what one would need to run ANY Windows game on the Mac. I’ve found that there is a sizable community that grafts Windows games on to a Cider distribution included within a retail game to let them play their Windows-only games form within the Mac OS. I find this scene to be both fascinating and brilliant. You can follow their efforts in several spots, InsanelyMac’s forum and The Game Porting Team blog. There is also an IRC channel irc.savethecoratee.org #cider where the developers discuss the efforts.

This unofficial porting is all in a legal grey area. So long as you own a copy of the Mac game that includes Cider and you own a copy of the game you want to run on the Mac, should you be allowed to move some files around to make it so? I’m no lawyer, but I’d like to think we could be able to do this without a lawsuit.

If you’re interested in playing games on your Mac but thought they were doomed to be for Boot Camp only, you owe it to yourself to poke around these communities. Maybe you’ll find a wrapper to your favorite shooter, or maybe you’ll learn how to package up Fallout 3 so that I can play it on my Mac.

May26

Ten Objective–C/Cocoa Projects to Follow on GitHub

I spent a couple of hours on GitHub while procrastinating working on an Objective-C project by justifying it as “research”. Fortuitously I came across some great projects that actually will benefit me in my endeavours, and wanted to share and make a record of them. They will likely help you in your projects too.

Blocks in Objective-C

One of my biggest desires for Snow Leopard’s developer kit is the ability to have blocks or lambdas in Objective-C. This project lets you play with this great feature before it’s officially in the OS. While it does require some setup for LLVM and Clang, it’s a relatively smooth experience.
http://github.com/PsychoH13/C-ObjC-Blocks/tree/master (MIT)

XML-RPC framework

This framework is great when dealing with XML-RPC services. For anyone who has dealt with the built in WebServices junk in Cocoa, this will make your day.
http://github.com/eczarny/xmlrpc/tree/master (MIT)

Appledoc

Generate Apple-Style Docs Using doxygen style documentation in your code. This will generate the correct markup to add your docs to XCode’s Research Assistant and Documentation viewer. http://github.com/tomaz/appledoc/tree/master (MIT)

Last.FM API

Use last.fm services in your project easily. It makes me long for a system like rubygems for XCode with a bunch of libraries that have amazing APIs.
http://github.com/westbaer/FMEngine/tree/master (MIT)

FunctionalKit

Brings functional paradigms to Objective-C. Some of the stuff is a little over my head, but the mapping of arrays led me to the next project I found.
http://github.com/mogeneration/functionalkit/tree/master (Apache)

NSArray-fucntional

I prefer this over FunctionalKit, mostly because it’s easier to wrap my head around. It is a few categories for NSArray that allows you to map, filter or reduce similar to a functional language.
http://github.com/nst/nsarray-functional/tree/master (No license specified)

GHKit

A lot of nice categories for Cocoa objects. I really like the additions for NSURL.
http://github.com/gabriel/gh-kit/tree/master (MIT)

JSCocoa

JSCocoa allows apps to be built for Cocoa in JavaScript, or even use it for the plugin system to your app. It’s interesting to watch as the developers are trying to get iPhone capability. It uses JavascriptCore so theoretically it could be super fast when using the Nitro engine from Safari 4. It would be great to see JSCocoa apps out-performing something written in Objective-C.
http://github.com/parmanoir/jscocoa/tree/master (MIT)

JSTalk

Gus Mueller wondered if AppleScript had to be implemented today that Apple would do it a little differently. JSTalk enables applications to be extended similar to how AppleScript works, but in JavaScript. Included are an Editor, a command-line tool and a framework to embed in your app.
http://github.com/ccgus/jstalk/tree/master (MIT)

PluginManager

A full-featured framework that when implemented in your projects allows users to write plugins in a number of popular languages. It gives you the necessary architecture to make your application scriptable. I can’t help but wonder how much it makes your app’s bundle size grow. It seems to include the entire MacRuby distribution.
http://github.com/Grayson/pluginmanager/tree/master (multiple licenses)