site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com On Mar 25, 2008, at 8:19 PM, Andy Mroczkowski wrote: To restrict the package to Intel only do the following: - Select the Choice you want to set an architecture requirement for - Click the 'Requirements' Tab - Add a new Requirement with the '+' button - Set the following values: If: Result of Gestalt value: sysa is: == 10 Selected: NO Enabled: NO Then do the same for the PPC choice, replacing the 10 with 2. --- Andy Mroczkowski Mac Developer, NeatReceipts Hi there: Any pointers are appreciated. Cheers I really like how the values differ from the Gestalt call. _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... If you are using the PackageMaker 3 GUI, this is fairly easy. You can add Requirements for package choices (subpackages of a metapackage). Requirements can check results of Gestalt directly, which can be used to detect the current architecture. The applicable Gestalt key is 'sysa' and the result codes for Intel and PPC are 10 and 2 respectively. There are probably other solutions, but this works for me. I would suggest just using a Universal binary if it makes sense though. On Mar 25, 2008, at 5:11 PM, Roy Marquez wrote: I'm fairly new to using PackageMaker as I have used it to package smaller applications and such, but haven't used it extensively. I have a project and would appreciate any guidance that the more experienced folks (you) can provide. I have application "A". This application comes in two version: PPC and Intel. I have built 2 separate packages. What I would ideally like to build is a metapackage installer that can detect the machine architecture type and install the correct package for the architecture. But I have no clue as to where to start as to how to get that working. From my reading, it looks like I will be needing a script that would do this. But other than this, I have no clue where to start looking for literature that documents this. This would be the only need I have as far as this is concerned. Roy Some people re-package other companies installers so that they can easily deploy them. Making a universal binary isn't an option. One would think Adobe would be able to figure out how to make a universal binary. But there are still separate installers for the Flash Player (even though one is called "UB".) I'm using sysctl 'hw.cputype'. Intel = '7' and PPC = '18'. I think I settled on using sysctl as I'm a unix geek, and it's something that I can implement from the command line using tools that I'd already used (sysctl). Follow the above step, only use "Result of Sysctl". Use "hw.cputye" as the value. I call PackageMaker from the command line, and I generate my own distribution.dist file. Having done that, It's much easier to do this from the GUI. If someone cares, I can post an example distribution.dist CPU detection example, but it's easy to have Packagemaker make you one and read what it generates. This email sent to site_archiver@lists.apple.com