首页 | 博客群 | 公社 | 专栏 | 论坛 | 图片 | 资讯 | 注册 | 帮助 | 博客联播 | 随机访问
vcproj文件格式(转载)- -| 回首页 | 2008年索引 | - -宽字符串处理函数与窄字符串处理函数对照表

WinCE制作CAB安装包

关键词wince    wm    cab    cab安装包    漂泊浪子                                          

1、编写inf文件
可以参考POCKET PC 2003的AppInst例子,以及Windows Mobile 5.0 SDK帮助文档Deploying Windows Mobile Applications > How to Package and Distribute Windows Mobile Applications

sample.inf

[Version]
Signature   = "$Windows NT$"        ; required as-is
Provider    = "Microsoft"           ; maximum of 30 characters, full app name will be " "
CESignature = "$Windows CE$"        ; required as-is
 
[CEStrings]
AppName     = "Mine Sweeper"        ; maximum of 40 characters, full app name will be " "
InstallDir  = %CE1%\%AppName%       ; Program Files\Mine Sweeper

; Directory Identifier Pocket PC Directory
; %CE1% \Program Files
; %CE2% \Windows
; %CE4% \Windows\StartUp
; %CE5% \My Documents
; %CE8% \Program Files\Games
; %CE11% \Windows\Start Menu\Programs
; %CE14% \Windows\Start Menu\Programs\Games
; %CE15% \Windows\Fonts
; %CE17% \Windows\Start Menu
 
[SourceDisksNames]                  ; directory that holds the application's files
1 = , "Common Files",,Common        ; disk_id = ,comment,,path (absolute or relative paths)
 
[SourceDisksFiles]                  ; list of files to be included in .cab
bigexpl.wav = 1
miniwin.wav = 1
winmine.exe = 1
 
[DefaultInstall]                    ; operations to be completed during install
CopyFiles   = CopyToProgramFiles
AddReg      = RegData
CEShortcuts = Shortcuts  
 
[DestinationDirs]                   ; default destination directories for each operation section
CopyToProgramFiles    = 0, %InstallDir%
Shortcuts   = 0, %CE14%             ; \Windows\Start Menu\Programs\Games
 
[CopyToProgramFiles]                ; copy operation file list
"winmine.exe", winmine.exe
"miniwin.wav", miniwin.wav
"bigexpl.wav", bigexpl.wav
 
[RegData]                           ; registry key list
HKCU,Software\%AppName%,MajorVersion,0x00010001,1
HKCU,Software\%AppName%,MinorVersion,0x00010001,0
 
[Shortcuts]                         ; Shortcut created in destination dir, %CE14%
%AppName%,0,winmine.exe

 

2、用cabwiz命令生成cab文件
cabwiz sample.inf /compress
/compress命令只能用在Windows Mobile以后的版本

【作者: 漂泊浪子】【访问统计:】【2008年06月26日 星期四 20:46】【注册】【打印

搜索

Google

Trackback

你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=6747537

回复

验证码:   
评论内容: