Symbian3/SDK/Source/GUID-BF1AAA0D-DF2F-4E1D-A0D2-F419BD32F97A.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-BF1AAA0D-DF2F-4E1D-A0D2-F419BD32F97A" xml:lang="en"><title>Creating
       
    13 registration resource files</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>You need to register your applications in order to make them visible
       
    15 to the application menu and to provide other information to the underlying
       
    16 system. To register, you need to provide a registration resource file, typically
       
    17 named <parmname>&lt;application_name&gt;_reg.rss</parmname>, that contains the
       
    18 non-localized information for your application. You also need to provide the <xref href="GUID-9F90A2F0-9C76-4871-A766-D1AE0FC42C08.dita">localizable registration
       
    19 information</xref>. The registration resource file is compiled during the
       
    20 build process and included in the <xref href="GUID-7F1B2577-2FEF-45F9-B32F-745DFE0F0D95.dita"><parmname>pkg</parmname></xref> file
       
    21 used to make the <parmname>sis</parmname> <xref href="GUID-61EE2BE0-7B86-42CD-A03F-857DD8FAC246.dita">installation
       
    22 file</xref>.</p>
       
    23 <p>To create a registration resource file:</p>
       
    24 <ol>
       
    25 <li id="GUID-D97F1C74-A29A-4EF1-92C1-8FBAF2EE6F2F"><p>Determine
       
    26 the requirements of your application.</p></li>
       
    27 <li id="GUID-41830892-AA07-44F7-BCEE-4FACD88932FF"><p>Create a text
       
    28 file with the name <parmname>&lt;application_name&gt;_reg.rss</parmname>.</p>
       
    29 </li>
       
    30 <li id="GUID-7EE5ADE9-C5D4-43E0-BB94-977CB064CF2D"><p>Include the
       
    31 appropriate header files. Typically, you need to include the following files:</p>
       
    32 <itemgroup>
       
    33 <ul>
       
    34 <li><p><parmname>appinfo.rh</parmname>, which is the resource header
       
    35 file that includes the data structure declaration for the resource statement
       
    36 used in the registration resource file</p></li>
       
    37 <li><p>compiled resource header file for the resource file with
       
    38 the symbolic ID for the<xref href="GUID-9F90A2F0-9C76-4871-A766-D1AE0FC42C08.dita"> localizable
       
    39 registration information</xref></p></li>
       
    40 <li><p>localization file, depending on you implementation of the
       
    41 registration resource file</p></li>
       
    42 </ul>
       
    43 <p>For more information on pre-processor statement syntax, see <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/ToolsAndUtilities94/DevTools-ref/ResourceFileFormat/Tool_Ref_RSS-file-format.preprocess.html#DevTools%2dref%2erss%2e3" format="application/java-archive">C++ pre-processor statements</xref>.</p>
       
    44 </itemgroup>
       
    45 </li>
       
    46 <li id="GUID-42A15A31-6A2C-4937-9615-A128068E2F76"><p>Add a statement
       
    47 for the UID2 value for the registration resource file as follows:.</p>
       
    48 <itemgroup>
       
    49 <codeblock id="GUID-A82F0146-5B48-48C8-A5F5-F200D08A6C4D" xml:space="preserve">UID2 KUidAppRegistrationResourceFile</codeblock>
       
    50 <p>UID2 always has the same value in registration resource files.</p>
       
    51 </itemgroup>
       
    52 </li>
       
    53 <li id="GUID-4C96D57D-FBA2-4BF6-A1AF-715467663A27"><p>Add a statement
       
    54 for the <xref href="GUID-EA05F9B6-52C7-4BD9-8B9A-4BA3456E70B5.dita">UID3</xref> value
       
    55 of the application as follows</p>
       
    56 <itemgroup>
       
    57 <codeblock id="GUID-EA7F044D-2BB2-4552-B768-3248DF6DAF7F" xml:space="preserve">UID3 &lt;uid3 value for application&gt;</codeblock>
       
    58 </itemgroup>
       
    59 </li>
       
    60 <li id="GUID-6A8002EA-AFF5-4750-833C-81ED5F355C6C"><p>Create a <parmname>APP_REGISTRATION_INFO</parmname> resource
       
    61 for your application. The definition for the registration code block is as
       
    62 follows:</p>
       
    63 <itemgroup>
       
    64 <codeblock id="GUID-EF44E298-635E-40BD-8FBE-8A6712FCA0FB" xml:space="preserve">
       
    65 RESOURCE  APP_REGISTRATION_INFO
       
    66 	{
       
    67 	app_file = ""; // name of application binary file (not including extension) - mandatory
       
    68 	attributes = 0;
       
    69 	localisable_resource_file = ""; // path (not including drive) and name of localisable resource file
       
    70 	localisable_resource_id = r_name36;
       
    71 	hidden = KAppNotHidden;
       
    72 	embeddability = KAppNotEmbeddable;
       
    73 	newfile = KAppDoesNotSupportNewFile;
       
    74 	launch = KAppLaunchInForeground;
       
    75 	group_name(KAppMaxGroupName) = "";
       
    76 	default_screen_number = 0;
       
    77 	datatype_list[]; // SUPPORTED DATATYPES
       
    78 	file_ownership_list[]; // FILE_OWNERSHIP_INFO
       
    79 	service_list[]; // SERVICE_INFO
       
    80 	opaque_data = 0;	// use for opaque data to send to non-native application launchers i.e. MIDlet id
       
    81 	}</codeblock>
       
    82 <p>where,</p>
       
    83 <ul>
       
    84 <li><p><parmname>app_file</parmname> indicates the name of the application
       
    85 executable binary file without the extension</p></li>
       
    86 <li><p><parmname>localisable_resource_file</parmname> indicates
       
    87 the path and name of the localizable resource file for the application</p>
       
    88 </li>
       
    89 <li><p><parmname>localisable_resource_id</parmname> indicates the
       
    90 symbolic name of the resource for the <xref href="GUID-9F90A2F0-9C76-4871-A766-D1AE0FC42C08.dita">localizable
       
    91 registration resource</xref></p></li>
       
    92 <li><p><parmname>newfile</parmname> indicates whether the application
       
    93 is document-based and supports the creation of new files. The default value
       
    94 is <parmname>KAppDoesNotSupportNewFile</parmname>.</p></li>
       
    95 <li><p><parmname>embeddability</parmname> indicates whether an application
       
    96 is embeddable.</p>
       
    97 <itemgroup>
       
    98 <p>The default value is <parmname>KAppNotEmbeddable</parmname>.</p>
       
    99 <p>For more information on embeddability, see <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/faqSDK/faq_1129.html" format="application/java-archive">FAQ-1129 What is an embeddable application?</xref>.</p>
       
   100 </itemgroup>
       
   101 </li>
       
   102 </ul>
       
   103 <p>The header file for the registration resource files is <parmname>appinfo.rh</parmname> and
       
   104 is located in the <parmname>./epoc32/include</parmname> folder.</p>
       
   105 <p>For more information on the other values in the resource, see <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/ToolsAndUtilities94/DevTools/RegFiles/Tool_Guide_Reg_Properties.html#DevTools%2eRegProperties" format="application/java-archive">Defining application icons, captions and properties</xref>.</p>
       
   106 </itemgroup>
       
   107 </li>
       
   108 </ol>
       
   109 <p>For a commented example, see <xref href="GUID-C99BA704-4E9F-482C-942F-1B4D7F385BD8.dita">HelloWorldBasic_reg.rss</xref>.</p>
       
   110 </conbody></concept>