如何让 Inno Setup 忽略空目录?

发布于 2024-08-13 14:40:39 字数 253 浏览 4 评论 0原文

我的 Inno Setup 脚本包含一个目录:

[Files]
...
Source: C:\MyProg\Tools\*.*; Destdir: {app}\Tools
...

但有时该目录是空的,在这种情况下 Inno Setup 会停止并显示错误“没有匹配的文件...”。

我当前的解决方法是向该目录添加一个空的虚拟文件。

如果该目录为空,我可以让 Inno Setup 忽略该目录吗?

My Inno Setup script includes a directory:

[Files]
...
Source: C:\MyProg\Tools\*.*; Destdir: {app}\Tools
...

But sometimes this directory is empty and in that case Inno Setup stops with an error "No files matching ...".

My current workaround is adding an empty dummy file to that directory.

Can I make Inno Setup ignore this directory if it is empty?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空心↖ 2024-08-20 14:40:39

您是否尝试过 skipifsourcedoesntexist 标志?

[Files]
...
Source: C:\MyProg\Tools\*.*; Destdir: {app}\Tools; Flags: skipifsourcedoesntexist 
...

Did you try the skipifsourcedoesntexist flag?

[Files]
...
Source: C:\MyProg\Tools\*.*; Destdir: {app}\Tools; Flags: skipifsourcedoesntexist 
...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文