AveDesk Installer Documentation
AveDesk 1.2 comes with an integrated 'things' installer. This installer is able to copy files, perform actions and check requirements. This document will describe the structure and the way to create an AveDesk 1.2 Installer package.
Package
An installable package for AveDesk is simply a zipped file, with the extension renamed to aveinst. For example, MyDesklet.zip should become MyDesklet.aveinst.
Another requirement is that each package has the file avedesk_installer.xml in its root. This XML file will descrive the behaviour of the installation process: which requirements this package has, which files to copy whereto and what actions to take.
AveDesk_Installer.XML Outline
As said before, the avedesk_installer.xml file describes the behaviour of the installation process. For that purpose, some pre-defined nodes need to be defined. This section will describe the general use of those nodes.
The main node of the XML file should be the AveInstaller node. Example:
<?xml version="1.0" encoding="UTF-8"?>
<AveInstaller>
</AveInstaller>
This AveInstaller-main node must have the following child-nodes: About, Dependencies, Requirements, BeforeCopy, CopyInformation, AfterCopySucceeded, AfterCopyFailed.
Each of those child-nodes, which will be referred to as sections also, will be discussed in more detail.
About section
The About section is for providing basic information about the package.
The following child-nodes should be present:
· Author , the authors name
· Email , the authors e-mailaddress (optional)
· HomePage , the authors homepage (optional)
· Name , the package name
· Version , the package version in major.minor format
· Description , a short description of this package
· URL , the URL where this package could be downloaded
· GUID , a Globally Unique IDentifier for this package
Example:
<About>
<Author>Andreas Verhoeven</Author>
<Email>averhoev.2@hccnet.nl</Email>
<HomePage>http://www.avedesk.com</HomePage>
<Name>DesktopGrabber Add-on Module</Name>
<Version>1.0</Version>
<Description>
Dropped files on the desktop will become desklets! </Description>
<URL>
http://www.mpj.tomaatnet.nl/desktopgrabber.aveinst </URL>
<GUID>EFB7AAEF-F02C-4EF1-85FF-D6E2D77B95C1</GUID>
</About>
Dependencies section
This section is actually for future usage (uninstaller), but should nonetheless be included already. The section consists of a list of GUIDs of other packages that this package depends on.
<Dependencies>
<Item>E0289F6C-8F58-4752-9F39-022F36EC9D65</Item>
</Dependencies>
Requirements section
The requirements section is used to make sure that requirements this packages will need, are actually present. For example, a skin for an iTunes remote desklet required the particular iTunes remote desklet to be installed.
OnError sub-section
If an requirement was not met ,he AveDesk installer will try to correct the situation so that the requirement will be met. In the iTunes remote desklet example, the particular desklet could be automatically downloaded and installed before the skin-installation is continued.
To be able to do this, each requirement can have an OnError child-node. In this OnError subsection, an URL can be specified where a package can be downloaded that will correct the non-met-requirement.
The following child-nodes can be provided:
· Message, a message that will be displayed to the end-user if the requirement fails.
· HomePage, the url to an website where there is more information about the error.
· DownloadableFile , a DownloadableFile node to a package that will be downloaded and installed if the requirement fails. The package should make the requirement not fail anymore.
A DownloadableFile node is a very simple node with two child-nodes:
· URL, the url where the file can be downloaded.
· GUID, for future-usage actually, but you can specify the GUID of the package you want to have downloaded here. NOTE: does not work in AveDesk 1.2.
<OnError>
<Message>You will need PIDLShortcut for this.</Message>
<DownloadableFile>
http://mpj.tomaatnet.nl/PidlShortcut.aveinst
</URL>
</DownloadableFile>
</OnError>
Requirements
The requirements is simply a list of Item-nodes. Each Item-node must have an Type-attribute that will describe the Requirement-type, like RequiredAveDeskVersion.
<Requirements>
<Item Type="RequiredAveDeskVersion">1.2</Item>
<Item Type="RequiredInstallerVersion">1.2</Item>
<Item Type="FileExists">
<Directory BaseFolder="Desklets">
<Directory Name="PidlShortcut">
<File>pidlshortcut.dll</File>
</Directory>
<Message>
You will need PIDLShortcut for this.
</Message>
</Item>
</Requirements>
All requirement-types can be found in Requirements.rtf .
BeforeCopy section
The BeforeCopy section is a list of Actions that will be performed before any files are actually copied. Those actions will only be performed if all requirements in the Requirements section were met.
The actions are listed as a Item-type node.
<BeforeCopy>
<Item Type="UnloadModule">
<Directory Name="Pidlshortcut">
<File>desktopmodule.dll</File>
</BeforeCopy>
All action-types can be found in Actions.rft.
...
wegieldaniel