Getting Installation failure error while using Script along with custom requirements.
Hi All, I'm trying to package firefox app with preflight script to kill the app and trash the app before installing a fresh copy. The script works pretty fine with the package. When I try to add system requirements to the package it gets failed. I'm pretty new to packaging . Below are my queries. Please address 1) When I include minimum available hard disk bytes on target , It creates a Distribution.dist file inside the package. ( Not sure of the reason.) 2) When I include memory requirement and include the preflight script it works fine. ( For memory it does not create a .dist file) I have pasted the details of the .dist file below. <?xml version="1.0" encoding="utf-8" standalone="no"?> <installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.4" authoringToolBuild="179"> <title>Firefox</title> <options customize="never" allow-external-scripts="no" rootVolumeOnly="true"/> <installation-check script="pm_install_check();"/> <volume-check script="pm_volume_check();"/> <script>function pm_volume_check() { if(!(my.target.availableKilobytes >= 200 * 1024 * 1024)) { my.result.title = 'Failure'; my.result.message = 'Installation cannot proceed, as not all requirements were met.'; my.result.type = 'Fatal'; return false; } return true; } function pm_install_check() { if(!(system.sysctl('hw.memsize') >= 512*1024*1024*1024)) { my.result.title = 'Memory Available'; my.result.message = 'Installation cannot proceed, as not all requirements were met.'; my.result.type = 'Fatal'; return false; } return true; } </script> <choices-outline> <line choice="choice3"/> </choices-outline> <choice id="choice3" title="Firefox"> <pkg-ref id="com.wb.firefox.Firefox.pkg"/> </choice> <pkg-ref id="com.wb.firefox.Firefox.pkg" installKBytes="75808" version="1.0" auth="Root">file:./Contents/Packages/firefox.pkg</pkg-ref> <pkg-ref id="com.wb.firefox.Firefox.pkg"> <relocate search-id="pkmktoken81"> <bundle id="org.mozilla.firefox"/> </relocate> </pkg-ref> <locator> <search id="pkmktoken81-1" type="component"> <bundle CFBundleIdentifier="org.mozilla.firefox" path="/Applications/Firefox.app"/> </search> <search id="pkmktoken81-0" type="script" script="pkmktoken81_combined()"> <script> function pkmktoken81_combined() { function pkmk_add_results_to_array(results, array) { for(i = 0; i < results.length; i++) array.push(results[i]); } var result = new Array(); var search; search = my.search.results['pkmktoken81-1']; if(search) pkmk_add_results_to_array(search, result); return result; } </script> </search> <search type="script" id="pkmktoken81" script="pkmktoken81_final()"> <script> function pkmktoken81_final() { var combined = my.search.results['pkmktoken81-0']; return combined; } </script> </search> </locator> </installer-script> Please do let me know where I'm going wrong. I tried to modify the .dist fie but to no avail. Thanks, Vishnu _______________________________________________ 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: https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
vishnu kulkarni