To be installed and operated in Sitebuilder, created template source files must be compiled into a template pack (the package that comprises one or more templates). This is an .msi file for Windows OS and .bin file for Linux/Unix OS.
Templates can be compiled only in MS Windows. Linux/Unix compiler will be available in next versions of the Sitebuilder SDK.
Prior to launching the compilation process, make sure that:
info.xml fileinfo.xml file. For details on where the ID is specified, refer to the Specifying General Information About Template section.Use the following procedure to compile a template:
compile.sbtp file containing the following lines:<?xml version="1.0" encoding="utf-8"?>
<templatePack name="Sample pack" type="Windows">
<directory path="example-01" />
</templatePack>
TemplatePack element.
name. (Optional) Name of a template pack.
type. Type of operational system, for which the template is compiled. Values: Windows, Unix.
Directory element.
path. Path to the directory where template source code is located. The path can be absolute or relative (to the directory where compile.sbtp file is located). Example: D:\Templates\my-template-01.
Note: Use multiple directory elements to create a template pack.
compile.sbtp file, or right click the file and choose "Compile template pack" option.A window displaying the results of the compilation process opens.
The compiled template pack will look as follows: [name of the .sbtp file].msi or [name of the .sbtp file].bin depending on a template type.
Note: You can change name of .sbtp file. For instance, instead of compile.sbtp you can use sample.sbtp.
Remarks (Sitebuilder for Windows)
When you compile template source code to an .msi file for the first time, content of the .sbtp file is affected. It is true even if the attempt to compile the source code has failed. The following arguments are added automatically to the templatePack element:
version. Stores number of times a template was recompiled (starting from 1).
uid. Identifier of a template pack. The argument value is unaffected on recompilation.
Note: It is not recommended to add or edit the version or uid values without necessity.
Note: After each successful compilation of a given source code, the version value is automatically increased by 1.