Re: metapackage component conditionally set required
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:in-reply-to:references :mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; bh=OlORQ4nZKODVTU91yTF+BltnivCgHh4JfDMgQgGTWUQ=; b=Vk+e/huRlyCj5YovvcS2IcQlqtwOEHeJfHNtlhzPogCzDBS7ap56+p0jFxZst/pykh V0xhoHs4J81cku5SnHKtiMS//42T+00SyQd8gxKClu9cRQNpR/Ga2+E5E7v54m84Zn9K k2FFLPJrR2bh0pEzaTodh6yWL0TJdWjWpItf4= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc :content-transfer-encoding:from:subject:date:to:x-mailer; b=kXfSyGWPJVJ9WJe9mw1z6cxldFh/lASnPy+MCIQb7MnOpGgIR/vaoJVmDLWSLhZTgb 3aZXPbQnPCNHxp1+Mlyb/VTlg/6Uf9z0Hfv6JdKrjVRrARbtUWN7BV4Ppx3lBaQfIoXU G4UOoI5ObkwCLd0FfUoRLBXqq+TavTtIHjh0o= On Oct 9, 2009, at 6:43 PM, Andy Mroczkowski wrote: Hi all, I have a metapackage that has two sub-components. These components install resources for a particular architecture (Intel or PPC). I can conditionally select or de-select the sub-components with requirements scripts, but I'd like to automatically make the appropriate component Required and disable the other component. For example, if I'm installing on an Intel macine, the Intel sub-component would be Required, while the PPC component would be disabled. Yes it can. Here is something to get you started. function installer_choice_1_selected(isStart) { var tSelected; tSelected=!choices.installer_choice_2.selected; if (isStart==true) { return tSelected; } return (tSelected && my.choice.selected); } function installer_choice_2_requirement() { var tResult; tResult=myfunctiontocheckifthearchitectureisenabled; return tResult; } _______________________________________________ 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... Can this be accomplished? You just need to have one component check if it needs to be required or disabled and then you make the second component state depend on the first one. <choice id="installer_choice_1" start_enabled="false" start_selected="installer_choice_1_selected(true)" selected="installer_choice_1_selected(false)" title="Intel" description="One Moore thing..."> <pkg-ref id="com.intel.blahblah"/> </choice> <choice id="installer_choice_2" start_enabled="false" start_selected="installer_choice_2_requirement()" title="PowerPC" description="Use at your own RISC"> <pkg-ref id="com.powerpc.blahblah"/> </choice> This email sent to site_archiver@lists.apple.com
participants (1)
-
Iceberg-Dev