Re: Parsing the output of the "installer" tool
Re: Parsing the output of the "installer" tool
- Subject: Re: Parsing the output of the "installer" tool
- From: Luke Bellandi <email@hidden>
- Date: Tue, 29 Aug 2006 10:39:14 -0700
Hi Steven,
On Aug 28, 2006, at 10:01 PM, Steven Lobo wrote:
Hi:
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....
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 ?
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%.
- 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden