Symbian3/SDK/Source/GUID-F79EE68F-FFC3-541E-AE3A-D7203034DA43.dita
changeset 13 48780e181b38
parent 12 80ef3a206772
child 14 578be2adaf3e
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     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-F79EE68F-FFC3-541E-AE3A-D7203034DA43" xml:lang="en"><title>mmp
       
    13 project specification</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>This page describes the MMP for a typical GUI application.</p>
       
    15 <p><b>TARGETTYPE</b> </p>
       
    16 <p>From v9.0, a GUI application is an exe. This is specified with the <xref href="GUID-9535CF67-7541-554E-BE5C-9FDDFDB58EA5.dita">targettype</xref> statement:</p>
       
    17 <codeblock id="GUID-CC425464-79E3-5388-B133-F031FD283943" xml:space="preserve">TARGETTYPE exe</codeblock>
       
    18 <p>The target filename's extension can be either .app or .exe. This is specified
       
    19 using a <xref href="GUID-5D4DA7CA-DAB8-51E6-B597-4E8B0AB56477.dita">target</xref> statement:</p>
       
    20 <codeblock id="GUID-B8AD94B2-1E08-5E6F-A6B3-0665A5285DF3" xml:space="preserve">TARGET &lt;appname&gt;.exe</codeblock>
       
    21 <p><b>UID</b> </p>
       
    22 <p>Specify the UID for the application in a <xref href="GUID-BFCFD93E-D591-50D2-8263-D13D08DD9F15.dita">uid</xref> statement:</p>
       
    23 <codeblock id="GUID-F6B71A27-0986-5E95-8125-39A7175F0D6C" xml:space="preserve">UID 0x100039CE &lt;UID3&gt;</codeblock>
       
    24 <p>The UID2 value <codeph>0x100039CE</codeph> should be used for all applications.
       
    25 The UID3 value is the unique identifier for the particular application.</p>
       
    26 <p><b>Stack size</b> </p>
       
    27 <p>By default, processes have a stack size of 8K. This can be insufficient
       
    28 for some applications. To increase the size, use an <xref href="GUID-A8ECAA53-9094-5C0A-8893-2757559C15F0.dita">epocstacksize</xref> statement:</p>
       
    29 <codeblock id="GUID-FCE56679-AB1D-5545-9ECF-7B4DD4637A8A" xml:space="preserve">// set stack to 20K
       
    30 epocstacksize 0x5000</codeblock>
       
    31 <p><b>UI resource</b> </p>
       
    32 <p>Specify the application's UI resource file using a <xref href="GUID-5280EC0E-1A1F-5777-ACB1-CF4791EE2147.dita">start
       
    33 resource</xref> statement:</p>
       
    34 <codeblock id="GUID-5BC525DC-AF07-59C4-A59A-2ACF6CB82441" xml:space="preserve">START RESOURCE    &lt;appname&gt;.RSS
       
    35 HEADER
       
    36 TARGETPATH        \Resource\Apps
       
    37 END</codeblock>
       
    38 <p>The resource should be built into the <filepath>\Resource\Apps</filepath> directory.
       
    39 This is specified using the <codeph>TARGETPATH</codeph> part of the statement. </p>
       
    40 <p>The <codeph>header</codeph> line tells the resource compiler to produce
       
    41 a file <filepath>\epoc32\include\&lt;appname&gt;.rsg</filepath>, which defines
       
    42 macro constants through which C++ programs can refer to resource structures.</p>
       
    43 <p><b>Caption/icon resource</b> </p>
       
    44 <p>An application can specify localisable captions and icons to display on
       
    45 the shell using a <xref href="GUID-2431355F-E4D8-3226-9E9D-BAD6F23C418E.dita"><apiname>LOCALISABLE_APP_INFO</apiname></xref> resource, either
       
    46 in the UI resource file or in a separate resource file.</p>
       
    47 <p><b>Registration file</b> </p>
       
    48 <p>Specify the application's registration file using another <xref href="GUID-5280EC0E-1A1F-5777-ACB1-CF4791EE2147.dita">start
       
    49 resource</xref> statement:</p>
       
    50 <codeblock id="GUID-BADCE07B-0FD7-5B08-8A12-F88A7F681BEF" xml:space="preserve">START RESOURCE    &lt;appname&gt;_reg.rss
       
    51 TARGETPATH        \private\10003a3f\apps
       
    52 END</codeblock>
       
    53 <p>The registration file must be built to the private system directory <filepath>\private\10003a3f\apps</filepath> directory.</p>
       
    54 <p>Note that for security reasons a registration file cannot be installed
       
    55 directly to this location on a target device. When creating a PKG file (software
       
    56 install package file) for an application, the registration file must be installed
       
    57 to the <filepath>\private\10003a3f\import\apps\</filepath> directory.</p>
       
    58 <p>For more information, see <xref href="GUID-3AFA877F-41DE-5343-8BC2-C0FB894A062C.dita">Application
       
    59 registration information</xref>.</p>
       
    60 <p><b>Icons</b> </p>
       
    61 <p>A bitmap file containing icons for an application can be specified using
       
    62 a <xref href="GUID-B707887A-E0FA-5DF6-A906-A91E31E17321.dita">start bitmap</xref> statement:</p>
       
    63 <codeblock id="GUID-0B636524-66F0-5B00-A922-6FABFF5DD2C8" xml:space="preserve">START BITMAP    &lt;appname&gt;.mbm
       
    64 TARGETPATH        \Resource\Apps
       
    65 SOURCE            &lt;color-depth&gt; &lt;source-bitmap-list&gt;
       
    66 END</codeblock>
       
    67 <p>Icon files, like the UI resource file, should be built into the <filepath>\Resource\Apps</filepath> directory.</p>
       
    68 <example><p>An example of a real GUI application project file
       
    69 is given below:</p><codeblock id="GUID-CB2FA2A3-E8B1-5334-9DEA-B5811B2C1A2E" xml:space="preserve">TARGET        HelloWorld.exe
       
    70 TARGETTYPE    exe
       
    71 UID           0x100039CE 0x10004299
       
    72 VENDORID 0x70000001
       
    73 epocstacksize 0x5000
       
    74 
       
    75 SOURCEPATH    .
       
    76 SOURCE        HelloWorld_Main.cpp
       
    77 SOURCE        HelloWorld_Application.cpp
       
    78 SOURCE        HelloWorld_Document.cpp
       
    79 SOURCE        HelloWorld_AppUi.cpp
       
    80 SOURCE        HelloWorld_AppView.cpp
       
    81 USERINCLUDE   .
       
    82 SYSTEMINCLUDE \epoc32\include
       
    83 
       
    84 START RESOURCE    HelloWorld.RSS
       
    85 HEADER
       
    86 TARGETPATH        \Resource\Apps
       
    87 end
       
    88 
       
    89 START RESOURCE    HelloWorld_reg.rss
       
    90 TARGETPATH        \private\10003a3f\apps
       
    91 END
       
    92 
       
    93 START BITMAP    HelloWorld.mbm
       
    94 TARGETPATH        \Resource\Apps
       
    95 SOURCE            c8,1 icon24.bmp icon2m.bmp icon32.bmp icon3m.bmp icon48.bmp icon4m.bmp
       
    96 END
       
    97 
       
    98 LIBRARY       euser.lib apparc.lib cone.lib eikcore.lib</codeblock></example>
       
    99 </conbody></concept>