如何检查 NSIS setup.exe 中包含哪些文件?
在我的 NSIS 脚本中,我使用这一行:
File "..\help\*.*"
我的问题是我的 subversion 存储库中有帮助目录(随着我们添加新功能,它会不断更新)。 这意味着帮助目录包含一个 .svn 目录。
我希望查看 NSIS 创建的 setup.exe 的内容,以验证它是否没有 .svn 目录。
Ps 我尝试看看当使用通配符时 NSIS 是否递归地添加文件。 事实并非如此。 但我想验证这一点,所以才提出这个问题。
In my NSIS script, I use this line:
File "..\help\*.*"
My problem is that I have the help directory in my subversion repository (its constantly updated as we add new functionality). This means that the help directory contains a .svn directory.
I wish to view the contents of the setup.exe that NSIS created to verify that it does not have the .svn directory.
P.s. I experimented to see if NSIS recursively adds files when wildcards are used. It doesn't. But I want to verify this, hence the question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这些东西通常是压缩文件。
您可以使用7z/7-zip检查打开EXE存档。
作为记录,在以下评论之后,
我想指出我最近在 Superuser 上关于 7-zip 优点的笔记,
使用 RAR 与 ZIP 压缩
These things are typically compressed files.
You could check with 7z/7-zip to open the EXE archive.
As a record, after the comments below,
I'd like to point to my recent notes on the merits of 7-zip at Superuser,
Compressing with RAR vs ZIP
无需查看 NSIS exe 本身中的内容,只需排除 .svn 目录即可,这样您就知道它们永远不会在那里。
像这样的东西就可以解决问题:
/x .svn
位告诉 NSIS 排除这些目录。巧合的是,如果您没有使用
/r
开关,那么您就不会递归地添加文件和文件夹,因此它无论如何也不会添加 .svn 子目录。Rather than look at what's in your NSIS exe itself, just exclude the .svn directories so you know they'll never be in there.
Something like this will do the trick:
The
/x .svn
bit tells NSIS to exclude those directories.Coincidentally, if you're not using the
/r
switch, then you're not adding files and folders recursively, so it wouldn't add the .svn subdirectories anyway.我的建议是查看 NSIS 编译日志,而不是解压缩。 它会告诉您有关所包含文件的所有信息。 当我对 NSIS 脚本进行更改时,我总是检查日志以确保一切都按计划进行。 将日志从命令行流式传输到文本文件,然后从您喜欢的编辑器中读取它。
Instead of unzipping, my suggestion is to look at the NSIS compilation log. It will tell you everything about files included. When doing changes in my NSIS scripts I always check the logs to make sure that everything is going according to plan. Streaming the log from the command line to a text file, then read it from your favorite editor.
我使用 7zip 文件管理器和“Open Inside”命令。
I use 7zip File Manager and the "Open Inside" command.