Wix 项目在多个目标位置的引用如何?
我正在努力为我正在从事的一个项目设置 wix。 我决定尝试一下,但到目前为止进展并不顺利。 我可能已经阅读了所有教程并在网络上搜索但没有成功。
这是我的情况: 一个安装程序应安装在程序文件应用程序文件夹中
1.) Windows 窗体应用程序
2.) Windows 应用程序使用的 Web 应用程序
3.) Web 和 win 应用程序使用的共享 lib1
4.) web 和 win 应用程序使用的共享 lib2
...等等
我正在使用项目参考来收集项目输出的热量。 我已经给出了每个项目目录 ID,以便稍后可以在实际安装位置中使用它作为参考。 看来我无法在多个位置拥有相同的项目输出 我也不能多次引用同一项目。
如何制作在多个目标位置使用项目输出的安装程序。 这是我的product.wxs 中的示例,
<!-- Define Directory Structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- ProgramFiles -->
<Directory Id="ProgramFilesFolder">
<Directory Id="dirManufacturer" Name="TEST_[Manufacturer]">
<Directory Id="INSTALLLOCATION" Name="TEST_[ProductName]">
<!-- Filled With Referenced project -->
<Directory Id="dirControl" Name="Control">
<Directory Id="dirControlOutput" />
<Directory Id="dirSearchAndIndexOutput" />
<Directory Id="dirControlLib" />
<Directory Id="dirControlAndWebLib" />
<Directory Id="dirLuceneAnalyzersOutput" />
</Directory>
<!-- Filled With Referenced project -->
<Directory Id="dirWeb" Name="Web">
<Directory Id="dirWebOutput" />
<Directory Id="dirWebBin" Name="bin">
<Directory Id="dirUrlRewriterOutput" />
<Directory Id="dirSearchAndIndexOutput" />
<!-- TODO: Fix This
<Directory Id="dirSearchAndIndexOutput" />
<Directory Id="dirControlAndWebLib" />
<Directory Id="dirLuceneAnalyzersOutput" />
-->
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
<!-- StartMenu -->
<Directory Id="ProgramMenuFolder">
<Directory Id="dirProgramsMenu" Name="TEST_[ProductName]">
</Directory>
</Directory>
<!-- CommonApplicationData -->
</Directory>
我真的很想了解这一切是如何工作的,但我发现的所有内容都表明这种情况要么是不可能的,要么需要直接硬手动引用文件。
我的总体想法是让 Visual Studio 解决方案自动为每个源更改构建设置。
感谢您的帮助和建议!
戈兰
I'm struggling with wix setup for one project I'm working on.
I have decided to give a wix try and it is not going well so far.
I have read probably all tutorials and searched net without success.
Here is my situation:
One setup should install in program files app folder
1.) Windows forms application
2.) Web application that is used by windows application
3.) Shared lib1 used by web and win application
4.) Shared lib2 used by web and win application
... etc
I'm using project references to collect project output with heat.
I have given each project directory id so I can later use this as reference in real install location.
It looks like I can't have same project output on more than one location
I can't have same project referenced more than once also.
How can I make installer that is using project outputs on more than one destination location.
Here is example from my product.wxs
<!-- Define Directory Structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- ProgramFiles -->
<Directory Id="ProgramFilesFolder">
<Directory Id="dirManufacturer" Name="TEST_[Manufacturer]">
<Directory Id="INSTALLLOCATION" Name="TEST_[ProductName]">
<!-- Filled With Referenced project -->
<Directory Id="dirControl" Name="Control">
<Directory Id="dirControlOutput" />
<Directory Id="dirSearchAndIndexOutput" />
<Directory Id="dirControlLib" />
<Directory Id="dirControlAndWebLib" />
<Directory Id="dirLuceneAnalyzersOutput" />
</Directory>
<!-- Filled With Referenced project -->
<Directory Id="dirWeb" Name="Web">
<Directory Id="dirWebOutput" />
<Directory Id="dirWebBin" Name="bin">
<Directory Id="dirUrlRewriterOutput" />
<Directory Id="dirSearchAndIndexOutput" />
<!-- TODO: Fix This
<Directory Id="dirSearchAndIndexOutput" />
<Directory Id="dirControlAndWebLib" />
<Directory Id="dirLuceneAnalyzersOutput" />
-->
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
<!-- StartMenu -->
<Directory Id="ProgramMenuFolder">
<Directory Id="dirProgramsMenu" Name="TEST_[ProductName]">
</Directory>
</Directory>
<!-- CommonApplicationData -->
</Directory>
I'm really trying to understand how all of this works but everything I have found points out that this scenario is either impossible or requires hard manual referencing files directly.
My general idea is to have Visual Studio solution that is automatically builds setup for each source change.
Thank you for help and sudgestions!
Goran
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从描述中的 3. 和 4. 来看,我收集到您需要将相同的文件安装在不同的位置,对吧?
您可以像下面的示例一样执行此操作 - 同一文件(构建计算机上的 path\to\lib1.dll)将在目标计算机上安装两次,分别为 App\lib1.dll 和 Web\lib1.dll。您只需要引用同一源文件的 2 个不同组件。
From 3. and 4. in the description I gather you need the same file installed on different places, right?
You could do it like in the example below - same file (path\to\lib1.dll on the build machine) will be installed twice on the target machine, as App\lib1.dll and as Web\lib1.dll. You just need 2 different components that reference the same source file.