I discovered too late that Mac OS X 10.7 Lion does not support PowerPC executables as Snow Leopard did with Rosetta. I cannot say how long that would have kept me away from Lion, but I definitely would have done some more homework before taking the plunge. If you have not already upgraded, you might want to do a check to see what you might be losing: old printer drivers, scanners, obscure utilities. I have finally lost my scanner, which required a PPC driver in an old copy of Photoshop. Run one of these scripts to generate a list of all PPC-only executables on your system.

What I Lose

Of course applications that are still in development are or will be updated to Intel. It has been a few years now since Apple switched, but there are some things I will lose. My scanner is a set back. Other apps I will miss:

Actually this scan convinced me not to upgrade to Lion on my home computer, so only my laptop has Lion now.

Update: I have installed Snow Leopard in a virtual machine to retain access to my PowerPC applications.

Quick and Dirty

You can get a quick and dirty answer as to which applications are PPC-only by double clicking this script or cutting and pasting it into the Terminal.

[bash]system_profiler SPApplicationsDataType | awk ‘BEGIN { RS=”” } /PowerPC/ {print PrevLine} {PrevLine=$0}'[/bash]

It does not search your whole drive or command line programs, but if you do not use command line apps much, then this will suffice.

Thorough

The following script performs a more thorough search of your whole hard drive. The script is based on the information from a StackOverflow forum. I just jazzed it up a bit. It will take a while to run, but when it is done, you will have a text file that lists all the PowerPC-only executables on your system.

I have pasted the script below, but you can also download the file and double click it to open it in Terminal, if you are not used to working at the command line. When the script is done, it will open the text file in TextEdit for you.

Here is the thorough script:

[bash]#!/bin/sh
# Modifier: Robert Harder, http://blog.iharder.net
# Thanks to http://stackoverflow.com/questions/1406456/find-all-ppc-libraries-binaries-and-applications-in-snow-leopard
# Quick and dirty alternative:
# system_profiler SPApplicationsDataType | awk ‘BEGIN { RS=”” } /PowerPC/ {print PrevLine} {PrevLine=$0}’

# Variable and temp file setup
ROOT=/
OUTPUT=~/Desktop/ppc-only.txt
H=$(tput setab 4; tput setaf 3; tput bold)
R=$(tput sgr0)
DIR=$(mktemp -d -t $(basename “$0”))
EXE=${DIR}/executables && touch “$EXE”
EXEf=${DIR}/executables-with-file-run && touch “$EXEf”
P=${DIR}/ppc && touch “$P”
X86=${DIR}/i386 && touch “$X86”
X64=${DIR}/x86_64 && touch “$X64”
Pf=${DIR}/ppc-filtered && touch “$Pf”
Xf=${DIR}/i386-x86_64-filtered && touch “$Xf”
trap “rm -rf ‘${DIR}'” 0 1 2 15

# Initial scan of whole hard drive for executable files
#echo “Searching ${H} ${ROOT} ${R} (this could take a while)”
echo “This could take a while…”
/bin/echo -n “Looking for ${H} all ${R} executables…”
find “$ROOT” -perm -u+x ! -type d 2> /dev/null > $EXE
wc -l “$EXE” | awk ‘{print $1}’
/bin/echo -n “$(tput sgr0)”

# Determine the architecture(s) present in each file
/bin/echo -n “Executing ${H} file ${R} command on executables…$(tput sc)”
C=1
while read LINE; do
/bin/echo -n “$(tput rc)${C}”
file “$LINE” >> “$EXEf”
C=$(( $C + 1 ))
done “$P”
#find “$ROOT” -perm -u+x ! -type d -exec file {} ; 2> /dev/null | grep “ppc$” | awk ‘{print $1}’ > “$P”
wc -l “$P” | awk ‘{print $1}’

# List i386 (32-bit Intel)
/bin/echo -n “Looking for ${H} i386 ${R} executables…”
grep “i386$” “$EXEf” | awk ‘{print $1}’ > “$X86”
#find “$ROOT” -perm -u+x ! -type d -exec file {} ; 2> /dev/null | grep “i386$” | awk ‘{print $1}’ > “$X86”
wc -l “$X86” | awk ‘{print $1}’

# List x86_64 (64-bit Intel)
/bin/echo -n “Looking for ${H} x86_64 ${R} executables…”
grep “x86_64$” “$EXEf” | awk ‘{print $1}’ > “$X64”
#find “$ROOT” -perm -u+x ! -type d -exec file {} ; 2> /dev/null | grep “x86_64$” | awk ‘{print $1}’ > “$X64”
wc -l “$X64” | awk ‘{print $1}’

# Make Intel and PPC lists
cat “$X86” “$X64” | sort | uniq > “$Xf”
cat “$P” | sort | uniq > “$Pf”

# Find entries that are only in the PPC list
echo “pwd: $(pwd)” > “$OUTPUT”
diff “$Pf” “$Xf” | grep -e ‘> “$OUTPUT”
echo “PPC only in ${H} $(pwd)/ppc-only.txt ${R}…$(wc -l $OUTPUT | awk ‘{print $1 – 1}’)”
open -a “TextEdit” “$OUTPUT”[/bash]