2 # shell script to validate your iplug audiounit using auval
3 # run from terminal with the argument leaks to perform the leaks test (See auval docs)
9 PUID
=`echo | grep PLUG_UNIQUE_ID resource.h`
10 PUID
=${PUID//\#define PLUG_UNIQUE_ID }
13 PMID
=`echo | grep PLUG_MFR_ID resource.h`
14 PMID
=${PMID//\#define PLUG_MFR_ID }
17 PII
=`echo | grep PLUG_IS_INST resource.h`
18 PII
=${PII//\#define PLUG_IS_INST }
20 PDM
=`echo | grep PLUG_DOES_MIDI resource.h`
21 PDM
=${PDM//\#define PLUG_DOES_MIDI }
28 if [ $PII == 1 ] # instrument
32 if [ $PDM == 1 ] # midi effect
38 if [ "$1" == "leaks" ]
40 echo "testing for leaks (i386 32 bit)"
41 echo 'launch a new shell and type: ps axc|awk "{if (\$5==\"auvaltool\") print \$1}" to get the pid';
44 export MallocStackLogging
=1
45 set env MallocStackLoggingNoCompact
=1
47 auval
-v $TYPE $PUID $PMID -w -q
49 unset MallocStackLogging
53 echo "\nvalidating i386 32 bit... ------------------------"
54 echo "--------------------------------------------------"
55 echo "--------------------------------------------------"
56 echo "--------------------------------------------------"
57 echo "--------------------------------------------------"
58 echo "--------------------------------------------------"
60 auval
-v $TYPE $PUID $PMID
62 echo "\nvalidating i386 64 bit... ------------------------"
63 echo "--------------------------------------------------"
64 echo "--------------------------------------------------"
65 echo "--------------------------------------------------"
66 echo "--------------------------------------------------"
67 echo "--------------------------------------------------"
69 auval
-64 -v $TYPE $PUID $PMID
71 #[ -e "/var/db/receipts/com.apple.pkg.Rosetta.plist" ] && echo Rosetta installed || echo Rosetta NOT installed
72 #ppc auval not available on 10.6
74 #echo "\nvalidating ppc 32 bit... -------------------------"
75 #echo "--------------------------------------------------"
76 #echo "--------------------------------------------------"
77 #echo "--------------------------------------------------"
78 #echo "--------------------------------------------------"
79 #echo "--------------------------------------------------"
81 #auval -ppc -v $TYPE $PUID $PMID