Re: PackageMaker Requirements always returning true
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:mime-version:in-reply-to :references:content-type:message-id:content-transfer-encoding:from :subject:date:to:x-mailer; bh=u2LD/xxPUGmB/1nRdI48vMNtZH7pXm7mv4KBJJwpOfU=; b=UNI1QrbJmjSUZ8xZZPbY2JLGANfEFNPMz9v+n/aMfGWnPc12fgA33r/FqNQZPHje1i tB+S9E5pmVleDhfDLDdFdgKApFv/GbbPg9QNSpeZkb+FRqiPYLo6qAtZJeHHYzU64DM5 6Ra+vs4rvGR1/s/kDjel7Kmx6A5Bl9L+/Ns40= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=ZnXTT7L0Hp6A+5DqlejQuEE/f8LWP+1ueEGxdsmg24s+VxMOTOArb3+c3V/Np5yaiC E58VUAvxwLUThcaTOWbqtk562xO6qA/m3yrq7+TsSgsIy3yxl+L975phVbd3hnW/GABb CHUTfLXnKO+tovZ5g9fewBVZXkyPP1MV4jjiI= On Jul 26, 2010, at 9:55 PM, Kari McNair wrote: If the file does not exist: returns false. returns false returns true => pm_install_check returns false and my.result.type is set to 'Fatal'. The installation is stopped. ------ If the files exists: returns true. returns true returns false => pm_install_check returns true. The installation can be performed. _______________________________________________ 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 want my package to run only if a certain file does NOT exist. If the file does exist, I'd like the installer to fail and show a message. I've trying to use PackageMaker's requirements tab but when I try to run the package on a system that I know meets the requirements, it fails. Can anyone lend some wisdom?? Here are the lines from the distribution.dist that PackageMaker created. <?xml version="1.0" encoding="utf-8"?> <installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.4" authoringToolBuild="179"> <title>Lingraphica 7.0 Upgrade</title> <options customize="never" allow-external-scripts="no" rootVolumeOnly="true"/> <installation-check script="pm_install_check();"/> <script>function pm_install_check() { if(!(system.files.fileExistsAtPath('/Users/client/PreviousJune10/ Startup.lca') == true)) { my.result.title = 'You have already installed this upgrade.'; my.result.message = 'It looks like you have already attempted to install this upgrade. Please call Technical Support at 888-123-4567.'; my.result.type = 'Fatal'; return false; } return true; } </script> <background file="background" alignment="topleft" scaling="none"/> <choices-outline> <line choice="choice6"/> <line choice="choice7"/> <line choice="choice8"/> </choices-outline> <choice id="choice6" title="Version 7.0"> <pkg-ref id="com.Company.version70upgrade.client.pkg"/> </choice> <choice id="choice7" title="C2C Network"> <pkg-ref id="com.Company.version70upgrade.c2cnet.pkg"/> </choice> <pkg-ref id="com.Company.version70upgrade.client.pkg" installKBytes="3087504" version="1.0" auth="Root" onConclusion="RequireRestart">file:./Contents/Packages/client.pkg</ pkg-ref> <pkg-ref id="com.Company.version70upgrade.c2cnet.pkg" installKBytes="60" version="1.0" auth="Root">file:./Contents/ Packages/c2cnet.pkg</pkg-ref> </installer-script> system.files.fileExistsAtPath('/Users/client/PreviousJune10/ Startup.lca') (system.files.fileExistsAtPath('/Users/client/PreviousJune10/ Startup.lca') == true) (!(system.files.fileExistsAtPath('/Users/client/PreviousJune10/ Startup.lca') == true)) system.files.fileExistsAtPath('/Users/client/PreviousJune10/ Startup.lca') (system.files.fileExistsAtPath('/Users/client/PreviousJune10/ Startup.lca') == true) (!(system.files.fileExistsAtPath('/Users/client/PreviousJune10/ Startup.lca') == true)) This email sent to site_archiver@lists.apple.com
participants (1)
-
Iceberg-Dev