<1> start running after installation
In versions earlier than s60 2.x and s60, you can use the "filerun, runinstall, runwaitend" command in the PKG file to start and execute the installation.
For example, the following installation package will execute an app named other to complete some special tasks after installation.
// For s60 2.x or former
"C:/Symbian/6.1/series60/epoc32/release/armi/urel/mymainapp. app "-"! :/System/apps/mymainapp. app"
"C:/Symbian/6.1/series60/epoc32/release/armi/urel/mymainapp. RSC "-"! :/System/apps/mymainapp. RSC"
"C:/Symbian/6.1/series60/epoc32/release/armi/urel/mymainapp_caption.rsc "-"! :/System/apps/mymainapp/mymainapp_caption.rsc"
"C:/Symbian/6.1/series60/epoc32/release/armi/urel/mymainapp. AIF "-"! :/System/apps/mymainapp. AIF"
"Other. app "-"! :/System/apps/mymainapp/other. app ", filerun, runinstall, runwaitend
If you need to start the main program after the installation is complete, you only need the following PKG file format:
"C:/Symbian/6.1/series60/epoc32/release/armi/urel/mymainapp. RSC "-"! :/System/apps/mymainapp. RSC"
"C:/Symbian/6.1/series60/epoc32/release/armi/urel/mymainapp_caption.rsc "-"! :/System/apps/mymainapp/mymainapp_caption.rsc"
"C:/Symbian/6.1/series60/epoc32/release/armi/urel/mymainapp. AIF "-"! :/System/apps/mymainapp. AIF"
"C:/Symbian/6.1/series60/epoc32/release/armi/urel/mymainapp. app "-"! :/System/apps/mymainapp. app ", filerun, runinstall, runwaitend
To achieve the same effect on s60 3.0, you must use the abbreviated form of the "filerun, runinstall" command in the PKG file:
As follows:
// For s60 3.0 or latter.
"C:/Symbian/9.1/s60_3rd_mr/epoc32/data/z/resource/apps/Your. RSC "-"! :/Resource/apps/Your. RSC"
"C:/Symbian/9.1/s60_3rd_mr/epoc32/data/z/resource/apps/your_aif.mif "-"! :/Resource/apps/your_aif.mif"
"C:/Symbian/9.1/s60_3rd_mr/epoc32/data/z/private/10003a3f/import/apps/your_reg.rsc "-"! :/Private/10003a3f/import/apps/your_reg.rsc"
"C:/Symbian/9.1/s60_3rd_mr/epoc32/release/gcce/urel/your.exe "-"! :/Sys/bin/your.exe ", FR, RI
Note: At this time, you must use the Symbian sign certificate to sign the installation package. Self-sign is invalid for instructions such as FR and RI.
<2> Automatic startup
There are multiple methods to automatically run on s60 2.x at startup, which are not repeated here:
To enable auto-running on s60 3.0, follow these steps:
1. Create a uid3.rss file first.
The file content is as follows:
# Include <startupitem. RH>
Resource startup_item_info Test
{
Executable_name = "! : // Sys // bin // helloworldbasic.exe ";
Recovery = estartupitemexw.ynone;
}
The value of executable_name is the EXE of the target program to be automatically run on the host.
The file is saved as the uid3 value of the project, and the suffix is. RSS (for example, UID 0x0 0xa000017f in MMP is saved as a000017f. RSS)
2. Add the newly created a1_17f. RSS to the project's MMP 5.
For example:
Start resource a000017f. RSS
Targetpath resource/apps
End
3. Add
".. /.. /.. /Epoc32/data/z/resource/apps/a1_17f. RSC "-" C:/private/101f875a/import/[a000017f]. RSC"
Then compile your project normally. At last, you must use the Symbian sign certificate to sign the installation package. Self-sign cannot enable auto-start upon startup.