winCE标准shell美化

1更换WinCE的墙纸
更换墙纸就是改注册表设置,编译完WinCE工程以后,所有的reg文件中的内容都会被合并为reginit.ini文件。

在platform.reg文件中添加如下内容:

[HKEY_CURRENT_USER/ControlPanel/Desktop]

"wallpaper"="//Storage Card//LOGO.bmp"

然后把LOGO.bmp放到Storage Card这个盘中就可以了,开机就能看到桌面已改

 

2修改桌面图标
相关注册表

; Drives (My Device) 我的设备图标

[HKEY_CLASSES_ROOT/CLSID/{000214A0-0000-0000-C000-000000000046}]

"DisplayName"=mui_sz:"ceshell.dll,#20482"

"DefaultIcon"="//Windows//ceshell.dll,-4354"

[HKEY_CLASSES_ROOT/CLSID/{000214A0-0000-0000-C000-000000000046}/InprocServer32]

@=//Windows//ceshell.dll

; Recycle Bin (BitBucket) 垃圾回收站图标

[HKEY_CLASSES_ROOT/CLSID/{000214A1-0000-0000-C000-000000000046}]

"DisplayName"=mui_sz:"ceshell.dll,#20481"

"DefaultIcon"="//Windows//ceshell.dll,-4352"

"AltIcon"="//Windows//ceshell.dll,-4355"

[HKEY_CLASSES_ROOT/CLSID/{000214A1-0000-0000-C000-000000000046}/InprocServer32]

@=//Windows//ceshell.dll

“DisplayName”:显示的名字,名字来源于ceshell.dll中的资源,其中My Device的资源ID为20482,Recycle Bin的资源ID为20481。

“DefaultIcon”:显示的图标,图标来源于ceshell.dll中的资源,其中My Device的图标资源ID为4354,Recycle Bin的图标资源ID为4352。

“AltIcon”:是指Recycle Bin中有东西时候的图标,大家都知道Recycle Bin空的时候和有东西的时候,图标显示是不一样的,这个图标资源来源于ceshell.dll中的图标资源,ID为4355。

实际上,他们都来源于ceshell.dll中的资源文件,这个我们需要看一下/WINCE600/public/shell/oak/hpc/ceshell/ui目录下的resource.h和ceshui_base.rc两个文件,

在resource.h中找到如下定义:

#define IDS_DISPLAY_RECYCLEBIN       0x5001     //20481

#define IDS_DISPLAY_DRIVES           0x5002    //20482

 

#define IDI_BITBUCKET         0x1100   //4352

#define IDI_BITBUCKET_FULL    0x1103   //4355

#define IDI_MYCOMPUTER        0x1102   //4354

所以,要改桌面图标,关键是在ceshell.dll中加入我们要用的icon资源,

1、首先把自己的图标拷贝到/WINCE600/public/shell/oak/hpc/ceshell/ui/res目录下面

2、然后在resource.h中定义几个新的ID,

#define IDI_asdf                                  0x1105   /*4357 */

3、在cehui_base.rc中将新定义的ID和相应的图标或者名字相关联。

IDI_asdf                ICON   DISCARDABLE   "RES//asdf.ico"

4、打开工程的project.reg文件,添加下面的内容:

; Drives (My Device)

 [HKEY_CLASSES_ROOT/CLSID/{000214A0-0000-0000-C000-000000000046}]

"DisplayName"=mui_sz:"ceshell.dll,#20482"

"DefaultIcon"="//Windows//ceshell.dll,- 4357" ;显示为我们更改的图标

[HKEY_CLASSES_ROOT/CLSID/{000214A0-0000-0000-C000-000000000046}/InprocServer32]

@=//Windows//ceshell.dll

; Recycle Bin (BitBucket) 垃圾回收站图标

[HKEY_CLASSES_ROOT/CLSID/{000214A1-0000-0000-C000-000000000046}]

"DisplayName"=mui_sz:"ceshell.dll,#20481"

"DefaultIcon"="//Windows//ceshell.dll,-4352"

"AltIcon"="//Windows//ceshell.dll,-4355"

[HKEY_CLASSES_ROOT/CLSID/{000214A1-0000-0000-C000-000000000046}/InprocServer32]

@=//Windows//ceshell.dll

3然后把ceshell.dll重新编译到工程中
这是最重要的一步,也是最难的一步

1、   将WINCE500/PUBLIC/SHELL/OAK目录下的HPC文件夹(shell源码)复制到本文件夹下,并重命名例如“RagooShell”

2、  修改WINCE500/PUBLIC/SHELL/OAK目录下dir文件,修改如下: DIRS= RagooShell(其它的不要)

3、  删除UI文件夹里的obj文件夹,还有exploerer等里面obj文件夹,如果不删除,它会默认不编译新的内容,而用以前的资源内容。

4、  将myshell内代码单独编译。运行PB6.0中菜单—〉Open Release Directory, 进入/WINCE500/PUBLIC/SHELL/OAK目录下,输入:build -c。将RagooShell文件夹下代码,及wince shell源码进行编译生成.lib及.res文件

5、  Sysgen一下,在工程目录下得到ceshell.res等文件,

6、  将.lib及资源文件Link成.dll文件, /PUBLIC/SHELL/OAK/RagooShell文件夹下创建ceshell_make文件夹

在ceshell_make文件夹下创建makefile和sources文件

makefile文件内容: !INCLUDE $(_MAKEENVROOT)/makefile.def

sources文件内容:

TARGETNAME=ceshell

TARGETTYPE=DYNLINK

RELEASETYPE=PLATFORM

DLLENTRY=_DllMainCRTStartup

WINCEOEM=1

INCLUDES=../inc;../../inc

TARGETLIBS= /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/oak/target/ARMV4I/retail/0C0A/ceshell.res  /  //不同的语言,有不同的文件夹,简体中文 是0804

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/uuid.lib  /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/ole32.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/oleaut32.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/commctrl.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/oak/lib/ARMV4I/retail/shcore.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/aygutils.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/coredll.lib

SOURCELIBS= /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/ceshapi.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/ceshui.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/taskbarlist.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/coredll.lib

SOURCES= /

CDEFINES=$(CDEFINES) -DREAD_FROM_REGISTRY

DEFFILE=D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/ceshell.def

这样就可以通过这两个文件生成ceshell.dll;

运行PB6.0菜单Build OS—〉Open Release Directory,进入DOS状态。进入到

WINCE600/PUBLIC/SHELL/OAK/ RagooShell /ceshell_make目录下,输入:build -c。 这样就生成了ceshell.dll文件。

注意

D:/WINCE600/OSDesigns/RagooMID_SHELL/Wince600/SMDK6410_ARMV4I/cesysgen/oak/target/ARMV4I/retail 目录下的ceshell.res文件,是生成ceshell.dll的关键,

0C0A_西班牙语

040C_法语

041D_瑞典

0404_繁体

0407_德语

0410_意大利

0411_日语

0412_朝鲜

0413_荷兰

0416_葡萄牙

0419_俄语

0804—简体中文

0409_英文

 

如果要修改控制面板里面的图标,它们在

D:/WINCE600/PUBLIC/WCESHELLFE/OAK/CTLPNL/CPLMAIN/RES 目录下,修改方法同上。如果要修改整套图标,最好的方法是替换原来的图标,就是用新图标与原图标命名一样,进行替换,这样很省事,

4将.lib及.res文件Link成.exe文件
在RagooShell文件夹下创建explorer_make文件夹,在explorer_make文件夹下创建makefile和sources文件

makefile文件内容: !INCLUDE $(_MAKEENVROOT)/makefile.def

sources文件内容:

TARGETNAME=explorerRagoo

TARGETTYPE=PROGRAM

RELEASETYPE=OAK

TARGETLIBS= /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/coredll.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/explorer.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/explorer.res /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/explorer_ie.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/uuid.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/ole32.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/oleaut32.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/commctrl.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/ceshell.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/oak/lib/ARMV4I/retail/shcore.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/aygutils.lib  /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/favorites.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/taskbar.lib /

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/oak/lib/ARMV4I/retail/ieceext.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/shellaygfuncs.lib /

D:/WINCE600/PUBLIC/SHELL/OAK/LIB/ARMV4I/RETAIL/shellpslayg.lib

SOURCELIBS= /

SOURCES= /

通过这两个文件,可以单独生成explorerRagoo.exe文件 运行PB6.0中菜单Build OS—〉Open Release Directory,进入DOS状态。进入到 WINCE600/PUBLIC/SHELL/OAK/RagooShell/explorer_make目录下,输入:build -c。 这样就生成了explorerRagoo.exe文件。

加入系统:

修改shell.bin中的

; @CESYSGEN IF SHELL_MODULES_EXPLORER     explorer1.exe    $(_FLATRELEASEDIR)/explorer1.exe                  NK  S

将explorerRagoo.exe、ceshell.dll、ceshell.rel、ceshell.pdb和ceshell.map文件拷到

D:/WINCE600/OSDesigns/RagooMID_CAMERA/RagooMID1/Wince600/SMDK6410_ARMV4I/cesysgen/sdk/lib/ARMV4I/retail/目录下并覆盖原来的文件。

将shell.reg中的

[HKEY_LOCAL_MACHINE/init] "Launch50"="explorer.exe" "Depend50"=hex:14,00, 1e,00 改为

[HKEY_LOCAL_MACHINE/init] "Launch50"="explorer1.exe" "Depend50"=hex:14,00, 1e,00

 

你可能感兴趣的:(shell,Build,include,makefile,hex,WinCE)