如何使用 SevenZipSharp 创建 SFX ZIP?
我一直在寻找 SevenZipSharp 创建一个自解压 zip 文件。项目页面说他们有一个特殊的类 SevenZipSfx 可以做到这一点。但是我搜索了对象资源管理器和 0.64 版本的文档,但找不到任何对它的引用。
有谁知道该课程是否缺失,或者我缺失的“特殊课程”是否有不同的含义?
I have been looking at SevenZipSharp to create a self extracting zip file. The project page says that they have a special class SevenZipSfx that does this. However I have searched the object explorer and the documentation for version 0.64 and I cant find any reference to it.
Does anyone know if the class is missing or if there is a different meaning to "Special Class" that I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来 Sfx 类不是默认构建的。 从 Codeplex 获取源代码(或 查看主干代码)并将条件编译常量
SFX
添加到项目设置并重建。令人烦恼的是,签名不在其源代码管理中,因此您必须禁用程序集的代码签名。或者,如果这是一次性的 SFX,那么您可以使用 SevenZip\sfx 目录中的文件自行构建它。如果您查看 SevenZipSfx 源,您会发现它只是在前面添加了一个从程序集资源获取到 .7z 存档的这些文件的数量。
It looks like the Sfx class isn't built by default. Grab the source code from Codeplex (or check out the trunk code) and add conditional compile constant
SFX
to the project settings and rebuild. Annoyingly the signing isn't in their source control so you'll have to disable code signing for the assembly.Alternatively if this is a one-off SFX then you can build it yourself using the files in the SevenZip\sfx directory. If you look at the SevenZipSfx soruce you'll see it simply prepends one of those files taken from the assembly resources to the .7z archive.
这段代码对我有用,将目录中的文件打包:
99.9% 有效
This code works for me, packs a directory with files within:
99.9% work