S60 3rd开机自动运行

在S60第三版中AutoStart可以通过如下方法:

How to autostart an application on boot up in 3rd- Startup List Management API

From Forum Nokia Wiki

Startup List Management API

Steps for autostarting an EXE on boot time in S60 3rd Edition.

1. Create an .RSS file.

For example: 06000001.rss

#include

RESOURCE STARTUP_ITEM_INFO startexe

{

executable_name = "c://sys//bin//StartEXE.exe";

recovery = EStartupItemExPolicyNone;

}

2. Copy .RSS file in to your project's GROUP folder.

3. Open your .MMP file.

4. Change UID of your .EXE.

For example: 0x06000001 and write following entry in your .MMP file.

START RESOURCE 06000001.rss

END

5. Rebuild your project.

6. Open your .PKG file and replace UID as that of .MMP file (in our case 0x06000001).

7. Add the following entry in your .PKG file:

"C:/Symbian/9.1/S60_3rd_MR/Epoc32/data/06000001.rsc"-

"c:/private/101f875a/import/[06000001].rsc"

8. That's it. Now just reboot your phone. You would find your .EXE at startup.

Notes

If there are multiple entries for different projects in the .PKG file, then the UID used in the startup list RSS file must match that of the package (for example, a package with the header {"TestApplication"},(0x06000001), 1, 0, 1 must have RSS filename [06000001].rss).

If the EXE exits within a few (about 5?) seconds of starting up, a message is displayed, reading: Unable to start . Application may need to be removed.

There are several Known Issues and Technical Solutions about using the Startup List logged in the Forum Nokia Technical Library. Search for "Startup List" to get an up-to-date overview.

Startup List Management API does not work with Self-Signed application. It should be singed with Developer Certificate even if otherwise the capabilities required for the project do not justify it.

Adding an executable to the startup list is described in the document "Startup List Management API Technical Specification" in the S60 3rd Edition SDK API Reference Guide.
In order to add applications to the startup list, the SIS package must meet (among others) the following requirements:
    - The installation package containing the application must be trusted, that is, it must be signed with a valid certificate.
    - The installation package must install the application executable to be added into the startup list.
    - In case of an embedded package, the control file must be included in the parent package.
See the above document for a full list of requirements.
However, adding an executable to the startup list is possible only when the file is included directly in the parent SIS. Therefore, even if the parent SIS includes the control file, it cannot add executables from embedded SIS packages to the startup list.

The executable to be added to the startup list must be included directly in the parent SIS package. If this is not possible (for example, because of different capability requirements for embedded and parent packages), the startup component should be delivered as a separate SIS file.

(以上内容引自:http://wiki.forum.nokia.com)

添加一个exe到startup list必须符合几个条件:

安装包必须是经过签名的;

安装包必须把exe文件添加到startup list;

在有嵌入式sis包的情况下,control文(*.rsc)件必须在顶层sis中

如果由于嵌入包和主包能力或其它原因导致AutoStart exe文件不能放在主包中,那么Startup所需组建需作为一个单独的安装包发行。但是为了用户使用方便,最终只想提供一个发布的安装包。如下方法可以解决:

例如:

main.sis; 主安装包

Startup.sis; 包含autostart组建

在main.pkg 中startup.sis作为一个安装文件复制到指定目录"C:/.../Startup.sis" -"c:/.../Startup.sis")

main.sis中提供一个autostartinstall.exe(在执行安装的时候运行RunInstall-RI)

autostartinstall.exe实现在后台安装Startup.sis

后台安装sis可以用SW Installer Launcher API实现(该API可以在NOKIA发布的S60_3rd_SDK_MR_API_Plug-In_Pack_v5中找到,For S60 3rd Ed Only)

Main.sis 的pkg文件如下:

"C:/.../ startup.sisx"-" C:/.../ startup.sisx "

"/.../autostartinstall.exe" -"c:/sys/bin/autostartinstall.exe", FR, RI

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值