我正在从事的项目是从使用 VS2008 部署/安装程序切换到 WiX,我目前对它非常陌生。我已经添加了将资源项目的输出复制到 Resources.dll 中的代码,但是在旧的 VS2008 安装程序文件系统中,还有本地化的资源输出,当前生成两个文件夹(en 和 es),另一个 dll 在 ( Resources.resources.dll) 用于每种语言。我进行了一些搜索,但似乎无法找到将这些文件夹放入 msi 的方法,因为实际上知道这些文件夹存在并将它们直接放入。最好的方法是什么?
问问题
2442 次
2 回答
6
<Directory>
在您的 Wix 源中为每个本地化文件夹(en 和 es)定义元素,然后在<Component>
其中为您的附属程序集定义元素。
简而言之,把它们直接放进去!
于 2010-02-01T13:10:12.263 回答
6
这对我有用,适用于 2 种语言。
我为法语和日语添加了 localeDirectoryFR 和 localeDirectoryJA,如下所示:
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='INSTALLDIR' Name='CmisSync'>
<Component Id='CmisSync.exe' Guid='bab5a922-b5c4-4958-ab79-5e303b767a61'>
<File Id='CmisSync.exe' Name='CmisSync.exe' Source='!(wix.root)\bin\CmisSync.exe' KeyPath='yes' DiskId='1' />
</Component>
[... other components ...]
<Directory Id='localeDirectoryFR' Name='fr'>
<Component Id='localeComponentFR' Guid='01612d5d-6c9d-46e9-96c5-7105bbbea7db'>
<CreateFolder />
<File Id='localeFileFR' Name='CmisSync.resources.dll' Source='!(wix.root)\bin\fr\CmisSync.resources.dll' DiskId='1' />
</Component>
</Directory>
<Directory Id='localeDirectoryJA' Name='ja'>
<Component Id='localeComponentJA' Guid='8d77c457-54b0-41d6-9f1c-c91338b25505'>
<CreateFolder />
<File Id='localeFileJA' Name='CmisSync.resources.dll' Source='!(wix.root)\bin\ja\CmisSync.resources.dll' DiskId='1' />
</Component>
</Directory>
然后我在功能中引用了它们:
<Feature Id='CmisSyncFeature' Title='CmisSync' Description='CmisSync' Level='1' AllowAdvertise='no'>
<ComponentRef Id="CmisSync.exe" />
[... other componentrefs ...]
<ComponentRef Id="localeComponentFR" />
<ComponentRef Id="localeComponentJA" />
</Feature>
感谢 Paul Lalonde 的提示。
于 2013-02-04T07:31:50.293 回答