Re: Requirements Dysfunctional
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com On Mar 12, 2008, at 7:37 PM, Jim Hoyt wrote: Yo, Using PackageMaker 3.01 with Leopard. In Package Requirements set up a requirement as such: File Exists on Target: /Applications/foldername/application_name As far as I can tell (*), it's a bug in PackageMaker 3. return false; } return true; } </script> Which basically states (unless I'm drunk at the time of this writing): if the file does not exist then fail if the file exists then succeed Basically, it's a double negation issue. The script should look like this: return false; } return true; } </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... Required, false, is equal to true, ( i also tried true, is equal to true) I was hoping the installer would give me a warning that the folder/ file already existed, and do I want to overwrite it. It just went ahead and overwrote the folder/file without any interruption. How can I set this up to not overwrite. I thought that was the purpose of the Requirements setup...I am obviously missing something... any help deeply appreciated. I tried to reproduce it with PM 3.0.1 by checking (in the Project requirements) for the existence of /Applications/Utilities/Disk Utility.app and your parameters. The script I got when I build the package (10.5 flat format) is the following one (**): <script> function pm_volume_check() { if(!(system.files.fileExistsAtPath(my.target.mountpoint + '/ Applications/Utilities/Disk Utility.app') == true)) { my.result.title = 'Failure'; my.result.message = 'Error'; my.result.type = 'Fatal'; <script> function pm_volume_check() { if (system.files.fileExistsAtPath(my.target.mountpoint + '/ Applications/Utilities/Disk Utility.app') == true) { my.result.title = 'Failure'; my.result.message = 'Error'; my.result.type = 'Fatal'; I filed a bug report against it (Bug ID #5796305). So if I'm writing under influence, I will be the culprit. (*) Don't trust me, I'm suffering from the did-I-really-close-the- door syndrom on this one. (**) It's not exactly this script because I reformatted the output for it to be more readable. This email sent to site_archiver@lists.apple.com
participants (1)
-
Stéphane Sudre