Symbian3/SDK/Source/GUID-BF1AAA0D-DF2F-4E1D-A0D2-F419BD32F97A.dita
changeset 7 51a74ef9ed63
child 13 48780e181b38
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     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 
       
    15 <p>You need to register your applications
       
    16 in order to make them visible to the application menu and to provide other
       
    17 information to the underlying system. To register, you need to provide a registration
       
    18 resource file, typically named <parmname>&lt;application_name&gt;_reg.rss</parmname>,
       
    19 that contains the non-localized information for your application. You also
       
    20 need to provide the <xref href="GUID-9F90A2F0-9C76-4871-A766-D1AE0FC42C08.dita">localizable
       
    21 registration information</xref>. The registration resource file is compiled
       
    22 during the build process and included in the <parmname>pkg</parmname> file
       
    23 used to make the <parmname>sis</parmname> installation file.</p>
       
    24 
       
    25 <p>To create a registration resource file:</p>
       
    26 <ol>
       
    27 <li id="GUID-D97F1C74-A29A-4EF1-92C1-8FBAF2EE6F2F"><p>Determine
       
    28 the requirements of your application.</p></li>
       
    29 <li id="GUID-41830892-AA07-44F7-BCEE-4FACD88932FF"><p>Create a text
       
    30 file with the name <parmname>&lt;application_name&gt;_reg.rss</parmname>.</p>
       
    31 </li>
       
    32 <li id="GUID-7EE5ADE9-C5D4-43E0-BB94-977CB064CF2D"><p>Include the
       
    33 appropriate header files. Typically, you need to include the following files:</p>
       
    34 <itemgroup>
       
    35 <ul>
       
    36 <li><p><parmname>appinfo.rh</parmname>, which is the resource header
       
    37 file that includes the data structure declaration for the resource statement
       
    38 used in the registration resource file.</p></li>
       
    39 <li><p>compiled resource header file for the resource file with
       
    40 the symbolic ID for the<xref href="GUID-9F90A2F0-9C76-4871-A766-D1AE0FC42C08.dita"> localizable
       
    41 registration information</xref>.</p></li>
       
    42 <li><p>localization file, depending on you implementation of the
       
    43 registration resource file.</p></li>
       
    44 </ul>
       
    45 <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>
       
    46 </itemgroup>
       
    47 </li>
       
    48 <li id="GUID-42A15A31-6A2C-4937-9615-A128068E2F76"><p>Add a statement
       
    49 for the UID2 value for the registration resource file as follows:</p>
       
    50 <itemgroup>
       
    51 <codeblock id="GUID-A82F0146-5B48-48C8-A5F5-F200D08A6C4D" xml:space="preserve">UID2 KUidAppRegistrationResourceFile</codeblock>
       
    52 <p>UID2 always has the same value in registration resource files.</p>
       
    53 </itemgroup>
       
    54 </li>
       
    55 <li id="GUID-4C96D57D-FBA2-4BF6-A1AF-715467663A27"><p>Add a statement
       
    56 for the <xref href="GUID-EA05F9B6-52C7-4BD9-8B9A-4BA3456E70B5.dita">UID3</xref> value
       
    57 of the application as follows:</p>
       
    58 <itemgroup>
       
    59 <codeblock id="GUID-EA7F044D-2BB2-4552-B768-3248DF6DAF7F" xml:space="preserve">UID3 &lt;uid3 value for application&gt;</codeblock>
       
    60 </itemgroup>
       
    61 </li>
       
    62 <li id="GUID-6A8002EA-AFF5-4750-833C-81ED5F355C6C"><p>Create a <parmname>APP_REGISTRATION_INFO</parmname> resource
       
    63 for your application. The definition for the registration code block is as
       
    64 follows:</p>
       
    65 <itemgroup>
       
    66 <codeblock id="GUID-EF44E298-635E-40BD-8FBE-8A6712FCA0FB" xml:space="preserve">
       
    67 RESOURCE  APP_REGISTRATION_INFO
       
    68     {
       
    69      app_file = ""; // name of application binary file (not including extension) - mandatory
       
    70      attributes = 0;
       
    71      localisable_resource_file = ""; // path (not including drive) and name of localisable resource file
       
    72      localisable_resource_id = r_name36;
       
    73      hidden = KAppNotHidden;
       
    74      embeddability = KAppNotEmbeddable;
       
    75      newfile = KAppDoesNotSupportNewFile;
       
    76      launch = KAppLaunchInForeground;
       
    77      group_name(KAppMaxGroupName) = "";
       
    78      default_screen_number = 0;
       
    79      datatype_list[]; // SUPPORTED DATATYPES
       
    80      file_ownership_list[]; // FILE_OWNERSHIP_INFO
       
    81      service_list[]; // SERVICE_INFO
       
    82      opaque_data = 0;	// use for opaque data to send to non-native application launchers i.e. MIDlet id
       
    83      }</codeblock>
       
    84 <p>where,</p>
       
    85 <ul>
       
    86 <li><p><parmname>app_file</parmname> indicates the name of the application
       
    87 executable binary file without the extension.</p></li>
       
    88 <li><p><parmname>localisable_resource_file</parmname> indicates
       
    89 the path and name of the localizable resource file for the application.</p>
       
    90 </li>
       
    91 <li><p><parmname>localisable_resource_id</parmname> indicates the
       
    92 symbolic name of the resource for the <xref href="GUID-9F90A2F0-9C76-4871-A766-D1AE0FC42C08.dita">localizable
       
    93 registration resource</xref>.</p></li>
       
    94 <li><p><parmname>newfile</parmname> indicates whether the application
       
    95 is document-based and supports the creation of new files. The default value
       
    96 is <parmname>KAppDoesNotSupportNewFile</parmname>.</p></li>
       
    97 <li><p><parmname>embeddability</parmname> indicates whether an application
       
    98 is embeddable.</p>
       
    99 <itemgroup>
       
   100 <p>The default value is <parmname>KAppNotEmbeddable</parmname>.</p>
       
   101 <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>
       
   102 </itemgroup>
       
   103 </li>
       
   104 </ul>
       
   105 <p>The header file for the registration resource files is <parmname>appinfo.rh</parmname> and
       
   106 is located in the <parmname>./epoc32/include</parmname> folder.</p>
       
   107 <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>
       
   108 </itemgroup>
       
   109 </li>
       
   110 </ol>
       
   111 <p>For a commented example, see <xref href="GUID-C99BA704-4E9F-482C-942F-1B4D7F385BD8.dita">HelloWorldBasic_reg.rss</xref>.</p>
       
   112 </conbody></concept>