PATH Contents > License templates
License templates

When you're customizing a component, you can choose an End User License Agreement (EULA) from a list of predefined license template. Depending on the template, its content can be changed or not.

This document shows you how to create and add your own license templates.

License templates location

License templates shall be put in the folder:

/Library/Application Support/Iceberg/Licenses Templates

By default, Iceberg proposes the following templates

If you're looking for another license, you can find a list of licenses approved by the Open Source Initiative (OSI) at opensource.org. Then, you would just have to create the corresponding template for that license.

License templates format

There are two license templates formats: one for licenses whose content is unchangeable and the other for licenses whose content can be customized by the user.

Creating an unchangeable content license template

1Open a new Finder window.
2Choose Go > Go to Folder… .
3Type /Library/Application Support/Iceberg/Licenses Templates in the text field and click Go.
4Choose File > New Folder and set the name of the new folder to the one that shall be displayed for the template in Iceberg.
5

Within this folder, create a folder for every localized version of the license template.

Important: The folder name shall conform to the format used for localized resources. A folder containing the English localization of the license template shall be named English.lproj, while the name of the French one would be French.lproj, etc.

If you want to provide only one localization for the license template, create only one folder named International.lproj.
6

Create a text file named License.rtf inside every .lproj folder. Copy or write the text of the license in this file.

Note: Rich Text Format (RTF) is currently the only supported format. You can create RTF documents using TextEdit which is available in the Applications folder of Mac OS X.

The final files hierarchy should look like this:

Creating a customizable license template

1Open a new Finder window.
2Choose Go > Go to Folder… .
3Type /Library/Application Support/Iceberg/Licenses Templates in the text field and click Go.
4Choose File > New Folder and set the name of the new folder to the one that shall be displayed for the template in Iceberg.
5

Within this folder, create a folder for every localized version of the license template.

Important: The folder name shall conform to the format used for localized resources. A folder containing the English localization of the license template shall be named English.lproj, while the name of the French one would be French.lproj, etc.

If you want to provide only one localization for the license template, create only one folder named International.lproj.
6

Create a text file named License.rtf inside every .lproj folder. Copy or write the text of the license in this file.

Note: Rich Text Format (RTF) is currently the only supported format. You can create RTF documents using TextEdit which is available in the Applications folder of Mac OS X.
7

Replace any piece of information you want to be customizable by a MACRO. A MARCO is a string of characters bounded by two % characters on each side. While it is not mandatory, using upper-case characters for a MACRO can prove convenient when it comes to find it inside the text of the license.

Examples:
%%YEAR%% is a MACRO.
%%CENTURY% is not a MACRO (a % is missing).
8

Create a Keywords.plist at same level as the License.rtf file. The Keywords.plist is the standard representation of a dictionaryt according to the Property List format. Each key is one of the MACRO name used in the license text. The value shall be an empty string.

Example of a Keywords.plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COMPANY</key>
<string></string>
<key>YEAR</key>
<string></string>
</dict>
</plist>

The final files hierarchy should look like this:


Author: Stéphane Sudre