Wince Cab Manager使用方法

上面一篇日记中,写到在使用VS2005的“智能设备CAB包制作工具”或者是直接使用“cabwiz.exe”命令行工具的时候不支持中文。但我们现在的项目需要在中文版Windows CE 6.0系统的“桌面”上新建一个中文的快捷方式,所以本篇日记记录另一种可以制作Windows CE CAB安装包的工具:wince cab manager。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 1

新建一个安装包向导,填上“公司名字”,“程序名字”,下一步。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

  

2 微软基于wince的产品众多,这里可以选择支持哪些平台,然后下一步。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 3

选择处理器类型,“ALL/CEF”表示任何类型的处理器都可以。下一步。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 4

点击完成即可。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 5

双击“CAB信息”,设置本CAB包的一些属性。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 “公司名字”“程序名字”已经根据之前向导中填写的内容默认填写好了,选中“允许用户卸载此程序”。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 设置“默认安装目录”和是否允许用户选择“安装目录”。勾上编译到执行程序。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 这里可以再次设置处理器类型,以及是否压缩

CAB包。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 是否限制安装平台。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 设置

wince系统的最低最高版本限制,我这里设置了最低wince5.0,最高wince7.0。也可以选择程序不支持哪些平台。设置好之后,比如我到wince4.2系统中去安装这个CAB包,会弹出不兼容的提示。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 设置好属性之后,开始添加文件,添加快捷方式。

我一共添加了4个文件,如何添加文件很简单不介绍,注意其默认安装目录即可。下面是添加快捷方式的步骤。

输入快捷方式名称。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 选择为

GZPD.exe创建快捷方式。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 设置快捷方式放置的位置,这里都可以支持中文。还记得上篇日记中“

%CE2%”和“%CE11%”代表什么意思吧。点击完成。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 已经完成了大部分操作,这个时候可以点击“保存”,填写路径和

CAB包名称,之后就生成了一个CAB安装包。注意wince cab manager工具没有一个叫做“生成”或类似名字的按钮,点击“保存”就会保存该CAB的信息并生成CAB包。我之前找了半天,都没找到点击哪里可以生成CAB包。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 另外一个很重要的设置,就是添加注册表。我直接在

wince cab manager工具中进行编辑。不过很遗憾我用的这个版本的wince cab manager中文破解版存在一定的问题。直接编辑Reg可能会导致程序死掉。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 所以我采用了另一种途径,首先自己编写或导出一个

GZPD.reg注册表文件。内容:

[HKEY_CURRENT_USER/Software/GZPD]

"MajorVer"=dword:00000001

 

[HKEY_CURRENT_USER/Software/GZPD]

"MinorVer"=dword:00000001

然后在wince cab manager工具中导入GZPD.reg,显示导入成功。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 所有的操作都完成了:

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 最后点击一下保存按钮,生成我们最终的

CAB安装包,放到wince平台上进行安装测试。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 这一步出现了问题,默认安装路径,并不是我们之前设置的

/Program Files/SureKam/GZPD。

桌面上的中文快捷方式创建成功。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 注册表信息写入成功。

Wince Cab Manager使用方法 . - 乘风直上 - 乘风直上

 不过开始菜单那的快捷方式好像没建出来。针对这两个问题再简单修改一下

cab信息即可。

默认安装目录这有一个bug信息,在wince cab manager文档中可以找到:

“All versions of the Windows CE operating system prior to version 3.0 suffer from a bug that prevents new directories from being created during installation unless they are directly beneath the directory the application is installed into. For example, if the application were installed into the "/Program Files/Hello World" directory, then:

  · A directory named "/Program Files/Hello World/Directory 1" could be created, since it is directly beneath the installation directory, but;

  · A directory named "/Windows/Hello World" could not be created, since it is not directly beneath the installation directory.

  Note that these problems only occur when the %CE% macros are used to specify the destination for the files and shortcuts included in the CAB file.  To work around this problem, WinCE CAB Manager provides an option to use hard-coded paths instead of the macros when setting the default installation folder, and for the destinations of the files and shortcuts included in the CAB file.”

最后就是有一个技巧,由于前一篇日记已经对inf文件的编写很熟悉了。所以有什么问题时,可以在wince cab manager工具中导出inf,根据inf文件的内容很容易看出问题所在。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值