作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我想将我的应用程序安装到以下目录结构中:
MyCompany/
MyApp/
assembly1.dll
assembly2.dll
assembly3.dll
...
plugins/
plugin1.dll
plugin2.dll
为此,我定义了以下文件夹:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="CompanyFolder" Name="MyCompanyName">
<Directory Id="INSTALLFOLDER" Name="MyProduct">
<Directory Id="PLUGINS" Name="plugins">
<Directory Id="DATABASE_PLUGINS" Name="db" />
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
现在我已经定义了 1 个功能并引用了一个组件组。该组件组有一个指向“INSTALLFOLDER”的属性“Directory”。但是当我现在在组件组中声明一个组件时,它也有一个“目录”属性(指向 DATABASE_PLUGINS),VS 不会让我build设置。
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="DB.Connector.Extension.Plugins.SqlCe" Directory="DATABASE_PLUGINS" Guid="{ae87be28-b0c9-4b3e-915f-2b4bf9965c99}">
<File Source="$(var.DB.Connector.Extension.Plugins.SqlCe.TargetDir)DB.Connector.Extension.Plugins.SqlCe.dll" KeyPath="yes" />
</Component>
</ComponentGroup>
我怎样才能实现安装程序在我的主安装目录中创建一个子目录并将声明的文件放入其中?
最佳答案
这是我的完整示例,希望这对更多开发人员有所帮助
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="GiladDir" Name="Gilad">
<Directory Id="INSTALLFOLDER" Name="App">
<Directory Id="BIN" Name="bin"></Directory>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="App">
<Component Id="ProgramMenuDir" Guid="*">
<RemoveFolder Id="ProgramMenuDir" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Value="" KeyPath="yes" />
</Component>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="group_tools">
<ComponentRef Id="comp_tool_dll" />
</ComponentGroup>
<DirectoryRef Id="INSTALLFOLDER">
<Directory Id="bin" Name="bin">
<Directory Id="Release" Name="Release">
<Directory Id="Plugins" Name="Plugins">
<Component Id="comp_tool_dll" DiskId="1" KeyPath="yes" Guid="*">
<File Id="file_comp_tool_dll" Source="$(var.ReleaseSourcePath)\Plugins\tool.dll" />
</Component>
关于c# - WIX ComponentGroup 子目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18334987/
我想将我的应用程序安装到以下目录结构中: MyCompany/ MyApp/ assembly1.dll assembly2.dll assem
所以,我正在尝试使用 heat 为我的项目中的文件生成片段。查看我过去生成的文件以及网络上的各种 WiX 文章,我看到我有目录/组件的片段,然后是使用 ComponentRef 定义 Componen
我正在使用 Codename One 开发跨平台应用程序。对于我的应用程序的 iOS 版本,我希望 ComponentGroup 显示在表单上。我在 CN Designer 工具中添加了 Compon
我是一名优秀的程序员,十分优秀!