使用 CopyFiles 而不是 File 命令的 NSIS 递归文件复制
对于 NSIS 安装程序,我一直在使用此命令:
SetOutPath $INSTDIR\data
File /r /x *.svn data\newTerrainTiled
将数据文件复制到可执行文件本身。我现在有一个更大的数据集,它已经超出了安装程序可执行文件的最大大小。我尝试将代码更改为:
SetOutPath $INSTDIR\data
CopyFiles /r $EXEDIR\data\newTerrainTiled
但显然 CopyFiles 没有递归标志。我意识到我可以一一创建 newTerrainTiled 文件夹的子目录,然后使用带有通配符 (*) 字符的 CopyFiles。我想知道是否有人已经提出了一种递归方法,当数据集变大时,使用 CopyFiles 代替 File 进行复制。
谢谢。
For an NSIS installer I have been using this command:
SetOutPath $INSTDIR\data
File /r /x *.svn data\newTerrainTiled
to copy my data files into the executable itself. I now have a larger data set that has outgrown the maximum size of the installer executable. I tried to change my code to this:
SetOutPath $INSTDIR\data
CopyFiles /r $EXEDIR\data\newTerrainTiled
But obviously CopyFiles does not have a recursive flag. I realize I could create the subdirectories of the newTerrainTiled folder one by one and then used CopyFiles with the wildcard (*) character. I wanted to know if someone has already come up with a recursive method of copying using CopyFiles in place of File for when data sets become large.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CopyFiles 可以复制目录(包含所有文件和子文件夹),但在您的情况下,只有当数据目录与安装程序一起位于 CD/DVD 上时,它才有用。
其他替代方法是:
CopyFiles can copy a directory (with all files and subfolders) but in your case it would only be useful if the data directory was on a CD/DVD along with the installer.
Other alternatives are: