Re: Parsing the output of the "installer" tool
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Hi Steven, On Aug 29, 2006, at 10:30 PM, Steven Lobo wrote: Thanks Luke... We can't promise that the text-output format won't change. - Luke Steven On 8/29/06 10:39 AM, "Luke Bellandi" <luke@apple.com> wrote: Hi Steven, On Aug 28, 2006, at 10:01 PM, Steven Lobo wrote: Hi: installer -pkg /My_Package_Source_Path -target My_Package_Destination_Path -verboseR The install status output that I receive is as follows installer: Package name is My Great App installer: Upgrading at base path / installer:PHASE:Preparing for installation installer:PHASE:Preparing the Disk installer:STATUS:Preparing Target Volume installer:%0.010000 installer:PHASE:Preparing My Great App installer:STATUS: installer:PHASE:Installing My Great App installer:STATUS: installer:STATUS:Configuring Installation installer:STATUS:Validating package installer:STATUS:Writing files installer:%0.295857 installer:STATUS:Writing package receipt installer:%0.884000 installer:PHASE:Finishing Installation installer:%0.002000 installer:STATUS:Finishing Installation installer:%1.000000 installer:STATUS: installer:PHASE:The software was successfully installed installer: The upgrade was successful. I plan to asynchronously monitor this output using the NSFileHandle API's, parse out the "STATUS:", "PHASE:" and "%" values and accordingly update a progress bar in my updater UI. This works out pretty well since most of the output is also localized already by the command line tool. Queries: -------- 1. Is parsing out the "installer" tool's output a recommended approach or is there a more reliable approach to handle this ? I could not find specific documentation regarding the output and am therefore unsure if such installer state parsing is recommended or and will be supported in future OS releases? 2. The install percentage value just before installation is finished is always "0.002000" (check above). Since this is not in sync with the rest of the percentage status provided, I reckon that this indicates some other status. What does this signify ? - Luke TIA Steven ----------------------------------------------- Robosoft Technologies - Come home to Technology _______________________________________________ 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/vishnuprasad.kodancha%4... obosoftin.com ----------------------------------------------- Robosoft Technologies - Come home to Technology _______________________________________________ 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... Regarding my first query, would it be a safe approach to parse out the output of the "installer" command line tool and update my software updater's progress UI and strings accordingly ? I am envisioning the scenario from the point of view of a new future Apple OS release that could potentially require me to provide an update for my software (e.g. say new features that can be supported for that OS) via my software updater. In case I rely on the installer tool's output for updating my software updater's user interface, I would like to know if the approach of parsing out the command line "installer" tool's output and updating the updater UI would work even then. Or, is there any other safer approach that is recommended ? File an enhancement request for install-progress notifications to be issued during an install at http://bugreporter.apple.com. I provide a software update feature in my software UI that currently checks for updates from a server, downloads updates if necessary and installs the same. My update software is packaged as a Packagemaker package/ metapackage. Once the package is downloaded, I execute the package using the command line "installer" tool from my software UI (via NSTask) similar to this.... The percentages indicate percent complete for each phase. When the installer notifies you that it's on a new phase, you should reset your percent complete to 0%. _______________________________________________ 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/luke% 40apple.com This email sent to luke@apple.com This email sent to vishnuprasad.kodancha@robosoftin.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Luke Bellandi