インストール中にカスタム アクションの進行状況テキストを表示したいと考えています。カスタム アクションの WiX Progress Text のようにコードを実装しましたが、機能しません。
他のすべてのテキスト (ファイルのコピーなど) が表示され、ActionText テーブルが正しく入力され、ActionText.Action が CustomAction.Actuib 値と一致します。誰が何がうまくいかないのか知っていますか?コードは次のとおりです。
主な WiX プロジェクト:
<Product>
<CustomAction Id="MyCA" BinaryKey="MyCALib"
DllEntry="MyCAMethod" Execute="deferred"
Return="check" />
<InstallExecuteSequence>
<Custom Action="MyCA" Before="InstallFinalize" />
</InstallExecuteSequence>
<UI>
<UIRef Id="MyUILibraryUI" />
</UI>
</Product>
UI ライブラリ:
<Wix ...><Fragment>
<UI Id="MyUILibraryUI">
<ProgressText Action="MyCA">Executing my funny CA...
</ProgressText>
...
<Dialog Id="Dialog_Progress" ...>
<Control Id="Ctrl_ActionText"
Type="Text" ...>
<Subscribe Event="ActionData" Attribute="Text" />
</Control>
...
C# カスタム アクション ライブラリ:
public class MyCALib
{
[CustomAction]
public static ActionResult MyCAMethod(Session session)
{
System.Threading.Thread.Sleep(10000); // to show text
// do something
System.Threading.Thread.Sleep(10000); // to show text
return ActionResult.Success;
}
}