<< Click to Display Table of Contents >> RayPack > 8.0 > User Guide > Advanced Topics > Customizing Bootstrappers Defining Prerequisites for Bootstrapper |
This chapter describes how to prepare own definitions of prerequisites.
Standard Prerequisite Definition
The prerequisite definitions pre-installed with RayPack are stored in the PackPoint folder in the Prerequisite subfolder, for example:
C:\RayPack\PackPoint\Prerequisites
A single prerequisite is defined in an XML file, which has the following syntax:
<?xml version="1.0"?>
<Prerequisite
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MetaData>
<ProductName>Visual C++ 2010 Runtime Libraries (32-bit)</ProductName>
<ProductVersion>10.0.30319.1</ProductVersion>
<Manufacturer>Microsoft Corporation</Manufacturer>
<SchemaVersion>1.0</SchemaVersion>
</MetaData>
<Setup>
<Command>vcredist_x86.exe</Command>
<Arguments>/q</Arguments>
<ExitCodes>1641,3010</ExitCodes>
<Files>
<File FileHash="B88228D5FEF4B6DC019D69D4471F23EC" Size="5073240">
<Path>($PackPointDir)\Prerequisites\($DepName)\vcredist_x86.exe</Path>
<DownloadPath>http://download.microsoft.com/download/5/B/C/
5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/
vcredist_x86.exe</DownloadPath>
<DownloadPage>https://www.microsoft.com/en-us/download/details.aspx?
id=40784</DownloadPage>
</File>
...
...
...
</Files>
</Setup>
<Conditions>
<Condition Type="Registry" Property="None" Check="NotExist"
Architecture="SystemDefault">
<Path>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Uninstall\{196BB40D-1578-3D01-B289-BEFC77A11A1E}</Path>
</Condition>
<Condition Type="OperatingSystem" Property="Version" Check="Equals"
Architecture="X86">
<ServicePack>2</ServicePack>
<OsVersion>51</OsVersion>
</Condition>
<Condition Type="OperatingSystem" Property="Version" Check="Equals"
Architecture="SystemDefault">
<OsVersion>60</OsVersion>
</Condition>
...
...
...
</Conditions>
<Dependencies>
<Dependency>
<Path>($PackPointDir)\Prerequisites\WindowsInstaller_3.1_x86.rpdep</Path>
</Dependency>
...
...
...
</Dependencies>
</Prerequisite>
MetaData
Contains a definition of basic details like name and version, that are displayed in PackDesigner interface.
•ProductName
The name to be displayed in prerequisites browse.r
Example:
Visual C++ 2010 Runtime Libraries (32-bit)
•ProductVersion:
The version to be displayed in the prerequisites browser.
Example:
10.0.30319.1
•Manufacturer
The manufacturer to be displayed in the prerequisites browser.
Example
Microsoft Corporation
•SchemaVersion
A reserved value denoting the version of the schema. Must be set to 1.0.
Setup
Contains a definition of setup routine - which files are to be included, what command is used to install the package etc.
•Command
The command to be executed to install the package.
Example:
vcredist_x86.exe
•Arguments (optional)
The additional arguments to be passed to the command. In many scenarios, any kind of silent switches should be used here.
Example:
/q
•ExitCodes (optional)
A list of exit codes returned by the installing applications considered as "positive". If the only valid exit code is "0", then this value can be left empty. For example, if the installation has an exit code meaning that the product is already installed, then the respective exit code should be used here. The exit code 0 is always considered to be correct exit code, even if not provided in the list.
Example:
1641,3010
•Files
A list of files required for the installation. See the next section for the definition of a single file.
File
Contains a definition of setup routine - which files are to be included, what command is used to install the package etc.
•FileHash (optional)
The hash of the file used to confirm if the downloaded file is not corrupted or incomplete. If omitted, the CRC hash of the actual source file will not be verified.
Example:
B88228D5FEF4B6DC019D69D4471F23EC
•Size (optional)
The size of the file, in bytes. If omitted, the size of the actual source file will not be verified.
Example:
5073240
•Path
The local path where the resource should be present. Placeholders can be used to resolve the PackPoint directory and the dependency name.
($PackPointDir) resolves to the full PackPoint directory, for example C:\RayPack\PackPoint
($DepName) resolves to the name of .rpdep file, for example VCRedistr_2010_x86.
Example:
($PackPointDir)\Prerequisites\($DepName)\vcredist_x86.exe
This value is required and must point to a valid file location.
•DownloadPath (optional)
The source URL used to download the file. The value may be empty if there is no direct download link.
Example:
http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe
•DownloadPage (optional)
The source URL used to download the file. The value may be empty if there is no download page.
Example:
https://www.microsoft.com/en-us/download/details.aspx?id=40784
Dependency
Contains a definition of setup routine - which files are to be included, what command is used to install the package etc.
•Path
A path to a .rpdep file containing a dependency for a given prerequisite.
example:
($PackPointDir)\Prerequisites\WindowsInstaller_3.1_x86.rpdep
This value is required and must point to a valid file location.