Are AIF files supported in S60 3rd Edition or are they deprecated

Are AIF files supported in S60 3rd Edition or are they deprecated?

AIF files are not supported in S60 3rd Edition.

Why is the registration RSS file required, where should it be located, and what information should it contain?

An application registration file defines application information that is required by the application launcher or system shell. This includes the application’s name, UID, and properties. Other information required by the shell, for instance the icons and captions, is defined separately; the location of the icon/caption definitions is provided in the registration file. Before Symbian OS v8.1, all of this information was provided in AIF files. In Symbian OS v8.1, both AIF files and registration files are supported, but from Symbian OS v9.1 (S60 3rd Edition) onwards, only registration files are supported.

A registration file is required by every application, even if it has default properties, icons, and caption. It must specify at least the application's UID and the name of the application’s executable.

All registration files are located in /private/10003a3f/apps, on the same drive as the application.

Where should resources, help files, and other files used by the application be located and how does the framework know to look there?

Three completely new protected directories have been introduced because of Platform Security:

  /sys

  •  All executable native code resides in /sys/bin.

  •  /sys/bin is a flat directory — for example, all EXE files and DLLs must have a different name.

  • Tcb capability is required for modifying /sys contents.

  •  AllFiles capability is enough for reading the /sys directory (file browser, diagnostics tools).

  /resource

  •  Read-only resource files shared by (potentially) all applications.

  • Applications without any capabilities can read these files.

  • Tcb capability is required for modifying the contents of  /resource.

  • Only the software installer adds and updates these files.

  • Subdirectories can be utilized to ensure that the file name remains unique.

  /private

  /private/<SID>:  the  private directory of the process with SID.

  • Only the process with the same SID has full access to the directory.

  • Other processes need AllFiles capability to be able to access the directory.

  • Exception:

/private/<SID>/import:  “foreign” files (that is, files not owned by the process itself) can be placed here. All other processes have access to this directory with no capability restrictions. Thus, all content from here should be handled as untrusted by default.                                                                      

These protected directories are located on either fixed or removable drives. All the other (previously used) directories are unprotected, so it is not safe to leave any sensitive data in them.

Type

Old, current location

New location in PlatSec directory structure

AIF*

/system/apps/<app>/

None

Application (.app)*

/system/apps/<app>/

None

Application resource (.rsc)

/system/apps/<app>/

/resource/apps/

Application Bitmap files (.mbm, .mif)

/system/apps/<app>

/resource/apps/

EXEs

/system/programs/

/sys/bin/

FEP resources

/system/fep/

/resource/fep/

Help files

/system/help/

/resource/help/

Shared libraries

/system/libs/

/sys/bin/

Executables

/system/programs

/sys/bin/

Temp files

/temp

/private/<SID of the executable>/temp

What modifications are required to change an application from a .APP to a .EXE?

MyApp.MMP

In the MMP file a new target and target type must be defined. Additionally, every line that starts with RESOURCE or SYSTEMRESOURCE must be changed to a START RESOURCE … END block so that a TARGETPATH can be defined for the resource to be built. The TARGETPATH keyword will be neglected by the compiler when used outside START RESOURCE … END blocks. Make the changes marked with bold into the existing MyApp.MMP file:

  #ifdef APP_TO_EXE

  TARGET      myapp.exe

  TARGETTYPE  exe

  #else

  TARGET      MyApp.app

  TARGETTYPE  app

  #endif

  UID         0x100039CE 0x1000xxxx

  VENDORID    XXXX

  CAPABILITY  XXXX

  // Note that for APP_TO_EXE the targetpath does not need be defined, because it

  // is automatically handled by the build tools

  #ifndef APP_TO_EXE

  TARGETPATH         /System/Apps/MyApp

  #endif

MyApp.cpp

Add new entrypoints for EXE type application creation & initialization into the file where NewApplication() is defined. The changes have been marked with bold font.

  #ifdef APP_TO_EXE

  #include <eikstart.h>

  LOCAL_C CApaApplication* NewApplication()

      {

      return new CMyApplication;

      }

  GLDEF_C TInt E32Main()

      {

      return EikStart::RunApplication(NewApplication);

      }

  #if defined(__WINS__) && !defined(EKA2)

  GLDEF_C TInt E32Dll(TDllReason)

      {

      return KErrNone;

      }

  EXPORT_C TInt WinsMain(TDesC* aCmdLine)

      {

      return EikStart::RunApplication(NewApplication, aCmdLine);

      }

  #endif

  #else  // !APP_TO_EXE

  // --------------------------------------------------------------

  // NewApplication

  // Creates a new Myapp application object (CMyApplication).

  // Returns: The new application object (CMyApplication).

  //          NULL if out of memory.

  // --------------------------------------------------------------

  //

  EXPORT_C CApaApplication* NewApplication()

      {

      return new CMyApplication;

      }

  // --------------------------------------------------------------

  // E32Dll

  // Standard entry point for the application dll (Myapp.app).

  // Returns: Standard Symbian OS error code, KErrNone if successful.

  // --------------------------------------------------------------

  //

  #if !defined(EKA2)

  GLDEF_C TInt E32Dll(TDllReason)

      {

      return KErrNone;

      }

  #endif

  #endif  // APP_TO_EXE

<script language="javascript1.2" type="text/javascript"> </script>  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值