2011-04-25 51 views
0

好吧,我正在为Mac OS X制作一个安装程序包。我已经将一个驱动程序文件放到了系统中,但没有该驱动程序的通用版本。如何让安装程序删除不同的文件,具体取决于计算机是PowerPC还是Intel?我检查了“要求”,但最接近它的是要求某些处理器速度或Mac OS X版本号。有没有办法需要某些架构?谢谢。PackageMaker区分PPC和Intel

回答

2

使用Result of Sysctlhw.cputype(PPC = 18和Intel = 7)。

Result of Sysctl

CPU类型:

#define CPU_TYPE_MC680x0 ((cpu_type_t) 6) 
#define CPU_TYPE_X86  ((cpu_type_t) 7) 
#define CPU_TYPE_MC98000 ((cpu_type_t) 10) 
#define CPU_TYPE_HPPA  ((cpu_type_t) 11) 
#define CPU_TYPE_ARM  ((cpu_type_t) 12) 
#define CPU_TYPE_MC88000 ((cpu_type_t) 13) 
#define CPU_TYPE_SPARC  ((cpu_type_t) 14) 
#define CPU_TYPE_I860  ((cpu_type_t) 15) 
#define CPU_TYPE_POWERPC ((cpu_type_t) 18)