Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Find all non-Universal applications Apps
Tiger only hintI love my new MacBook Pro with its Intel processor. Unfortunately, not all of the applications that I want to run are Universal. While I am impressed with Rosetta, I eventually want my machine to be 100% Rosetta-free. As I work with this machine, I am finding it hard to keep tabs on which applications lack Intel support. As a result of this frustration, I created a small script to crawl through a directory, such as /Applications, and give me a status report on which programs eventually need to be upgraded/replaced. This not only looks for applications, but also some where just part of the application is PowerPC only.

Copy this code...

#!/bin/sh
# Major limitation, this script assumes that your .app files are in
# /Applications, if someone wants to extend it to work better, please
# do.
# This script will search through a directory that contains .app files 
# and report back which applications are not yet compiled for intel.
# It will also tell you if just "part" of .app is still powerpc only, 
# Garage Band is a good example of this.
# A typical execution of this script would be ./checkbin.sh /Applications/
# This script was developed for personal use, therefore it is far from perfect.
# - chriskearney@gmail.com
if [ "$1x" = "x" ]; then
  echo "usage  : $0 "
  echo "example: $0 /Applications/Utilites"
  exit -1
else
  if [ -d "$1" ]; then
    searchdir=`echo "$1" | sed 's//$//'`
  else
    echo "$0: ERROR: $1 is not a directory"
    exit -1
  fi
fi
find $searchdir -type d -name MacOS -maxdepth 3 2>&1 | 
while read line
do
  app_home=`find "$line" -type f -maxdepth 1 -perm +a=x`
  echo "$app_home" | 
  while read app
  do
    result=`file "$app"`
    echo "$result" | grep "executable" | grep -v "universal" | grep -v "for architecture" >> /tmp/$0.notuniversal.$$
  done  
done
cat "/tmp/$0.notuniversal.$$" | grep "ppc" | awk -F/ '{ print $3 " nt(" $6 ")" }' >> /tmp/$0.output.$$
echo "The following Applications have executables with no intel support: "
echo "-------------------------------------------------------------------" 
cat "/tmp/$0.output.$$" | sed -n 'G; s/n/&&/; /^([ -~]*n).*n1/d; s/n//; h; P'
echo "-------------------------------------------------------------------" 
rm /tmp/*.$$

Save it into a file called checkbin.sh on your Mac, then run the following two commands in Terminal:
$ chmod +x checkbin.sh
$ ./checkbin.sh /Applications/
The script will then tell you which applications need to be upgraded.
    •    
  • Currently 3.60 / 5
  You rated: 5 / 5 (5 votes cast)
 
[14,247 views]  

10.4: Find all non-Universal applications | 6 comments | Create New Account
Click here to return to the '10.4: Find all non-Universal applications' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Find all non-Universal applications
Authored by: jackb79 on Apr 25, '06 08:02:14AM

An Easier way would be to go into sys profiler scroll down to where it says applications and then sort it by kind. That way you'll get a list of all the powerPC apps you have and no need to write scripts.



[ Reply to This | # ]
10.4: Find all non-Universal applications
Authored by: fds on Apr 25, '06 08:35:10AM

This script appears to miss old-fashioned non-bundled executables, such as those of Microsoft Office 2004.



[ Reply to This | # ]
10.4: Find all non-Universal applications
Authored by: julian1008 on Apr 25, '06 10:19:27AM

Another technique is to use iClock which can be downloaded from this page:
http://www.scriptsoftware.com
Besides being a feature rich replacement for the OS X clock it also has an application menu (aka OS 9) in the menu each active application says right next to it Rosetta if it is not a universal binary on an intel mac. Its an easy way to see at any moment (when you have a slowdown) if a non- universal app is open.



[ Reply to This | # ]
10.4: Find all non-Universal applications
Authored by: mike3k on Apr 25, '06 01:04:18PM

Activity Monitor also has a column that displays whether the process type is intel or powerpc.



[ Reply to This | # ]
10.4: Find all non-Universal applications
Authored by: adrianm on Apr 25, '06 10:51:43AM

It's a pity there isn't a spotlight metadata attribute for universal binaries.... public.executable, com.apple.application, etc are all there, but nothing for architectures.



[ Reply to This | # ]
10.4: Find all non-Universal applications
Authored by: Hal Itosis on Apr 25, '06 04:19:33PM
Someone already posted this in another hint (to find Intel coded executables):

2>/dev/null find -x . -type f -perm +111 -exec lipo -info '{}' \; | grep -Fw i386

So naturally, this will find the opposite:

2>/dev/null find -x . -type f -perm +111 -exec lipo -info '{}' \; | grep -Fwv i386

-HI-

[ Reply to This | # ]