- 追加された行はこの色です。
- 削除された行はこの色です。
&tag(WiX/多言語化);
*目次 [#x50729d9]
#contents
*関連ページ [#a717ae84]
-[[WiX]]
*参考情報 [#w23fdeb8]
-[[Morphing Installers | WiX Tutorial:http://wix.tramontana.co.hu/tutorial/transforms/morphing-installers]]
*多言語化の手順 [#ya3b9eed]
-[[Morphing Installers | WiX Tutorial:http://wix.tramontana.co.hu/tutorial/transforms/morphing-installers]]から、SampleTransform.zipをダウンロード。
**国別msiの作成 [#a383b8e7]
-SampleMulti.wxsファイルを確認。 「$(var.codepage)」が置き換えられる。
#pre{{
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Foobar 1.0' Id='YOURGUID-86C7-4D14-AEC0-86416A69ABDE' UpgradeCode='YOURGUID-7349-453F-94F6-BCB5110BA4FD'
Language='1033' Codepage='$(var.codepage)' Version='1.0.0' Manufacturer='Acme Ltd.'>
<Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 Installer"
Comments='Foobar is a registered trademark of Acme Ltd.' Manufacturer='Acme Ltd.'
InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='$(var.codepage)' />
...
</Wix>
}}
-各国語別のインストーラの作成。codepageは以下のリンクで確認できる。[[Do You Speak English? | WiX Tutorial:http://wix.tramontana.co.hu/tutorial/user-interface/do-you-speak-english]]
#pre{{
# 英語
candle.exe SampleMulti.wxs -dcodepage=1252
light.exe -ext WixUIExtension -cultures:en-us -out SampleMulti.msi SampleMulti.wixobj
# ハンガリー語
candle.exe SampleMulti.wxs -dcodepage=1250
light.exe -ext WixUIExtension -cultures:hu-hu -out Sample_Hu-hu.msi SampleMulti.wixobj
# フランス語
candle.exe SampleMulti.wxs -dcodepage=1252
light.exe -ext WixUIExtension -cultures:fr-fr -out Sample_Fr-fr.msi SampleMulti.wixobj
# 日本語
candle.exe SampleMulti.wxs -dcodepage=1041
light.exe -ext WixUIExtension -cultures:ja-jp -out Sample_Ja-jp.msi SampleMulti.wixobj
}}
**mstファイル(翻訳ファイル)の作成。 [#d1cff084]
-英語版と差分をとりmstファイルを出力する
#pre{{
torch.exe -p -t language SampleMulti.msi Sample_Hu-hu.msi -out hu-hu.mst
torch.exe -p -t language SampleMulti.msi Sample_Fr-fr.msi -out fr-fr.mst
torch.exe -p -t language SampleMulti.msi Sample_Ja-jp.msi -out ja-jp.mst
}}
-この状態で以下のように実行すれば、指定された国の言語でインストーラーが起動する。
msiexec /i SampleMulti.msi TRANSFORMS="fr-fr.mst"
**統合版msiの作成 [#zf703a12]
-一つのmsiファイルに統合する場合さらに以下の作業を行う。
#pre{{
EmbedTransform.exe SampleMulti.msi hu-hu.mst
EmbedTransform.exe SampleMulti.msi fr-fr.mst
EmbedTransform.exe SampleMulti.msi fr-fr.mst
}}
-以下のコマンドで実行できる。TRANSFORMSの引数の頭に":"がついているのに注目(内部に埋め込まれているので)。
msiexec /i SampleMulti.msi TRANSFORMS=":fr-fr.mst"