The Deployment Manifest


As mentioned, the deployment manifest is more interesting. The deployment manifest contains, obviously enough, settings that control the deployment of the application.

HelloWorld.deploy
start example
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"
xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd">

<assemblyIdentity name="HelloWorld.deploy" version="1.0.0.0"
processorArchitecture="x86" asmv2:culture="en-us"
publicKeyToken="0000000000000000" />

<description asmv2:publisher="Wise Owl, Inc."
asmv2:product="Brents HelloWorld Application"
asmv2:supportUrl="http://www.wiseowl.com/AppServer/HelloWorld/support.asp"
/>

<deployment xmlns="urn:schemas-microsoft-com:asm.v2"
isRequiredUpdate="false">
<install shellVisible="true" />
<subscription>
<update>
<beforeApplicationStartup />
<periodic>
<minElapsedTimeAllowed time="6" unit="hours" />
<maxElapsedTimeAllowed time="1" unit="weeks" />
</periodic>
</update>
</subscription>
</deployment>
<dependency>
<dependentAssembly>
<assemblyIdentity name="HelloWorld" version="1.0.0.0"
processorArchitecture="x86" asmv2:culture="en-us"
publicKeyToken="0000000000000000" />
</dependentAssembly>
<asmv2:installFrom codebase="HelloWorld.manifest" />
</dependency>
</assembly>
end example
 

The deployment manifest contains information that Longhorn requires to install and update an application. Notice that the assemblyIdentity element of the deployment manifest references the application manifest. After all, the application manifest already describes all the components of an application. To install an application, the deployment manifest says, in effect, Here s the description of the files you need to install this application.

Of course, when you install an application, you also need more information than just the files to copy onto a system. The description element lists the publisher , product , and supportUrl attributes; the system displays their contents in the Add/Remove Programs dialog box.

The deployment element specifies how to deploy and update the application after deployment. In this example, the application is visible to the shell, and the client s system will check for and, if necessary, download a new version of the application each time the user starts the application. In addition, the system periodically ”no more than every six hours and no less than once a week ”checks for a new version. When the periodic check locates a new version, Longhorn will download the new version in the background and install it; it will then be ready to run the next time the user executes the application.




Introducing Microsoft WinFX
Introducing WinFX(TM) The Application Programming Interface for the Next Generation of Microsoft Windows Code Name Longhorn (Pro Developer)
ISBN: 0735620857
EAN: 2147483647
Year: 2004
Pages: 83
Authors: Brent Rector

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net