2

我是 WIX 新手,我正在使用 Wix 3.8 VS 2012。我设法使用这个神奇的工具将 .msi 生成到 .exe。

从本教程: http: //max.zamorsky.name/node/78,我设法将安装程序更改为French. 我想制作一个多语言安装程序,安装程序可以检测系统语言并继续安装。

我试图理解这个链接: http: //windows-installer-xml-wix-toolset.687559.n2.nabble.com/Localized-bundle-Picking-up-the-right-files-td7265208.html但我不能不明白。

请指导我如何制作这种类型的安装程序?需要你的帮助&谢谢。

捆绑包.WXS

<?xml version="1.0" encoding="UTF-8"?>
<?define SourceDirImages = "C:\Users\krangaraj\Documents\Visual Studio 2012\Projects\PrintUtility\SetupProjectInstaller" ?>
<?define SourceDoc = "C:\Users\krangaraj\Documents\Visual Studio 2012\Projects\PrintUtility\PrintUtilityExe" ?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
         xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
    <Bundle Name="PrintUtility" Version="1.5" Manufacturer="DNP PIE SAS" IconSourceFile="PartyPrintInstaller.ico"
          UpgradeCode="7ba74925-c154-4939-9c2e-a531eac0cd8a" >
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
      <bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes" SuppressRepair="yes"
        LicenseFile="$(var.SourceDoc)\sample.rtf" ThemeFile="HyperlinkTheme.xml"
        LocalizationFile="HyperlinkTheme.wxl"
        ShowVersion="yes"
        LogoFile="$(var.SourceDoc)\logo.jpg" LogoSideFile="$(var.SourceDoc)\SideLogo.jpg"/>

      <!--For the French language -->
        <Payload Compressed="yes"  Name="1036\thm.wxl" SourceFile="1036\thm.wxl"/>

      <!-- I would like to add German,Greek,English,Es,It,Jp,Ru,Turkish make a common installer  

      <Payload Compressed="yes"  Name="1031\thm.wxl" SourceFile="1031\thm.wxl"/>
      <Payload Compressed="yes"  Name="1032\thm.wxl" SourceFile="1032\thm.wxl"/>
      <Payload Compressed="yes"  Name="1033\thm.wxl" SourceFile="1033\thm.wxl"/>
      <Payload Compressed="yes"  Name="1034\thm.wxl" SourceFile="1034\thm.wxl"/>
      <Payload Compressed="yes"  Name="1040\thm.wxl" SourceFile="1040\thm.wxl"/>
      <Payload Compressed="yes"  Name="1041\thm.wxl" SourceFile="1041\thm.wxl"/>

      <Payload Compressed="yes"  Name="1049\thm.wxl" SourceFile="1049\thm.wxl"/>
      <Payload Compressed="yes"  Name="1055\thm.wxl" SourceFile="1055\thm.wxl"/>-->


    </BootstrapperApplicationRef>
    <Chain>
      <!-- TODO: Define the list of chained packages. -->
      <MsiPackage  SourceFile="$(var.SourceDirImages)\Product.msi"/>
    </Chain>

  </Bundle>
</Wix>
4

1 回答 1

3

假设您不打算使用选择语言然后使用适当的语言转换启动 MSI 的引导程序,您可以使用以下站点中描述的方法:http: //www.installsite.org/pages/en /msi/articles/embeddedlang/

请注意,该方法不受 Microsoft 支持,但我对此没有负面体验。另请注意,不是使用 Windows 的 UI 语言来检测语言,而是使用 Windows 的标准和格式选项。

它基本上由以下步骤组成:

  • 使用基本/备用语言创建基本 MSI 文件,大多数情况下它将是英语。
  • 创建您的语言转换文件,每种语言一个。如果 UI 不会更改并且您仅更改 UI 项,则可以重用这些转换文件以进行进一步的构建。
  • 使用 Windows SDK 中的 VBScript 脚本将语言转换添加为流。
  • 更新摘要信息流的语言条目以反映包含的语言。

在安装过程中,将弹出初始对话框,检查配置的语言,然后以正确的语言显示 UI。

如前所述:这种方法对我来说非常适合安装程序和超过 20 种语言。

于 2014-02-11T13:28:17.597 回答