sfx cab archive是怎么制作cab安装包的

unzipsfx - self-extracting stub for prepending to
ZIP archives
&name of unzipsfx+archive combo&
[-cfptuz[ajnoqsCLV$]] [file(s)
... [-x xfile(s) ...]]
DESCRIPTION
unzipsfx is a modified version of unzip(1L)
designed to be prepended to existing ZIP archives in order
to form self-extracting archives. Instead of taking its
first non-flag argument to be the zipfile(s) to be
extracted, unzipsfx seeks itself under the name by
which it was invoked and tests or extracts the contents of
the appended archive. Because the executable stub adds bulk
to the archive (the whole purpose of which is to be as small
as possible), a number of the less-vital capabilities in
regular unzip have been removed. Among these are the
usage (or help) screen, the listing and diagnostic functions
(-l and -v), the ability to
decompress older compression formats (the
"reduce," "shrink" and
"implode" methods). The ability to extract to a
directory other than the current one can be selected as a
compile-time option, which is now enabled by default since
UnZipSFX version 5.5. Similarly, decryption is supported as
a compile-time option but should be avoided unless the
attached archive contains encrypted files. Starting with
release 5.5, another compile-time option adds a simple
"run command after extraction" feature. This
feature is currently incompatible with the "extract to
different directory" feature and remains disabled by
Note that self-extracting archives made with
unzipsfx are no more (or less) portable across
different operating systems than is the unzip
executable itself. In general a self-extracting
archive made on a particular Unix system, for example, will
only self-extract under the same flavor of Unix. Regular
unzip may still be used to extract the embedded
archive as with any normal zipfile, although it will
generate a harmless warning about extra bytes at the
beginning of the zipfile. Despite this, however, the
self-extracting archive is technically not a valid
ZIP archive, and PKUNZIP may be unable to test or extract
it. This limitation is due to the simplistic manner in which
th the internal directory structure is
not updated to reflect the extra bytes prepended to the
original zipfile.
An optional list of archive members to be processed.
Regular expressions (wildcards) similar to those in Unix
egrep(1) may be used to match multiple members. These
wildcards may contain:
matches a sequence of 0 or more characters
matches exactly 1 character
matches any single character found
ranges are specified by a beginning character, a hyphen, and
an ending character. If an exclamation point or a caret
('!' or '^') follows the left
bracket, then the range of characters within the brackets is
complemented (that is, anything except the characters
inside the brackets is considered a match).
(Be sure to quote any character that might otherwise be
interpreted or modified by the operating system,
particularly under Unix and VMS.)
[-x xfile(s)]
An optional list of archive members to be excluded from
processing. Since wildcard characters match directory
separators ('/'), this option may be used to
exclude any files that are in subdirectories. For example,
"foosfx *.[ch] -x */*" would extract all
C source files in the main directory, but none in any
subdirectories. Without the -x option, all C
source files in all directories within the zipfile would be
extracted.
If unzipsfx is compiled with SFX_EXDIR defined,
the following option is also enabled:
[-d exdir]
An optional directory to which to extract files. By
default, all files and subdirectories are recreated in the
the -d option allows
extraction in an arbitrary directory (always assuming one
has permission to write to the directory). The option and
directory may be concatenated without any white space
between them, but note that this may cause normal shell
behavior to be suppressed. In particular, "-d
~" (tilde) is expanded by Unix C shells into the
name of the user's home directory, but
"-d~" is treated as a literal
subdirectory "~" of the current
directory.
unzipsfx supports the following unzip(1L)
options: -c and -p (extract to
standard output/screen), -f and -u
(freshen and update existing files upon extraction),
-t (test archive) and -z (print
archive comment). All normal listing options
(-l, -v and -Z) have
been removed, but the testing option (-t) may
be used as a "poor man's" listing.
Alternatively, those creating self-extracting archives may
wish to include a short listing in the zipfile comment.
See unzip(1L) for a more complete description of
these options.
unzipsfx currently supports all unzip(1L)
modifiers: -a (convert text files),
-n (never overwrite), -o
(overwrite without prompting), -q (operate
quietly), -C (match names case-insensitively),
-L (convert uppercase-OS names to lowercase),
-j (junk paths) and -V (retain
version numbers); plus the following operating-system
specific options: -X (restore VMS
owner/protection info), -s (convert spaces in
filenames to underscores [DOS, OS/2, NT]) and
-$ (restore volume label [DOS, OS/2, NT,
(Support for regular ASCII text-conversion may be removed
in future versions, since it is simple enough for the
archive's creator to ensure that text files have the
appropriate format for the local OS. EBCDIC conversion will
of course continue to be supported since the zipfile format
implies ASCII storage of text files.)
See unzip(1L) for a more complete description of
these modifiers.
ENVIRONMENT OPTIONS
unzipsfx uses the same environment variables as
unzip(1L) does, although this is likely to be an
issue only for the person creating and testing the
self-extracting archive. See unzip(1L) for
DECRYPTION
Decryption is supported exactly as in unzip(1L);
that is, interactively with a non-echoing prompt for the
password(s). See unzip(1L) for details. Once again,
note that if the archive has no encrypted files there is no
reason to use a version of unzipsfx with decryption
that only adds to the size of the archive.
AUTORUN COMMAND
When unzipsfx was compiled with CHEAP_SFX_AUTORUN
defined, a simple "command autorun" feature is
supported. You may enter a command into the Zip archive
comment, using the following format:
$AUTORUN$&[command line string]
When unzipsfx recognizes the
"$AUTORUN$&" token at the beginning of the Zip
archive comment, the remainder of the first line of the
comment (until the first newline character) is passed as a
shell command to the operating system using the C rtl
"system" function. Before executing the command,
unzipsfx displays the command on the console and
prompts the user for confirmation. When the user has
switched off prompting by specifying the -q option,
autorun commands are never executed.
In case the archive comment contains additional lines of
text, the remainder of the archive comment following the
first line is displayed normally, unless quiet operation was
requested by supplying a -q option.
To create a self-extracting archive letters from a
regular zipfile letters.zip and change the new
archive's permissions to be world-executable under
cat unzipsfx letters.zip & letters
chmod 755 letters
zip -A letters
To create the same archive under MS-DOS, OS/2 or NT (note
the use of the /b [binary] option to the copy
copy /b unzipsfx.exe+letters.zip letters.exe
zip -A letters.exe
Under VMS:
copy unzipsfx.exe,letters.zip letters.exe
letters == "$currentdisk:[currentdir]letters.exe"
zip -A letters.exe
(The VMS append command may also be used. The
second command installs the new program as a "foreign
command" capable of taking arguments. The third line
assumes that Zip is already installed as a foreign command.)
Under AmigaDOS:
MakeSFX letters letters.zip UnZipSFX
(MakeSFX is included with the UnZip source distribution
and with Amiga binary distributions. "zip
-A" doesn't work on Amiga self-extracting
archives.) To test (or list) the newly created
self-extracting archive:
letters -t
To test letters quietly, printing only a summary
message indicating whether the archive is OK or not:
letters -tqq
To extract the complete contents into the current
directory, recreating all files and subdirectories as
necessary:
To extract all *.txt files (in Unix quote the
letters *.txt
To extract everything except the *.txt
letters -x *.txt
To extract only the README file to standard output (the
letters -c README
To print only the zipfile comment:
letters -z
LIMITATIONS
The principle and fundamental limitation of
unzipsfx is that it is not portable across
architectures or operating systems, and therefore neither
are the resulting archives. For some architectures there is
limited portability, however (e.g., between some flavors of
Intel-based Unix).
Another problem with the current implementation is that
any archive with "junk" prepended to the beginning
technically is no longer a zipfile (unless zip(1) is
used to adjust the zipfile offsets appropriately, as noted
above). unzip(1) takes note of the prepended bytes
and ignores them since some file-transfer protocols, notably
MacBinary, are also known to prepend junk. But
PKWARE's archiver suite may not be able to deal with
the modified archive unless its offsets have been
unzipsfx has no knowledge of the user's
PATH, so in general an archive must either be in the current
directory when it is invoked, or else a full or relative
path must be given. If a user attempts to extract the
archive from a directory in the PATH other than the current
one, unzipsfx will print a warning to the effect,
"can't find myself." This is always true
under Unix and may be true in some cases under MS-DOS,
depending on the compiler used (Microsoft C fully qualifies
the program name, but other compilers may not). Under OS/2
and NT there are operating-system calls available that
provide the full path name, so the archive may be invoked
from anywhere in the user's path. The situation is not
known for AmigaDOS, Atari TOS, MacOS, etc.
As noted above, a number of the normal unzip(1L)
functions have been removed in order to make unzipsfx
smaller: usage and diagnostic info, listing functions and
extraction to other directories. Also, only stored and
deflated files are supported. The latter limitation is
mainly relevant to those who create SFX archives,
VMS users must know how to set up self-extracting
archives as foreign commands in order to use any of
unzipsfx's options. This is not necessary for
simple extraction, but the command to do so then becomes,
e.g., "run letters" (to continue the
examples given above).
unzipsfx on the Amiga requires the use of a
special program, MakeSFX, in order to create working
self- simple concatenation does not
work. (For technically oriented users, the attached archive
is defined as a "debug hunk.") There may be
compatibility problems between the ROM levels of older
Amigas and newer ones.
All current bugs in unzip(1L) exist in
unzipsfx as well.
DIAGNOSTICS
unzipsfx's exit status (error level) is
identical to that of unzip(1L); see the corresponding
The Info-ZIP home page is currently at
and the ftp site at
Greg Roelofs was responsible for the basic modifications
to UnZip necessary to create UnZipSFX. See unzip(1L)
for the current list of Zip-Bugs authors, or the file
CONTRIBS in the UnZip source distribution for the full list
of Info-ZIP contributors.内容转自MSDN
1.首先,制作自己的智能设备工程
2.添加cab工程:
打开现有的智能设备项目,并确保&解决方案资源管理器&可见。
在&文件&菜单上指向&添加&,然后单击&新建项目&。
出现&添加新项目&对话框。
在&项目类型&窗格中,展开&其他项目类型&,再单击&安装和部署&。
在&模板&窗格中单击&智能设备 CAB 项目&。
这是唯一可用于智能设备的 CAB 项目类型。其他项目类型仅用于桌面解决方案。
在&名称&框中,键入&CABProject,然后单击&确定&。
该 CAB 项目随即添加到解决方案中,并显示在&解决方案资源管理器&中。现在显示&文件系统编辑器&的两个窗格。
在&解决方案资源管理器&中单击&CABProject&(如果尚未选定)。
在&视图&菜单上单击&属性窗口&,或打开&属性&窗口。
在属性网格的&ProductName&字段中,将值更改为&MyProduct&。
&ProductName&属性的值决定了在文件夹名称和&添加或删除程序&对话框中为应用程序显示的名称。
还可以使用此窗口更改制造商的名称,以及指定操作系统的最低和最高版本。
可以将&OSVersionMin&属性设置为 4.21,以指示您的 Pocket PC 应用程序具有屏幕方向感知功能。但是,将此属性设置为 4.21 会阻止应用程序安装到基于 Windows Mobile 2003 或更早版本的 Pocket PC 上。若要允许在此类设备上进行安装,并通知较新的设备该程序具有屏幕方向感知功能,则必须手动修改 .inf 文件,将&BuildMax&属性设置为下列值之一:
0xA0000000,指示应用程序支持方形屏幕(240x240 像素)
0xC0000000,指示应用程序支持屏幕旋转
0xE0000000,指示应用程序支持方形屏幕和屏幕旋转。
有关更多信息,请参见位于 MSDN 上的文章&(开发识别屏幕方向的应用程序)。
对于基于 Windows Mobile 2003 SE 及更低版本的 Pocket PC 解决方案,&Compress&属性和&NoUninstall Device Deployment&属性必须为 false。请注意,对于配备了 Compact Framework 2.0 的设备,此选项可以设置为&true。
如果您使用的是 Windows CE 安装程序 DLL,使用此属性网格可以指定文件名和位置。有关 Windows CE 安装程序 DLL 的更多信息,请参见 Pocket PC 或 Smartphone SDK 文档。
在&解决方案资源管理器&中右击&CABProject&,然后单击&属性&。
出现 CAB 项目的&属性页&对话框。在&输出文件名&框中,将 CAB 文件的名称和路径更改为Debug/MyApp.cab,然后单击&确定&。
还可以使用此属性页为项目添加身份验证。身份验证对于 Smartphone 解决方案是必需的,但是在基于 Windows Mobile 2003 SE 及更低版本的 Pocket PC 解决方案上,身份验证不受支持。
在&文件系统编辑器&的左窗格中,单击&应用程序文件夹&,以指定在后续步骤中选择的文件将安装到目标设备上的此文件夹中。
如果看不到&文件系统编辑器&,请在&解决方案资源管理器&中右击 CAB 项目名称,单击&视图&,再单击&文件系统&。
在 Visual Studio 中的&操作&菜单上指向&添加&,然后单击&项目输出&。
在&添加项目输出组&对话框中,从&项目&下拉列表中选择您的智能设备项目。
从输出列表中选择&主输出&,然后单击&确定&。
在&文件系统编辑器&的右窗格中,选择&&应用程序项目名称& 的主输出&。
在&操作&菜单上单击&创建 &应用程序项目名称& 的主输出的快捷方式&。
此命令将在&输出&项下面添加一个&快捷方式&项。
右击该&快捷方式&项,单击&重命名&,然后将该快捷方式重命名为适合于快捷方式的名称。
在&文件系统编辑器&的左窗格中,右击&目标计算机上的文件系统&,指向&添加特殊文件夹&,然后单击&Start Menu 文件夹&或&Programs 文件夹&。
将此快捷方式从&应用程序文件夹&拖动到&Start Menu 文件夹&或&Programs 文件夹&。
在&解决方案资源管理器&中单击 CAB 项目。
在&视图&菜单上指向&编辑器&,然后单击&注册表&。
在&注册表编辑器&中,右击 HKEY_CURRENT_USER,然后单击&新建项&。
当&注册表编辑器&中显示&新建项&项时,将其重命名为&SOFTWARE&。
右击此新项,指向&新建&,然后单击&项&。
当&注册表编辑器&中显示&新建项&项时,将其重命名为&MyCompany&。
右击&MyCompany&项,然后单击&属性窗口&。
&名称&值已更改为&MyCompany&。
在&生成&菜单上单击&生成 CABProject&。
在&解决方案资源管理器&中右击&CABProject&,再单击&生成&。
在&文件&菜单上单击&全部保存&。
Smartphone 解决方案的 CAB 文件在部署到最终用户的设备上之前必须进行数字签名。基于 Windows Mobile 2003 SE 及更低版本的 Pocket PC 解决方案不支持数字签名。
在&Windows 资源管理器&中定位到存储此解决方案的文件夹。可以在解决方案的&CABProject/Release&文件夹中找到此 CAB 文件。
将 CAB 文件复制到使用 ActiveSync 4.0 或更高版本进行连接的设备上。
当用户在设备上的&资源管理器&中点击此 CAB 文件名时,Windows CE 将解开该 CAB,并将应用程序安装到设备上。
有关更多信息,请参见 Smartphone 和 Pocket PC SDK 文档。
在使用中发现一些问题如下:
1.用VS2008打包CAB布支持中文字符
比如我定义 Default字符串值为&协议,就报错;去掉中文就OK
Error: The INF file contains Unicode characters that could not be converted correctly to ANSI
2.不支持带空格参数的值
比如我定义 Default字符串值为 "/Program Files/xxx/xxx.exe" "%1",报错如下
Error: Line& 44 - unsupported DirID 0Error: File d:/systmp/cwinltmp/wiz231.inf contains DirIDs, which are not supported
临时解决办法:
我用VS2008做出CAB后,用wince cab manager 3.0打开
继续编辑,修正上面的值为我要的,保存,OK!
还请大家指点问题的所在
阅读(...) 评论()查看: 2649|回复: 4
CAB SFX是什么壳
阅读权限10
我用查壳,查出 microsoft visual studio.net -&microsoft corporation [CAB SFX] *&&请问这是什么壳,如何?
发帖求助前要善用【】功能,那里可能会有你要找的答案;如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;如何回报帮助你解决问题的坛友,一个好办法就是给对方加【热心】和【CB】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
阅读权限20
安装包吧!!!
发帖求助前要善用【】功能,那里可能会有你要找的答案;如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;如何回报帮助你解决问题的坛友,一个好办法就是给对方加【热心】和【CB】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
阅读权限30
我也学习一下
发帖求助前要善用【】功能,那里可能会有你要找的答案;如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;如何回报帮助你解决问题的坛友,一个好办法就是给对方加【热心】和【CB】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
头像被屏蔽
提示: 作者被禁止或删除 内容自动屏蔽
发帖求助前要善用【】功能,那里可能会有你要找的答案;如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;如何回报帮助你解决问题的坛友,一个好办法就是给对方加【热心】和【CB】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
阅读权限20
发帖求助前要善用【】功能,那里可能会有你要找的答案;如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;如何回报帮助你解决问题的坛友,一个好办法就是给对方加【热心】和【CB】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
免责声明:吾爱破解所发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。
( 京ICP备号 | 京公网安备 87号 )
Powered by Discuz!
Comsenz Inc.您的位置:> -&
-& >下载 档案号:#103449
软件授权:
软件大小:
软件语言:
软件评级:
官方主页:
更新时间:
应用平台:
复制到论坛
复制到博客
绿盟口号! 伸出你的手 - 绿色分享:
官方评级:3/793
同类软件推荐
本类下载排行}

我要回帖

更多关于 如何制作cab文件 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信