Wix 安装程序 - 始终替换 SWF 文件
我遇到了一个问题,我们必须向客户提供更新后的 SWF 文件的修补程序。由于 swf 文件没有版本控制,因此在下一个版本中它不会被覆盖(安装程序认为它是用户修改的文件并且不会覆盖它)。
我有一些运行自定义操作来替换文件的建议,但这无法正确处理回滚情况。我只是好奇其他人会对此案提出什么建议。
I'm running into a problem where we had to give a customer a hotfix that was an updated SWF file. Because swf files are not versioned, during the next release it does not get overwritten (the installer thinks it is a user modified file and will not overwrite it).
I have had some suggestions of running a custom action to replace the file, but this would not properly handle a rollback situation. I'm just curious on what others would suggest for this case.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Windows Installer 通过使用所谓的“伴随文件”来支持这一点。您可以通过 WiX 中的 File/@CompanionFile 进行设置。它的工作原理是使用引用文件的版本比较来代替它自己的版本,因此如果引用的文件被安装,那么这个文件也会被安装。通常,这将是安装程序中的另一个版本文件,因此您可以轻松控制它。有时,该文件的存在只是为了包含版本资源,安装后不会提供任何真正的好处。
您可以通过搜索“伴随文件”或“版本谎言”找到更多信息。
Windows Installer supports this through the use of what it calls "Companion Files". You can set this through File/@CompanionFile in WiX. It works by using the referenced file's version comparison in place of its own, so if the referenced file gets installed, so will this one. Typically this would be another versioned file in your installer, so you can easily control this. Sometimes that file exists solely to contain a version resource and doesn't provide any real benefit once installed.
You can find more information with searches for "companion files", or "version lie".