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=e/MO+d1TdPdwDWZSwW/akNjzQC0Y8WsgR5UgTmeIgmQ=; b=lHkpp5U0GAKWikuHrXNRZQzJRgxPZupU94sNLyS4QfeJemKgDlTStCKAzw6YV6lSgz JdBkXiQpOGCIedBXYMS6djRUr1vqiOxgglLrHmQRHQ1ZL1Dr9LgG0daWIUep6sQOliHR leQAXCvzRn9+wBJSoIgvRvLus3E5X+CeIj2zI= 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=nskDD93VYuKVfsTe+vJNr0DSq7Hzhpz6Aq7K+fGhqDcnVob/wxWNEbR7zsfyUiE+iF kKqlZ1ktx7hWSI+iMWeFr9rSdpBWMZ3kOd5P/FI0KiufbeoDJxDo2T5xMarGucOma/9h hncR41KespOKXXnI2jVlJx2L9f9LnvGjNI3eY= On Dec 6, 2009, at 10:30 PM, Matheus Boosle wrote: Hello, Basically, I set a Requirement on the 'install' package. const IC_DISK_TYPE_DESTINATION=0; const IC_DISK_TYPE_STARTUP_DISK=1; const IC_OS_DISTRIBUTION_TYPE_ANY=0; const IC_OS_DISTRIBUTION_TYPE_CLIENT=1; const IC_OS_DISTRIBUTION_TYPE_SERVER=2; if (tResult==false) { if (inCheckVisibilityOnly==true) { tResult=true; } } return tResult; } function installer_choice_2_enabled() { return !choices.installer_choice_1.enabled; } function installer_choice_2_selected(isStart) { var tSelected; tSelected=!choices.installer_choice_1.selected; if (installer_choice_2_enabled()==false || isStart==true) { return tSelected; } return (tSelected && my.choice.selected); } </script> </installer-script> _______________________________________________ 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... I'm currently running latest Snow Leopard and latest Package Maker available. I created a package to install a software that have two options: Install Uninstall I want to set it up to everytime Install is checked, Uninstall will be unavailable and deselected. Also, everytime that Uninstall is checked, Install will be deselected and unavailable. I'm not having success in setting it up in Package Maker. How should I set these options? Even though it's definitely not made with PackageMaker, this might help you: Then I set a dependency on the 'uninstall' package so that it is enabled and selected only if the 'install' package is enabled and selected. <?xml version="1.0" encoding="UTF-8"?> <installer-script authoringTool="Packages" authoringToolVersion="0.9.1" authoringToolBuild="2B6" minSpecVersion="1.0"> <options/> <!--+==========================+ | Presentation | +==========================+--> <title>DISTRIBUTION_TITLE</title> <!--+==========================+ | Installer | +==========================+--> <choices-outline> <line choice="installer_choice_1"/> <line choice="installer_choice_2"/> </choices-outline> <choice id="installer_choice_1" start_enabled="installer_choice_1_requirement(false,true)" start_selected="installer_choice_1_requirement(false,false)" title="install" description=""> <pkg-ref id="fr.whitebox.pkg.install"/> </choice> <choice id="installer_choice_2" start_enabled="installer_choice_2_enabled()" enabled="installer_choice_2_enabled()" start_selected="installer_choice_2_selected(true)" selected="installer_choice_2_selected(false)" title="uninstall" description=""> <pkg-ref id="fr.whitebox.pkg.uninstall"/> </choice> <!--+==========================+ | Package References | +==========================+--> <pkg-ref id="fr.whitebox.pkg.uninstall" version="1.0">file:./ Contents/Packages/uninstall.pkg</pkg-ref> <pkg-ref id="fr.whitebox.pkg.install" version="1.0">file:./ Contents/Packages/install.pkg</pkg-ref> <!--+==========================+ | JavaScript Scripts | +==========================+--> <script> function IC_CheckOS (inDiskType,inMustBeInstalled,inMinimumVersion,inDistributionType) { var tOSVersion=undefined; /* Check Minimum Version */ if (inDiskType==IC_DISK_TYPE_DESTINATION) { if (my.target.systemVersion!=undefined) { tOSVersion=my.target.systemVersion.ProductVersion; } /* Check if no OS is installed on the potential target */ if (tOSVersion==undefined) { return (inMustBeInstalled==false); } } else { tOSVersion=system.version.ProductVersion; } if (system.compareVersions(tOSVersion,inMinimumVersion)==-1) { return false; } /* Check Distribution Type */ if (inDistributionType!=IC_OS_DISTRIBUTION_TYPE_ANY) { var tIsServer; if (inDiskType==IC_DISK_TYPE_DESTINATION) { tIsServer=system.files.fileExistsAtPath(my.target.mountpoint+'/ System/Library/CoreServices/ServerVersion.plist'); } else { tIsServer=system.files.fileExistsAtPath('/System/Library/ CoreServices/ServerVersion.plist'); } if (inDistributionType==IC_OS_DISTRIBUTION_TYPE_CLIENT && tIsServer==true) { return false; } if (inDistributionType==IC_OS_DISTRIBUTION_TYPE_SERVER && tIsServer==false) { return false; } } return true; } function installer_choice_1_requirement (inCheckVisibilityOnly,inShowFailedToolTip) { var tResult; tResult=IC_CheckOS (IC_DISK_TYPE_DESTINATION,true,'10.4',IC_OS_DISTRIBUTION_TYPE_ANY); This email sent to site_archiver@lists.apple.com
participants (1)
-
Iceberg-Dev