wince 界面定制--在shell原码上修改步骤

下载源代码

/**

 

wince 界面定制--在shell原码上修改步骤:(在x86环境下,修改ceshell中的代码)
1、将WINCE500\PUBLIC\SHELL\OAK目录下的HPC文件夹(shell源码)复制到本文件夹下,将该文件夹改名,如myshell
2、修改WINCE500\PUBLIC\SHELL\OAK目录下dir文件,修改如下:
                        DIRS=myshell \
3、将myshell内代码单独编译。运行PB5.0中菜单Build OS—〉Open Release Directory,进入DOS状态。
进入\WINCE500\PUBLIC\SHELL\OAK目录下,输入:build -c。将myshell文件夹下代码,及wince shell源码进行编译生成.lib及.res文件
4、将.lib及资源文件Link成.dll文件
ceshell文件夹下创建ceshell_make文件夹,在ceshell_make文件夹下创建makefile和sources文件
makefile文件内容:
!INCLUDE $(_MAKEENVROOT)\makefile.def
sources文件内容:
TARGETNAME=ceshell
TARGETTYPE=DYNLINK

RELEASETYPE=PLATFORM
DLLENTRY=_DllMainCRTStartup

WINCEOEM=1
INCLUDES=..\;..\..\inc

TARGETLIBS= E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\oak\target\x86\retail\0409\ceshell.res E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\uuid.lib E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\ole32.lib E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\oleaut32.lib E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\commctrl.lib E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\oak\lib\x86\retail\shcore.lib E:\WINCE500\public\shell\oak\lib\x86\retail\aygutils.lib E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\coredll.lib
SOURCELIBS= E:\WINCE500\public\shell\oak\lib\x86\retail\ceshapi.lib E:\WINCE500\public\shell\oak\lib\x86\retail\ceshui.lib E:\WINCE500\public\shell\oak\lib\x86\retail\taskbarlist.lib E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\coredll.lib
                                                                                             

SOURCES= \
CDEFINES=$(CDEFINES) -DREAD_FROM_REGISTRY
DEFFILE=E:\WINCE500\public\shell\oak\lib\x86\retail\ceshell.def
这样就可以通过这两个文件生成ceshell.dll;
运行PB5.0中菜单Build OS—〉Open Release Directory,进入DOS状态。进入到
WINCE500\PUBLIC\SHELL\OAK\myshell\ceshell_make目录下,输入:build -c。
这样就生成了ceshell.dll文件。
5、将.lib及.res文件Link成.exe文件
在myshell文件夹下创建explorer_make文件夹,在explorer_make文件夹下创建makefile和sources文件
makefile文件内容:
!INCLUDE $(_MAKEENVROOT)\makefile.def
sources文件内容:
TARGETNAME=explorer1
TARGETTYPE=PROGRAM
RELEASETYPE=OAK
TARGETLIBS= \
  E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\coredll.lib \
  E:\WINCE500\public\shell\oak\lib\x86\retail\explorer.lib \
  E:\WINCE500\PUBLIC\SHELL\OAK\LIB\x86\RETAIL\explorer.res \
  E:\WINCE500\public\shell\oak\lib\x86\retail\explorer_ie.lib \
  E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\uuid.lib \
  E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\ole32.lib \
  E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\oleaut32.lib \
  E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\commctrl.lib \
  E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\sdk\lib\x86\retail\ceshell.lib \
  E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\oak\lib\x86\retail\shcore.lib \
  E:\WINCE500\public\shell\oak\lib\x86\retail\aygutils.lib \
  E:\WINCE500\public\shell\oak\lib\x86\retail\favorites.lib \
  E:\WINCE500\public\shell\oak\lib\x86\retail\taskbar.lib \
  E:\WINCE500\PBWorkspaces\test1\WINCE500\Emulator_x86\cesysgen\oak\lib\x86\retail\ieceext.lib \
  E:\WINCE500\public\shell\oak\lib\x86\retail\shellaygfuncs.lib \
  E:\WINCE500\public\shell\oak\lib\x86\retail\shellpslayg.lib \
 
SOURCELIBS= \
SOURCES= \
这样就能通过这两个文件,单独生成explorer1.exe文件
运行PB5.0中菜单Build OS—〉Open Release Directory,进入DOS状态。进入到
WINCE500\PUBLIC\SHELL\OAK\myshell\explorer_make目录下,输入:build -c。
这样就生成了explorer1.exe文件。
6、将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中的代码了!
7、修改shell.bin中的
; @CESYSGEN IF SHELL_MODULES_EXPLORER
    explorer1.exe    $(_FLATRELEASEDIR)\explorer1.exe                  NK  S
8、将explorer1.exe、ceshell.dll、ceshell.rel、ceshell.pdb和ceshell.map文件拷到
E:\WINCE500\PBWorkspaces\test1\RelDir\Emulator_x86_Debug目录下并覆盖原来的文件。
这样再makeimg就可以将你修改后的代码装载到你的模拟器中了!

posted on 2009-03-04 15:13  酸辣大白菜  阅读(1451)  评论(0编辑  收藏  举报

导航