试图制作一个多语言安装程序 - 该过程通常工作,但似乎无法安装本地化文件。MST为什么不包含具有不同内容的文件
每个本地化安装程序都可以独立运行并安装本地化文件,如eula.pdf。
我希望,我只是缺少变换生成步骤的标志(或者使用了错误的工具?)
过程由有一群为每种语言安装1开始。
要构建每个安装程序,我们使用-b "folder"
和-loc "folder"
选项指定每个语言,其中包含一些替代文件内容,如licence.pdf。
进行本地化的文件有一个共同的源名称
<File Id='License.pdf' Name='eula.pdf' Source='License(EULA).pdf' KeyPath='yes'/>
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
例如是
en-US/License(EULA).pdf
en-US/License.rtf
en-US/Product.wxl
fr-FR/License(EULA).pdf
fr-FR/License.rtf
fr-FR/Product.wxl
也有一些文件,如文件夹binary.dll和binary.exe未本地化并且对所有msi都一样 - 不要期望在MST中看到它们。
该过程中的下一步是在基本语言(英语)和其他每种语言之间创建一个MST差异。使用Window SDK中的Windows\v7.1\Bin\MsiTran.exe
对于内容更改,MST看起来有点小。
使用Windows\v7.1\Samples\sysmgmt\msi\scripts\wisubstg.vbs
除英语之外的语言安装合并所有MST文件到一个单一的安装程序将显示整个安装程序UI包括许可证为被本地化的RTF版本,但在磁盘上的EULA.pdf是永远是基础英语。
使用Ant-DOTNET任务运行构建(如果它有差别) 微星建设任务
<wix mode="light" target="${outlocation}\${lang.folder}\my.msi" wixHome="${wixhome}">
<lightArg line="-b "${location}""/> <!-- provide the location of the signable binaries -->
<lightArg line="-b "${msiwixsource}\Localisation\${lang.folder}""/> <!-- provide the location of the localisation -->
<lightArg line="-sice:ICE57"/>
<lightArg line="-cultures:${lang.culture}"/>
<lightArg line="-loc "${msiwixsource}\Localisation\${lang.folder}\Product.wxl""/>
<lightArg line="-ext "${wixhome}\WixUtilExtension.dll""/>
<lightArg line="-ext "${wixhome}\WixUIExtension.dll""/>
<lightArg line="-ext "${wixhome}\WixFirewallExtension.dll""/>
<lightArg line="-ext "${wixhome}\WixNetFxExtension.dll""/>
<sources dir="${msiwixobjects}">
<include name="*.wixobj"/>
</sources>
<moresources dir="${msiwixsource}\Localisation\${lang.folder}">
<include name="*"/>
</moresources>
<moresources dir="${location}">
<include name="binary.dll,binary.exe"/>
</moresources>
</wix>
变换任务
<exec executable="${windowsSDKBin}">
<arg value="-g"/>
<arg value="${outlocation}\en-US\my.msi"/>
<arg value="${outlocation}\${lang.folder}\my.msi"/>
<arg value="${outlocation}\${lang.folder}\my.mst"/>
</exec>
的重新包装任务
<exec executable="cscript">
<arg value="${windowsSDKMsi}"/>
<arg value="${outlocation}\my.msi"/>
<arg value="${outlocation}\${lang.folder}\my.mst"/>
<arg value="${lang.id}"/>
</exec>
Product/@ Language =“!(loc.Lang)”在Product.wxl中指定 英文基地我们列出所有1033,1028,1029,1031,1036,1040,1041,1043,1045,1046,2052,3082
其他语言只是具体的如1036
fr-FR