[英]WiX installer .msi doesn't install the attached .lib and .dll files
[英]WiX installer includes dll into msi
我正在嘗試使用WiX創建安裝程序。 為了將DLL包含到.msi包中,我嘗試了兩種不同的方法。 其中之一是:
<DirectoryRef Id="SETTINGSDIR">
<Component Id="CMP_CopySettings" Guid="AC7D1AA1-798B-48F5-AF8D-188B1050D47C" KeyPath="yes">
<CreateFolder />
<File Id="DBA.bat" Source="$(var.SolutionDir)\scr\A\A.WindowsService\bin\$(var.Configuration)\Settings\A_DB clear.bat" Checksum="yes"/>
<File Id="AConfiguration.xml" Source="$(var.SolutionDir)\scr\A\A.WindowsService\bin\$(var.Configuration)\Settings\AConfiguration.xml" Checksum="yes"/>
<File Id="ADB.CE.DEFAULT.sdf" Source="$(var.SolutionDir)\scr\A\A.WindowsService\bin\$(var.Configuration)\Settings\ADB.CE.DEFAULT.sdf" Checksum="yes"/>
<File Id="ADB.CE.sdf" Source="$(var.SolutionDir)\scr\A\A.WindowsService\bin\$(var.Configuration)\Settings\A.CE.sdf" Checksum="yes"/>
<RemoveFile Id="RemoveFileSettings" Name="*" On="uninstall"/>
</Component>
</DirectoryRef>
但是,您可以輕松理解,為每個DLL編寫一個xml節點非常困難(6個項目,每個項目有200多個DLL)。
第二個速度更快,但是WiX只會創建指向該文件夾的鏈接,而不是將DLL復制到msi包中
<DirectoryRef Id="SETTINGSDIR">
<Component Id="CMP_CopySettings" Guid="AC7D1AA1-798B-48F5-AF8D-188B1050D47C" KeyPath="yes">
<CreateFolder />
<CopyFile Id="SettingsID" SourceProperty="SETTINGSSOURCEDIRECTORY" DestinationDirectory="SETTINGSDIR" SourceName="*" />
<RemoveFile Id="RemoveFileSettings" Name="*" On="uninstall"/>
</Component>
</DirectoryRef>
是否可以使用第二種方法添加快速解決方案,或者必須使用heat.exe工具? 在這種情況下,您能解釋一下如何使用它嗎? 官方文件很差
謝謝
您想要的是一種收割工具來為您執行此操作。 幸運的是它已經存在: 熱
在您的特定情況下,您可能需要使用命令heat dir ".\\My Files" -gg -g1 -directoryid "YourDirectoryId" -sfrag -template:fragment -out directory.wxs
但是請檢查您究竟需要什么,哪一個使您收獲想跳過等...
注意-t <xsl>
開關,它可以讓您完全控制如何調整最終輸出。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.