![](/img/trans.png)
[英]What is the environment variable for AppData in NSIS installer script?
[英]Nsis script: Trying to write a script which extracts specific directory from a zip file and adds it as a part of installer(executable)
我有 zip 文件说 Texas.zip 。 它包含 2 个目录纽约和曼哈顿。 纽约有两个文件 A.txt 和 B.txt ,而曼哈顿有 C.txt 和 D.txt 。 我只想提取 Newyork 和其中关联的 2 个文件。 下面的脚本帮助我提取 Newyork 中的特定文件,而不是整个目录。 请告诉我如何从 zip 中提取特定目录及其内容。 脚本:
Section "TEST1"
InitPluginsDir
#SetOutpath "$INSTDIR"
nsisunz::UnzipToStack /file "Texas\Newyork\A.txt" "D:\Files\Texas.zip" "D:\Output folder"
Pop $0
DetailPrint "$0" ;print message to log
SectionEnd*
所需的输出:在 D:\\Output folder\\ 安装 exe 后,我必须看到 D:\\Output folder\\Newyork * 其中 '*' 表示文件 A.txt 和 B.txt 。
此插件不支持此类高级选项,您必须使用nsUnzip代替。
如果您愿意更改存档格式,CabX 和一些 7z 插件也支持此功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.