首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian英文资料 >> Tips Tricks >> 正文
Compress Your Symbian C++ Executables
作者:佚名    文章来源:不详    更新时间:2006-5-7 11:27:12

On all devices based on Symbian OS v7.0s (Series 60 Developer Platform 2nd Edition, Series 80 Developer Platform 2.0, and Series 90 Developer Platform 2.0) it is possible to save considerable disk space by compressing an application’s executable files. Executable files include GUI application files (.APP), dynamic link library files (.DLL), and server files (.EXE). This step typically cuts the executable file size by 30 to 40 percent.

To use compression, simply add directive COMPRESSTARGET to the corresponding project definition file (.MMP) and recompile the project. The directive line can be anywhere within the project definition file.

The start-up time of the compressed application can vary from the uncompressed version, although the difference is typically not significant. The benefits of using compression generally outweigh possible disadvantages, therefore, it is strongly recommended to use compression.

Also, executable file compression does not significantly change the Symbian OS installation (.SIS) file size, since by default the installation file is also compressed.

Example usage: (HelloWorldBasic.mmp)

COMPRESSTARGET       
TARGET        HelloWorldBasic.app
TARGETTYPE        app
UID        0x100039CE 0x10005B91
TARGETPATH        \system\apps\helloworldbasic
       
SOURCEPATH        ..\src
SOURCE        HelloWorldBasic.cpp
SOURCE        HelloWorldBasicApplication.cpp
SOURCE        HelloWorldBasicAppView.cpp
SOURCE        HelloWorldBasicAppUi.cpp
SOURCE        HelloWorldBasicDocument.cpp
       
SOURCEPATH        ..\group
RESOURCE        HelloWorldBasic.rss
       
USERINCLUDE        ..\inc
       
SYSTEMINCLUDE        \epoc32\include
       
LIBRARY        euser.lib
LIBRARY        apparc.lib
LIBRARY        cone.lib
LIBRARY        eikcore.lib
LIBRARY        avkon.lib

Here are a few performance figures:

Example applicationUncompressed sizeCompressed size
HelloWorldBasic5,868 bytes 2,414 bytes
SoundMixer (available at Forum Nokia Web site) 12,604 bytes5,635 bytes
Example3D (available at Forum Nokia Web site) 30,476 bytes 13,577 bytes
Example applicationStart time (uncompressed)Start time (compressed)
HelloWorldBasic1.2 sec. 1.3 sec.
SoundMixer 1.8 sec. 1.9 sec.
Example3D 2.8 sec 2.9 sec

The application start-up times are measured using a Nokia 6600 device.



This tip was originally posted on Forum Nokia. Check the original version at http://www.forum.nokia.com/html_rea....
相关文章:
How to reset the alternate makmake entry in Codewarrior
Integrating LeaveScan into Codewarrior 3.x
Carbide.vs - Disabling the MMP/PKG File update feature
Codewarrior: how to avoid the "Too Many Include Paths" error when using the UIQ 2.1 SDK
Carbide.c++: Setting up On Target Debugging
Using SIP with Nokia Series60 and Asterisk
Using Extended Notifiers
How to get a Series 60 phone firmware version number ?
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号