どのようにWiXのカスタムアクションDLLの呼び出しは、マージモジュールを介してデバッグランタイムを使用させることができますか?
-
26-09-2019 - |
質問
私は、私たちの製品に対応するデバッグインストーラでデバッグビルドを作成しようとしています。私はウィックスに新たなんだので、ここに含まれる任意の認識の甘さはご容赦下さい。私のプロジェクトでのデバッグDLLは、VS2008とVS2008SP1デバッグランタイムの両方に依存しています。私は私のインストーラでこれらのランタイムをバンドルするWiXのでマージモジュールの機能を作成しました。
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!-- Include our 'variables' file -->
<!--<?include variables.wxi ?>-->
<!--<Fragment>-->
<DirectoryRef Id="TARGETDIR">
<!-- Always install the 32 bit ATL/CRT libraries, but only install the 64 bit ones on a 64 bit build -->
<Merge Id="AtlFiles_x86"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC90_ATL_x86.msm"
DiskId="1"
Language="1033"/>
<Merge Id="AtlPolicy_x86"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_9_0_Microsoft_VC90_ATL_x86.msm"
DiskId="1"
Language="1033"/>
<Merge Id="CrtFiles_x86"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC90_DebugCRT_x86.msm"
DiskId="1"
Language="1033"/>
<Merge Id="CrtPolicy_x86"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_9_0_Microsoft_VC90_DebugCRT_x86.msm"
DiskId="1"
Language="1033"/>
<Merge Id="MfcFiles_x86"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC90_DebugMFC_x86.msm"
DiskId="1"
Language="1033"/>
<Merge Id="MfcPolicy_x86"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_9_0_Microsoft_VC90_DebugMFC_x86.msm"
DiskId="1"
Language="1033"/>
<!-- If this is a 64 bit build, install the relevant modules -->
<?if $(env.Platform) = "x64" ?>
<Merge Id="AtlFiles_x64"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC90_ATL_x86_x64.msm"
DiskId="1"
Language="1033"/>
<Merge Id="AtlPolicy_x64"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_9_0_Microsoft_VC90_ATL_x86_x64.msm"
DiskId="1"
Language="1033"/>
<Merge Id="CrtFiles_x64"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC90_DebugCRT_x86_x64.msm"
DiskId="1"
Language="1033"/>
<Merge Id="CrtPolicy_x64"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_9_0_Microsoft_VC90_DebugCRT_x86_x64.msm"
DiskId="1"
Language="1033"/>
<Merge Id="MfcFiles_x64"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC90_DebugMFC_x86_x64.msm"
DiskId="1"
Language="1033"/>
<Merge Id="MfcPolicy_x64"
SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_9_0_Microsoft_VC90_DebugMFC_x86_x64.msm"
DiskId="1"
Language="1033"/>
<?endif?>
</DirectoryRef>
<Feature Id="MS2008_SP1_DbgRuntime"
Title="VC2008 Debug Runtimes"
AllowAdvertise="no"
Display="hidden"
Level="1">
<!-- 32 bit libraries -->
<MergeRef Id="AtlFiles_x86"/>
<MergeRef Id="AtlPolicy_x86"/>
<MergeRef Id="CrtFiles_x86"/>
<MergeRef Id="CrtPolicy_x86"/>
<MergeRef Id="MfcFiles_x86"/>
<MergeRef Id="MfcPolicy_x86"/>
<!-- 64 bit libraries -->
<?if $(env.Platform) = "x64" ?>
<MergeRef Id="AtlFiles_x64"/>
<MergeRef Id="AtlPolicy_x64"/>
<MergeRef Id="CrtFiles_x64"/>
<MergeRef Id="CrtPolicy_x64"/>
<MergeRef Id="MfcFiles_x64"/>
<MergeRef Id="MfcPolicy_x64"/>
<?endif?>
</Feature>
<!--</Fragment>-->
</Include>
私はインストーラのデバッグビルドをやっている場合は、は、私のようなので、その機能が含まれます:
<!-- The 'Feature' that contains the debug CRT/ATL libraries -->
<?if $(var.Configuration) = "Debug"?>
<?include ..\includes\MS2008_SP1_DbgRuntime.wxi?>
<?endif?>
唯一の問題は私のインストーラもまた、デバッグランタイムに依存しているカスタムアクションが含まれていることです。
<!-- Private key installer -->
<Binary Id="InstallPrivateKey" SourceFile="..\InstallPrivateKey\win32\$(var.Configuration)\InstallPrivateKey.dll"></Binary>
<CustomAction Id='InstallKey' BinaryKey='InstallPrivateKey' DllEntry='InstallPrivateKey'/>
それでは、どのように私は?カスタムアクションはまた、それへのアクセス権を持っているような方法でデバッグ実行時間をパッケージ化することができます。
解決
あなたがすることはできません。これらのランタイムの多くは、唯一のインストールの最後に起こるInstallFinalizeのでコミットされています。代わりに、非常にカスタムアクションは完全に自己完結しているので、あなたは静的にカスタムアクションにCRT / ATLライブラリをリンクすることをお勧めします。
所属していません StackOverflow