PPC/Universal

Is it possible to detect if x running process is PPC or Universal in PPC machine?

an universal binary has a PPC part and an Intel part,
and PPC machines run always the PPC part, of course :wink:

Good joke :lol: but seriously, what code tells which one x process is or how to get path of process of x and then check which one that app is? Thnx

This creates a list with format {kind, POSIX path of app, kind, POSIX path of app, kind.} gathering the data from system profiler.
disadvantage: it takes a long time (on my G5 dual 2,5 ca. 15 seconds)

set appData to paragraphs of (do shell script "system_profiler SPApplicationsDataType | grep 'Kind\\|Location' | awk '/: / {for (i = 2; i <= NF; i++) printf \"%s \", $i; printf \"\\n\"; }'")

Interesting that there’s a “Native (Preferred) or Classic” category in addition to “Universal” and “PowerPC”, and equally interesting what’s in it. Are those the Carbon apps?

I don’t think so.
The MS Office 2004 apps are listed as PowerPC and Finale 2007 is listed as Universal.
Both are Carbon apps

Cool, but now that i looked result of that code, i wonder is it possible to create 4 different variations of that code which lists Native (Preferred), Classic, Universal and PowerPC separately, now all 4 are in one big list.

Also without paths of apps so result would be just apps name: Safari.app

Thnks

What is the higher-level goal here?