Symbian3/SDK/Source/GUID-2C1DB75C-FB12-520C-85B1-57F1EDB61E3B.dita
changeset 13 48780e181b38
parent 12 80ef3a206772
child 14 578be2adaf3e
--- a/Symbian3/SDK/Source/GUID-2C1DB75C-FB12-520C-85B1-57F1EDB61E3B.dita	Fri Jul 16 17:23:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
-<!-- This component and the accompanying materials are made available under the terms of the License 
-"Eclipse Public License v1.0" which accompanies this distribution, 
-and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
-<!-- Initial Contributors:
-    Nokia Corporation - initial contribution.
-Contributors: 
--->
-<!DOCTYPE concept
-  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
-<concept xml:lang="en" id="GUID-2C1DB75C-FB12-520C-85B1-57F1EDB61E3B"><title>Feature variants</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Symbian platform can be built for multiple product configurations (variants). Each variant can include, enable or disable various features </p> <p>A variant-specific <filepath>.hrh</filepath> file is used to configure each different product. For example, the following <filepath>.hrh</filepath> files define features for products <i>phone1</i>, <i>phone2</i> and <i>phone3</i> respectively: </p> <ul><li id="GUID-42422DD8-7B13-5BE6-B28E-5FFC85630EB9"><p> <filepath>/epoc32/include/variant/Phone1.hrh</filepath>  </p> </li> <li id="GUID-90905AC6-1549-50DA-97AF-2487A6637812"><p> <filepath>/epoc32/include/variant/Phone2.hrh</filepath>  </p> </li> <li id="GUID-D1E1F60A-D4FC-5A8A-90BC-ED1CB713C601"><p> <filepath>/epoc32/include/variant/Phone3.hrh</filepath>  </p> </li> </ul> <p>The .hrh files contain macros which are used throughout the Symbian platform source. A DLL containing variant macros may be built differently for certain variants. It may also be common for certain variants. In order to identify variant DLLs, and to establish before compilation whether a variant DLL will be unique, a checksum value is calculated based on the combination of variant macros and appended to the DLL filename. If the checksum matches an existing DLL, already built for a different variant, that DLL is shared. </p> <p>For example, a <codeph>my.dll </codeph> with checksum appended appears as follows: </p> <p> <filepath>/epoc32/release/armv5/urel/my.685dfabca1f1d90889ef4ac115c01a14.dll</filepath> </p> <p>Support for variant builds is included in the Symbian platform build tool-chain as follows: </p> <ul><li id="GUID-F7967EF3-6190-570A-890D-68EAFA686FF3"><p>The configuration information specific to each product is defined in a <filepath>.var</filepath> file. The <filepath>.var</filepath> file is placed in the <filepath>/epoc32/tools/variant/</filepath> folder. For more information on <filepath>.var</filepath> file syntax, refer to <xref href="GUID-6C069F43-207C-5C6A-B9F6-3865BE8E70E8.dita">variant configuration file syntax</xref>. </p> </li> <li id="GUID-8C5B03C3-226C-55B9-9129-44E34C64456D"><p>The <filepath>.hrh</filepath> file containing the feature macro definitions is placed in the <filepath>/epoc32/include/variant/</filepath> folder, and is referred in the <filepath>.var</filepath> file. </p> </li> <li id="GUID-2795977F-E489-56F6-8BBB-70919DE92127"><p>A DLL for a variant is built by specifying the variant name on the command-line using <codeph>abld</codeph>. For example, the following <codeph>abld</codeph> command builds the DLL for the variant <b>var1</b>: </p> <p><userinput>abld build armv5.var1</userinput> </p> </li> <li id="GUID-E13C1674-38F6-582E-BE21-DD94327A6539"><p>The build tool-chain generates a checksum for each variant (including the default variant) and appends it to the DLL name. </p> </li> <li id="GUID-DF8B6409-E022-5B4B-97B0-B11738111C2B"><p> <codeph>BUILDROM</codeph> is modified to build a ROM image for a variant using the option <codeph>-DFEATUREVARIANT</codeph>. For example, the following command builds ROM image for <b>var1</b>: </p> <p><userinput>buildrom [options] –DFEATUREVARIANT=var1 &lt;obey1&gt; [&lt;obey2&gt; ...]</userinput> </p> </li> </ul> <p>If no <filepath>.var</filepath> file is specified the <filepath>default.var</filepath> file is used. The checksum will still be calculated and appended. You may avoid the checksum calculation by using the <codeph>-invariant</codeph> (or <codeph>-inv</codeph>) option with <codeph>abld</codeph>. This will build a default DLL with no checksum in the filename. If a DLL has <codeph>FEATUREVARIANT</codeph> specified in its <filepath>mmp</filepath> file, however, the <codeph>-invariant</codeph> option will be ignored. </p> <section><title>Notes</title> <ul><li id="GUID-BD7763E8-ECD4-5B1B-BBD9-0CF87E26A541"><p>The <filepath>.var</filepath> file name must be same as the variant name. </p> </li> <li id="GUID-CFD4C439-5D17-5E2C-9B28-CB60FFB3E2BB"><p>If the <filepath>.var</filepath> file does not include an <filepath>.hrh</filepath> file, the build system uses <filepath>default.hrh</filepath> in <filepath>/epoc32/include/variant/</filepath>. </p> </li> <li id="GUID-0EEDDBDF-DEC0-5F09-B2D3-9A93071641F3"><p>A DLL can be explicitly marked as a feature variant using the MMP keyword <xref href="GUID-6A783365-3CC3-5D7E-9F1C-D3585C4AE66C.dita">FEATUREVARIANT</xref>. </p> </li> <li id="GUID-116CAC89-C127-5CEB-A765-2511AA6CA1F6"><p>The DLLs built for a variant are placed in the appropriate folder under <filepath>/epoc32/release/</filepath>. For example, for all urel builds of <codeph>ARMV5</codeph> variants the DLLs are stored in <filepath>/epoc32/release/armv5/urel/</filepath>. </p> </li> <li id="GUID-0DC0B280-F4FE-5A41-815A-C56DB7282DDA"><p>The <codeph>-inv</codeph> or <codeph>-invariant</codeph>  <codeph>abld</codeph> option is effective only if the DLL is not marked as feature variant explicitly. </p> </li> </ul> </section> </conbody><related-links><link href="GUID-917413FC-0AC0-5768-B5AD-36BD2EDCB1FF.dita"><linktext>How to build feature based
-                variants</linktext> </link> <link href="GUID-7FF363B0-B05F-5490-8D9C-59061B905381.dita"><linktext>How to build ROMs with
-                variants</linktext> </link> </related-links></concept>
\ No newline at end of file