如何给终端程序加上图标

 

 

1. Create a new /data/-folder in your project and add a file ConsoleMenu_reg.rss to this directory.

2. Paste the following text into ConsoleMenu_reg.rss:

#include <appinfo.rh>
 
UID2 KUidAppRegistrationResourceFile
UID3  0xE79A8F85  // Replace this with the UID3 of your application
 
RESOURCE APP_REGISTRATION_INFO
{
app_file = "ConsoleMenu" ;  // The filename of your executable, without .exe
}

3. Add the new resource file to the .mmp file, so that it’s included in the compilation-process. Do not change the "10003a3f" ID, this folder is used for all applications.

SOURCEPATH ../data
START RESOURCE ConsoleMenu_reg. rss
TARGETPATH / private/10003a3f/apps
END

4. Add the new resource file to the .pkg-file, in order to include it in the .sis that you will install on the phone:

"$(EPOCROOT)Epoc32/data/z/private/10003a3f/apps/ConsoleMenu_reg.rsc" -
"!:/private/10003a3f/import/apps/ConsoleMenu_reg.rsc"

That’s it!

 

 

Defining your own application icon

Right now, your application will have the default icon. If you want it to have your own icon, follow these additional steps.

1. Create an icon file in any vector graphics application that supports SVG-Tiny (e.g. Adobe Illustrator).

2. Create a /gfx/-folder in your project and save the icon file into this directory (e.g. ConsoleMenu.svg)

3. Add a file called Icons_scalable_dc.mk to the group-directory. Carbide.c++ should automatically suggest adding this new file to bld.inf. Allow this. If you do not use Carbide.c++, add the make file to bld.inf manually:

PRJ_MMPFILES
ConsoleMenu. mmp
gnumakefile Icons_scalable_dc. mk  // New line

4. Paste the following code into the Icons_scalable_dc.mk-file:

ifeq  (WINS,$ (findstring WINS, $ (PLATFORM ) ) )
ZDIR =$ (EPOCROOT )epoc32/release/$ (PLATFORM )/$ (CFG )/Z
else
ZDIR =$ (EPOCROOT )epoc32/data/z
endif
 
TARGETDIR =$ (ZDIR )/resource/apps
# Adapt the filename of the .mif-file that will be created:
ICONTARGETFILENAME =$ (TARGETDIR )/ConsoleMenu. mif
 
ICONDIR =../gfx
 
do_nothing  :
@rem do_nothing
 
MAKMAKE  : do_nothing
 
BLD  : do_nothing
 
CLEAN  : do_nothing
 
LIB  : do_nothing
 
CLEANLIB  : do_nothing
 
RESOURCE  : $ (ICONTARGETFILENAME )
 
# Adapt the filename of the icon in the following lines!
$ (ICONTARGETFILENAME )  : $ (ICONDIR )/ConsoleMenu. svg
mifconv $ (ICONTARGETFILENAME ) /
/c32 $ (ICONDIR )/ConsoleMenu. svg
 
FREEZE  : do_nothing
 
SAVESPACE  : do_nothing
 
RELEASABLES  :
@echo $ (ICONTARGETFILENAME )
 
FINAL  : do_nothing

5. Create a new file called ConsoleMenu.rss in the /data/-folder and fill it with the following definition. Adapt the name of the short_caption and the caption to your needs – this will be the visible name of your application.

#include <appinfo.rh>
 
RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
{
short_caption  =  "ConsoleMenu" ;  // Short name of your application
caption_and_icon  = 
CAPTION_AND_ICON_INFO
{
caption  =  "ConsoleMenu" ;  // Normal name of your application
number_of_icons  =  1 ;
icon_file  =  "//resource//apps//ConsoleMenu.mif" ;  //.mif created by make file
} ;
}

6. Add the new resource file to the .mmp-file, in order to include it in the compilation process:

SOURCEPATH ../data
START RESOURCE ConsoleMenu. rss
TARGETPATH /resource/apps
END

7. The ConsoleMenu_reg.rss-file has to be extended by one line defining the location of the localisable resource file:

#include <appinfo.rh>
 
UID2 KUidAppRegistrationResourceFile
UID3  0xE79A8F85
 
RESOURCE APP_REGISTRATION_INFO
{
app_file = "ConsoleMenu" ;
localisable_resource_file  =  "//resource//apps//ConsoleMenu" ; // New line!
}

8. Of course, the new files also have to be added to the .pkg-file to include them into the installation package (.sis):

"$(EPOCROOT)Epoc32/data/z/resource/apps/ConsoleMenu.rsc" - "!:/resource/apps/ConsoleMenu.rsc"
"$(EPOCROOT)Epoc32/data/z/resource/apps/ConsoleMenu.mif" - "!:/resource/apps/ConsoleMenu.mif"

9. Clean the project and rebuild it.

 

http://wiki.forum.nokia.com/index.php/How_to_create_application_icon(SVG)_in_S60_3rd_edition

http://wiki.forum.nokia.com/index.php/How_to_define_application_icon

 

内容概要:本文详细介绍了基于FPGA的144输出通道可切换电压源系统的设计与实现,涵盖系统总体架构、FPGA硬件设计、上位机软件设计以及系统集成方案。系统由上位机控制软件(PC端)、FPGA控制核心和高压输出模块(144通道)三部分组成。FPGA硬件设计部分详细描述了Verilog代码实现,包括PWM生成模块、UART通信模块和温度监控模块。硬件设计说明中提及了FPGA选型、PWM生成方式、通信接口、高压输出模块和保护电路的设计要点。上位机软件采用Python编写,实现了设备连接、命令发送、序列控制等功能,并提供了一个图形用户界面(GUI)用于方便的操作和配置。 适合人群:具备一定硬件设计和编程基础的电子工程师、FPGA开发者及科研人员。 使用场景及目标:①适用于需要精确控制多通道电压输出的实验环境或工业应用场景;②帮助用户理解和掌握FPGA在复杂控制系统中的应用,包括PWM控制、UART通信及多通道信号处理;③为研究人员提供一个可扩展的平台,用于测试和验证不同的电压源控制算法和策略。 阅读建议:由于涉及硬件和软件两方面的内容,建议读者先熟悉FPGA基础知识和Verilog语言,同时具备一定的Python编程经验。在阅读过程中,应结合硬件电路图和代码注释,逐步理解系统的各个组成部分及其相互关系。此外,实际动手搭建和调试该系统将有助于加深对整个设计的理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值