2016-08-26 5 views
3

私は、heat.exeを使用してメインのインストーラにファイルをインクルードする.wxsファイルを生成しています。Wixで熱出力(wxs)を参照する方法(コマンドライン)

私はDLLを登録するためにどのスイッチを使用しますか?

出力ファイルを生成したら、「Main.wxs」ファイルにどのように追加するのですか? (これはかなり明示してください。)

私は2番目の質問に対する回答をたくさん見てきましたが、私はいつも漠然とした何かを思いつきました。またはVSのためにコマンドラインから作業しています。ありがとう!

これまで私が試したことは次のとおりです。エラーが表示されます。(LGHT0103:システムでファイル "file"が見つかりません)すべてのファイルに対してこのエラーが発生します。

<Fragment> 
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> 
    <Component Id="cmp1D2A500FA963CF9DB333FD18154B94BC" Guid="{8DE755D7-F1F9-4EC3-BCD5-B72360B8752A}"> 
    <File Id="filCBD973AD942425DC5F533B29866FEF5A" KeyPath="yes" Source="SourceDir\DLLs\FP7000-Camera.dll" /> 
    </Component> 
    <Component Id="cmp4CC93670B061A60B94C1867DCFAAAED0" Guid="{717E0819-2842-4C0D-BFAB-30E4C8C66F7E}"> 
    <File Id="fil7CEC0F75EDE8EEF9C7F6D563E8D04EF9" KeyPath="yes" Source="SourceDir\DLLs\libmfxsw64.dll" /> 
    </Component> 
    <Component Id="cmpE80ACF08DF44E67E7583F35557C8EB02" Guid="{4CAA0627-45DB-4E34-9B4C-C54B5E21346C}"> 
    <File Id="fil1E619A89A3D0D2FDE446E60B3D3EB2AF" KeyPath="yes" Source="SourceDir\DLLs\pthreadVC2.dll" /> 
    </Component> 
    </ComponentGroup> 
</Fragment> 

答えて

-1

コンポーネントノードを切り取り、メインのwxsファイルの正しいインストールディレクトリに貼り付けることができます。例として、あなたはこの単純なモックアップをチェックアウトすることができます:

 <?xml version="1.0"?> 
     <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
     <Product Id="*" UpgradeCode="put-guid-here" 
       Name="Example Product Name" Version="0.0.1" 
       Manufacturer="Example Company Name" Language="1033"> 
     <Package InstallerVersion="200" Compressed="yes" 
       Comments="Windows Installer Package"/> 

     <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/> 
     <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder"> 
      <Directory Id="INSTALLDIR" Name="Example"> 
       <Component Id="FP7000-Camera.dll" Guid="*"> 
        <File Id="FP7000-Camera.dll" Source="replace with path to FP7000-Camera.dll"/> 
       </Component> 

       further components can be added here. 

      </Directory> 
     </Directory> 
     </Directory> 

     <Feature Id="DefaultFeature" Level="1"> 
      <ComponentRef Id="FP7000-Camera.dll"/> 
     </Feature> 

     </Product> 
     </Wix> 

あなたはあなたのCOMファイル用のCOMデータを抽出する必要があります。次に、Heat.exeコマンドのサンプルを示します。 (注:DLLが欠落により、依存関係にロードに失敗した場合は、抽出を実行する前に、SDKのセットアップをインストールする必要があるかもしれません):

heat file MyComFile.ocx -out MyComFile.wxs 

結果、MyComFile.wxsでのCOMデータは次のようになります、抽出:

<?xml version="1.0" encoding="utf-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Fragment> 
     <DirectoryRef Id="TARGETDIR"> 
      <Directory Id="dirE645D1B018BB48C41BDBE188A129817F" Name="wix310-binaries" /> 
     </DirectoryRef> 
    </Fragment> 
    <Fragment> 
     <DirectoryRef Id="dirE645D1B018BB48C41BDBE188A129817F"> 

      cut from here 

      <Component Id="cmpD8BB195A00599F06D2FF16982DBAA523" Guid="PUT-GUID-HERE"> 
       <File Id="filBDC3CFD8FF09857ADE9793AF172F66E6" KeyPath="yes" Source="SourceDir\wix310-binaries\ITDetector.ocx"> 
        <TypeLib Id="{D6995525-B33A-4980-A106-9DF58570CC66}" Description="ITDetector 1.0 Type Library" HelpDirectory="dirE645D1B018BB48C41BDBE188A129817F" Language="0" MajorVersion="1" MinorVersion="0"> 
         <Class Id="{D719897A-B07A-4C0C-AEA9-9B663A28DFCB}" Context="InprocServer32" Description="iTunesDetector Class" ThreadingModel="apartment" Programmable="yes" SafeForScripting="yes" SafeForInitializing="yes"> 
          <ProgId Id="ITDetector.iTunesDetector.1" Description="iTunesDetector Class"> 
           <ProgId Id="ITDetector.iTunesDetector" Description="iTunesDetector Class" /> 
          </ProgId> 
         </Class> 
         <Interface Id="{45D2C838-0137-4E6A-AA3B-D39B4A1A1A28}" Name="IiTunesDetector" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> 
        </TypeLib> 
       </File> 
      </Component> 

      to here 

     </DirectoryRef> 
    </Fragment> 
</Wix> 

コンポーネントをメインのwxsファイルの適切なディレクトリに貼り付けます。たとえば、上記の最初のWXSファイルに示されているようにINSTALLDIRにあります。

最後にあなたheat.exeツールから抽出されたコンポーネントノードが移入メインWXSファイル示すマージされたサンプル

 <?xml version="1.0"?> 
     <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
     <Product Id="*" UpgradeCode="put-guid-here" 
       Name="Example Product Name" Version="0.0.1" 
       Manufacturer="Example Company Name" Language="1033"> 
     <Package InstallerVersion="200" Compressed="yes" 
       Comments="Windows Installer Package"/> 

     <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/> 
     <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder"> 
      <Directory Id="INSTALLDIR" Name="Example"> 

       <Component Id="FP7000-Camera.dll" Guid="*"> 
        <File Id="FP7000-Camera.dll" Source="replace with path to FP7000-Camera.dll"/> 
       </Component> 

       <Component Id="cmpD8BB195A00599F06D2FF16982DBAA523" Guid="*"> 
       <File Id="filBDC3CFD8FF09857ADE9793AF172F66E6" KeyPath="yes" Source="SourceDir\wix310-binaries\ITDetector.ocx"> 
        <TypeLib Id="{D6995525-B33A-4980-A106-9DF58570CC66}" Description="ITDetector 1.0 Type Library" HelpDirectory="dirE645D1B018BB48C41BDBE188A129817F" Language="0" MajorVersion="1" MinorVersion="0"> 
         <Class Id="{D719897A-B07A-4C0C-AEA9-9B663A28DFCB}" Context="InprocServer32" Description="iTunesDetector Class" ThreadingModel="apartment" Programmable="yes" SafeForScripting="yes" SafeForInitializing="yes"> 
          <ProgId Id="ITDetector.iTunesDetector.1" Description="iTunesDetector Class"> 
           <ProgId Id="ITDetector.iTunesDetector" Description="iTunesDetector Class" /> 
          </ProgId> 
         </Class> 
         <Interface Id="{45D2C838-0137-4E6A-AA3B-D39B4A1A1A28}" Name="IiTunesDetector" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> 
        </TypeLib> 
       </File> 
       </Component> 


      </Directory> 
     </Directory> 
     </Directory> 

     <Feature Id="DefaultFeature" Level="1"> 
      <ComponentRef Id="FP7000-Camera.dll"/> 
      <ComponentRef Id="cmpD8BB195A00599F06D2FF16982DBAA523"/> 

     </Feature> 

     </Product> 
     </Wix> 

上記不明である場合に、この答えを読みしてみてください。How to run heat.exe and register a dll in wix

関連する問題