<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
  <Product Name='RenderDoc' Id='*' UpgradeCode='D320753C-4B18-4905-A752-E68959943E7D'
    Language='1033' Codepage='1252' Version='$(env.RENDERDOC_VERSION).0' Manufacturer='Baldur Karlsson'>

    <Package Id='*' Keywords='Installer' Description="Installer for RenderDoc"
      Comments='RenderDoc Homepage is http://renderdoc.org/' Platform="x64" Manufacturer='Baldur Karlsson'
      InstallerVersion='301' Languages='1033' Compressed='yes' SummaryCodepage='1252' />

    <InstallExecuteSequence>
      <RemoveExistingProducts After="InstallInitialize"/>
    </InstallExecuteSequence>

    <Property Id="MajorMinorVersion">$(env.RENDERDOC_VERSION)</Property>

    <Property Id="REINSTALLMODE" Value="amus"/> 

    <Upgrade Id="D320753C-4B18-4905-A752-E68959943E7D">
      <UpgradeVersion Minimum="0.18.0"
        IncludeMinimum="yes"
        IncludeMaximum="yes"
        Maximum="$(env.RENDERDOC_VERSION).0"
        Property="OLDERVERSIONBEINGUPGRADED" />
      <UpgradeVersion OnlyDetect="yes" Property="NEWERVERSIONDETECTED" Minimum="$(env.RENDERDOC_VERSION).0" IncludeMinimum="no" />
    </Upgrade>

    <Condition Message="A later version of [ProductName] is already installed">
      NOT NEWERVERSIONDETECTED
    </Condition>

    <Media Id='1' Cabinet='renderdoc.cab' EmbedCab='yes' CompressionLevel='high' DiskPrompt="CD-ROM #1" />
    <Property Id='DiskPrompt' Value="RenderDoc Installation [1]" />

    <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramFiles64Folder' Name='PFiles'>
        <Directory Id='INSTALLDIR' Name='RenderDoc'>

          <Component Id='QRenderDoc' Win64="yes" Guid='44398F0D-3FE3-470A-A137-BDFDFE82353D'>
            <File Id='qrenderdocEXE' Name='qrenderdoc.exe' DiskId='1' Source='dist/Release64/qrenderdoc.exe' KeyPath='yes'>
              <Shortcut Id="startmenuRenderDoc" Directory="ProgramMenuDir" Name="RenderDoc" WorkingDirectory='INSTALLDIR' Icon="icon.ico" IconIndex="0" Advertise="yes" />
            </File>

            <RegistryValue Root="HKLM" Id="VerbRDC" Action="write"
              Key="Software\Classes\RenderDoc.RDCCapture.1\shell\open\command"
              Value='"[#qrenderdocEXE]" "%1"'
              Type="expandable" />
            <RegistryValue Root="HKLM" Id="VerbDescRDC" Action="write"
              Key="Software\Classes\RenderDoc.RDCCapture.1"
              Value='RenderDoc Capture Log (.rdc)'
              Type="expandable" />
            <RegistryValue Root="HKLM" Id="VerbIconRDC" Action="write"
              Key="Software\Classes\RenderDoc.RDCCapture.1\DefaultIcon"
              Value='[#qrenderdocEXE]'
              Type="expandable" />
            <RegistryValue Root="HKLM" Id="RDCProgIDCLSID" Action="write"
              Key="Software\Classes\RenderDoc.RDCCapture.1\CLSID"
              Value='{5D6BF029-A6BA-417A-8523-120492B1DCE3}'
              Type="expandable" />

            <RegistryValue Root="HKLM" Id="VerbCAP" Action="write"
              Key="Software\Classes\RenderDoc.RDCSettings.1\shell\open\command"
              Value='"[#qrenderdocEXE]" "%1"'
              Type="expandable" />
            <RegistryValue Root="HKLM" Id="VerbDescCAP" Action="write"
              Key="Software\Classes\RenderDoc.RDCSettings.1"
              Value='RenderDoc Capture Settings (.cap)'
              Type="expandable" />
            <RegistryValue Root="HKLM" Id="VerbIconCAP" Action="write"
              Key="Software\Classes\RenderDoc.RDCSettings.1\DefaultIcon"
              Value='[#qrenderdocEXE]'
              Type="expandable" />

          </Component>

          <Component Id='RenderDocCPP' Win64="yes" Guid='9D5949F9-0447-47B6-829D-77465E1FDAD9'>
            <File Id='RenderDocCPP' Name='renderdoc.dll' DiskId='1' Source='dist/Release64/renderdoc.dll' KeyPath='yes' />
            <File Id='RenderDocJSON' Name='renderdoc.json' DiskId='1' Source='dist/Release64/renderdoc.json' />
            <File Id='D3DCompiler47DLL64' Name='d3dcompiler_47.dll' DiskId='1' Source='dist/Release64/d3dcompiler_47.dll' />
            <File Id='RenderDocSHIM' Name='renderdocshim64.dll' DiskId='1' Source='dist/Release64/renderdocshim64.dll' />
            <File Id='dbghelpDLL' Name='dbghelp.dll' DiskId='1' Source='dist/Release64/dbghelp.dll' />
            <File Id='symsrvDLL' Name='symsrv.dll' DiskId='1' Source='dist/Release64/symsrv.dll' />
            <File Id='symsrvYES' Name='symsrv.yes' DiskId='1' Source='dist/Release64/symsrv.yes' />

            <File Id='RenderDocAPIheader' Name='renderdoc_app.h' DiskId='1' Source='dist/Release64/renderdoc_app.h' />

            <RegistryValue Root="HKLM" Id="RDCCLSID" Action="write"
              Key="Software\Classes\CLSID\{5D6BF029-A6BA-417A-8523-120492B1DCE3}"
              Value='RenderDoc Thumbnail Handler'
              Type="expandable" />
            <RegistryValue Root="HKLM" Id="RDCCLSIDServer" Action="write"
              Key="Software\Classes\CLSID\{5D6BF029-A6BA-417A-8523-120492B1DCE3}\InprocServer32"
              Value='[#RenderDocCPP]'
              Type="expandable" />

            <RegistryValue Root="HKLM" Id="RDCVulkanImplicitLayer" Action="write"
              Key="Software\Khronos\Vulkan\ImplicitLayers"
              Name='[#RenderDocJSON]'
              Value='0'
              Type="integer" />
          </Component>

          <Component Id='LICENSE' Win64="yes" Guid='71534ACB-DF6B-4956-A14C-566925D77AB0'>
            <File Id='LICENSE' Name='LICENSE.rtf' DiskId='1' Source='util/installer/LICENSE.rtf' KeyPath='yes' />
          </Component>

          <Component Id='RenderDocCMD' Win64="yes" Guid='3443061F-2B11-4661-8535-4319D97B375C'>
            <File Id='RenderDocCMD' Name='renderdoccmd.exe' DiskId='1' Source='dist/Release64/renderdoccmd.exe' KeyPath='yes' />
          </Component>

          <Component Id='Qt' Win64="yes" Guid='E1BC516F-F611-4C7B-8F3E-A459F026FC4E'>
            <File Id='Qt5Core' Name='Qt5Core.dll' DiskId='1' Source='dist/Release64/Qt5Core.dll' KeyPath='yes' />
            <File Id='Qt5Gui' Name='Qt5Gui.dll' DiskId='1' Source='dist/Release64/Qt5Gui.dll' />
            <File Id='Qt5Network' Name='Qt5Network.dll' DiskId='1' Source='dist/Release64/Qt5Network.dll' />
            <File Id='Qt5Svg' Name='Qt5Svg.dll' DiskId='1' Source='dist/Release64/Qt5Svg.dll' />
            <File Id='Qt5Widgets' Name='Qt5Widgets.dll' DiskId='1' Source='dist/Release64/Qt5Widgets.dll' />
            <File Id='libcrypto' Name='libcrypto-1_1-x64.dll' DiskId='1' Source='dist/Release64/libcrypto-1_1-x64.dll' />
            <File Id='libssl' Name='libssl-1_1-x64.dll' DiskId='1' Source='dist/Release64/libssl-1_1-x64.dll' />
          </Component>

          <Component Id='Python' Win64="yes" Guid='CE2C9D5B-9040-47C7-8E42-B79B52AE93EB'>
            <File Id='Python36' Name='python36.dll' DiskId='1' Source='dist/Release64/python36.dll' KeyPath='yes' />
            <File Id='PythonLibsZIP' Name='python36.zip' DiskId='1' Source='dist/Release64/python36.zip' />
            <File Id='CTypes' Name='_ctypes.pyd' DiskId='1' Source='dist/Release64/_ctypes.pyd' />
            <File Id='Shiboken2' Name='shiboken2.dll' DiskId='1' Source='dist/Release64/shiboken2.dll' />
          </Component>

          <Component Id='Documentation' Win64="yes" Guid='C49ABF1D-1D73-469B-A44A-DD9470E85F19'>
            <File Id='Documentation' Name='renderdoc.chm' DiskId='1' Source='dist/Release64/renderdoc.chm' KeyPath='yes'>
              <Shortcut Id="startmenuDocs" Directory="ProgramMenuDir" Name="RenderDoc Documentation" Icon='chm.ico' Advertise="yes" />
            </File>
          </Component>

          <Directory Id='qtplugins' Name='qtplugins'>
            <Directory Id='qtplugins_imageformats' Name='imageformats'>
              <Component Id='qt_imgplugin' Win64="yes" Guid='4346BD2C-4005-47FF-BEE7-9C30978EF7E5'>
                <File Id='qsvg' Name='qsvg.dll' DiskId='1' Source='dist/Release64/qtplugins/imageformats/qsvg.dll' KeyPath='yes' />
              </Component>
            </Directory>

            <Directory Id='qtplugins_platform' Name='platforms'>
              <Component Id='qt_platplugin' Win64="yes" Guid='9C12C689-DFAE-4958-8CEE-D573867B2E98'>
                <File Id='qwindows' Name='qwindows.dll' DiskId='1' Source='dist/Release64/qtplugins/platforms/qwindows.dll' KeyPath='yes' />
              </Component>
            </Directory>
          </Directory>

          <Directory Id='PySide2' Name='PySide2'>
            <Component Id='PySide2Deps' Win64="yes" Guid='A864541A-DDC3-4149-B03F-A48B7ED16DAB'>
              <File Id='pyside2dll' Name='pyside2.dll' DiskId='1' Source='dist/Release64/PySide2/pyside2.dll' KeyPath='yes' />
              <File Id='PS2QtCore' Name='QtCore.pyd' DiskId='1' Source='dist/Release64/PySide2/QtCore.pyd' />
              <File Id='PS2QtGui' Name='QtGui.pyd' DiskId='1' Source='dist/Release64/PySide2/QtGui.pyd' />
              <File Id='PS2QtWidgets' Name='QtWidgets.pyd' DiskId='1' Source='dist/Release64/PySide2/QtWidgets.pyd' />
              <File Id='PS2utils' Name='_utils.py' DiskId='1' Source='dist/Release64/PySide2/_utils.py' />
              <File Id='PS2init' Name='__init__.py' DiskId='1' Source='dist/Release64/PySide2/__init__.py' />
            </Component>
          </Directory>

          <Directory Id='plugins' Name='plugins'>
            <Directory Id='plugins_amd' Name='amd'>
              <Directory Id='plugins_amd_isa' Name='isa'>
                <Component Id='gcn_plugin' Win64="yes" Guid='02B13D5B-DA43-4AFF-B35B-CF4A241C2CEE'>
                  <File Id='amdspvEXE' Name='amdspv.exe' DiskId='1' Source='dist/Release64/plugins/amd/isa/amdspv.exe' KeyPath='yes' />
                  <File Id='spvgenDLL' Name='spvgen.dll' DiskId='1' Source='dist/Release64/plugins/amd/isa/spvgen.dll' />
                  <File Id='virtualcontextEXE' Name='VirtualContext.exe' DiskId='1' Source='dist/Release64/plugins/amd/isa/VirtualContext.exe' />
                </Component>
              </Directory>
              
              <Directory Id='plugins_amd_rgp' Name='rgp'>
                <Component Id='rgp_plugin' Win64="yes" Guid='6F6ED705-A22F-4CE7-BC12-86332BC5263D'>
                  <File Id='amdrgpDLL' Name='DevDriverAPI-x64.dll' DiskId='1' Source='dist/Release64/plugins/amd/rgp/DevDriverAPI-x64.dll' KeyPath='yes' />
                </Component>
              </Directory>
              
              <Directory Id='plugins_amd_ags' Name='ags'>
                <Component Id='ags_plugin' Win64="yes" Guid='B7BD4CB6-0823-4EA0-8A86-A77CBA2BE6B0'>
                  <File Id='amdagsDLL' Name='amd_ags_x64.dll' DiskId='1' Source='dist/Release64/plugins/amd/ags/amd_ags_x64.dll' KeyPath='yes' />
                </Component>
              </Directory>

              <Directory Id='plugins_amd_counters' Name='counters'>
                <Component Id='gpa_plugin' Win64="yes" Guid='F248EE26-5919-4F9B-8727-6C2CEFA0DC2C'>
                  <File Id='GPUPerfAPICountersx64' Name='GPUPerfAPICounters-x64.dll' DiskId='1' Source='dist/Release64/plugins/amd/counters/GPUPerfAPICounters-x64.dll' KeyPath='yes' />
                  <File Id='GPUPerfAPIDX11x64' Name='GPUPerfAPIDX11-x64.dll' DiskId='1' Source='dist/Release64/plugins/amd/counters/GPUPerfAPIDX11-x64.dll' />
                  <File Id='GPUPerfAPIDX12x64' Name='GPUPerfAPIDX12-x64.dll' DiskId='1' Source='dist/Release64/plugins/amd/counters/GPUPerfAPIDX12-x64.dll' />
                  <File Id='GPUPerfAPIGLx64' Name='GPUPerfAPIGL-x64.dll' DiskId='1' Source='dist/Release64/plugins/amd/counters/GPUPerfAPIGL-x64.dll' />
                  <File Id='GPUPerfAPIVKx64' Name='GPUPerfAPIVK-x64.dll' DiskId='1' Source='dist/Release64/plugins/amd/counters/GPUPerfAPIVK-x64.dll' />
                </Component>
              </Directory>
            </Directory>

            <Directory Id='plugins_android' Name='android'>
              <Component Id='android_plugin' Win64="yes" Guid='328B7D53-1323-4D9B-8966-3D8567E3723B'>
                <File Id='APKarm32' Name='org.renderdoc.renderdoccmd.arm32.apk' DiskId='1' Source='dist/Release64/plugins/android/org.renderdoc.renderdoccmd.arm32.apk' KeyPath='yes' />
                <File Id='APKarm64' Name='org.renderdoc.renderdoccmd.arm64.apk' DiskId='1' Source='dist/Release64/plugins/android/org.renderdoc.renderdoccmd.arm64.apk' />
                <File Id='adb' Name='adb.exe' DiskId='1' Source='dist/Release64/plugins/android/adb.exe' />
                <File Id='AdbWinApi' Name='AdbWinApi.dll' DiskId='1' Source='dist/Release64/plugins/android/AdbWinApi.dll' />
                <File Id='AdbWinUsbApi' Name='AdbWinUsbApi.dll' DiskId='1' Source='dist/Release64/plugins/android/AdbWinUsbApi.dll' />
              </Component>
            </Directory>

            <Directory Id='plugins_d3d12' Name='d3d12'>
              <Component Id='d3d12_plugin' Win64="yes" Guid='383E6D55-F140-44E3-91B5-E98EEAAB28A7'>
                <File Id='dxcompiler' Name='dxcompiler.dll' DiskId='1' Source='dist/Release64/plugins/d3d12/dxcompiler.dll' KeyPath='yes' />
              </Component>
            </Directory>

            <Directory Id='plugins_spirv' Name='spirv'>
              <Component Id='spirv_plugin' Win64="yes" Guid='15566608-0D77-42D2-9B6C-D43698C4C46D'>
                <File Id='spirvcross' Name='spirv-cross.exe' DiskId='1' Source='dist/Release64/plugins/spirv/spirv-cross.exe' KeyPath='yes' />
                <File Id='spirvdis' Name='spirv-dis.exe' DiskId='1' Source='dist/Release64/plugins/spirv/spirv-dis.exe' />
                <File Id='spirvas' Name='spirv-as.exe' DiskId='1' Source='dist/Release64/plugins/spirv/spirv-as.exe' />
                <File Id='glslang' Name='glslangValidator.exe' DiskId='1' Source='dist/Release64/plugins/spirv/glslangValidator.exe' />
              </Component>
            </Directory>
          </Directory>

          <Directory Id='renderdocX86' Name='x86'>
            <Component Id='renderdocX86Bins' Win64="yes" Guid='EB58A048-899A-4239-B229-DA9781C431F8'>
              <File Id='renderdocX86DLL' Name='renderdoc.dll' DiskId='1' Source='dist/Release64/x86/renderdoc.dll' KeyPath='yes' />
              <File Id='renderdocX86JSON' Name='renderdoc.json' DiskId='1' Source='dist/Release64/x86/renderdoc.json' />
              <File Id='renderdocshimX86DLL' Name='renderdocshim32.dll' DiskId='1' Source='dist/Release64/x86/renderdocshim32.dll' />
              <File Id='renderdocX86CMD' Name='renderdoccmd.exe' DiskId='1' Source='dist/Release64/x86/renderdoccmd.exe' />
              <File Id='dbghelp32DLL' Name='dbghelp.dll' DiskId='1' Source='dist/Release64/x86/dbghelp.dll' />
              <File Id='symsrv32DLL' Name='symsrv.dll' DiskId='1' Source='dist/Release64/x86/symsrv.dll' />
              <File Id='symsrv32YES' Name='symsrv.yes' DiskId='1' Source='dist/Release64/x86/symsrv.yes' />

              <File Id='D3DCompiler47DLL32' Name='d3dcompiler_47.dll' DiskId='1' Source='dist/Release64/x86/d3dcompiler_47.dll' />

              <RegistryValue Root="HKLM" Id="RDCCLSID32" Action="write"
                Key="Software\Wow6432Node\Classes\CLSID\{5D6BF029-A6BA-417A-8523-120492B1DCE3}"
                Value='RenderDoc Thumbnail Handler'
                Type="expandable" />
              <RegistryValue Root="HKLM" Id="RDCCLSIDServer32" Action="write"
                Key="Software\Wow6432Node\Classes\CLSID\{5D6BF029-A6BA-417A-8523-120492B1DCE3}\InprocServer32"
                Value='[#renderdocX86DLL]'
                Type="expandable" />

              <RegistryValue Root="HKLM" Id="RDCVulkanImplicitLayer32" Action="write"
                Key="Software\Wow6432Node\Khronos\Vulkan\ImplicitLayers"
                Name='[#renderdocX86JSON]'
                Value='0'
                Type="integer" />

            </Component>

          </Directory>

        </Directory>
      </Directory>

      <Directory Id="ProgramMenuFolder" Name="Programs">
        <Directory Id="ProgramMenuDir" Name="RenderDoc">
          <Component Id="ProgramMenuDir" Guid="D0755B01-F8D5-4DFE-8D21-DA4ED84B555D">
            <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
            <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' />
          </Component>
        </Directory>
      </Directory>
      <Component Id="ImageOpenWith" Guid="BD518767-45FB-412F-86E8-E741AAA48906">
        <RegistryValue Root="HKLM" Id="RDCOpenWithCommand" Action="write" KeyPath='yes'
          Key="Software\Classes\Applications\qrenderdoc.exe\shell\open\command"
          Value='"[#qrenderdocEXE]" "%1"'
          Type="string" />

        <RegistryValue Root="HKLM" Id="RDCOpenWithDDS" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.dds'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithHDR" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.hdr'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithJPG" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.jpg'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithJPEG" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.jpeg'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithPNG" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.png'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithEXR" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.exr'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithTGA" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.tga'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithBMP" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.bmp'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithGIF" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.gif'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithPSD" Action="write"
          Key="Software\Classes\Applications\qrenderdoc.exe\SupportedTypes"
          Name='.psd'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidDDS" Action="write"
          Key="Software\Classes\.dds\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidHDR" Action="write"
          Key="Software\Classes\.hdr\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidJPG" Action="write"
          Key="Software\Classes\.jpg\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidJPEG" Action="write"
          Key="Software\Classes\.jpeg\OpenWithProgids" Name='RenderDoc.RDCCapture.1' Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidPNG" Action="write"
          Key="Software\Classes\.png\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidEXR" Action="write"
          Key="Software\Classes\.exr\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidTGA" Action="write"
          Key="Software\Classes\.tga\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidBMP" Action="write"
          Key="Software\Classes\.bmp\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidGIF" Action="write"
          Key="Software\Classes\.gif\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
        <RegistryValue Root="HKLM" Id="RDCOpenWithProgidPSD" Action="write"
          Key="Software\Classes\.psd\OpenWithProgids" Name='RenderDoc.RDCCapture.1'  Value='' Type="string" />
      </Component>
      <Component Id="ImageThumbnailProvider" Guid="E79B67C0-1128-4471-80C5-6233EF37414C">
        <RegistryValue Root="HKLM" Id="RDCProvider" Action="write" KeyPath='yes'
          Key="Software\Classes\RenderDoc.RDCCapture.1\ShellEx\{e357fccd-a995-4576-b01f-234630154e96}"
          Value='{5D6BF029-A6BA-417A-8523-120492B1DCE3}'
          Type="expandable" />
      </Component>

      <Component Id="FileExtensionRDC" Guid="65374649-9C72-40A1-97EC-F92BAE7C80F4">
        <ProgId Id='RenderDoc.RDCCapture.1' Description='RenderDoc Capture Log (.rdc)'>
          <Extension Id='rdc' />
        </ProgId>
      </Component>

      <Component Id="FileExtensionCAP"  Guid="1029AAEF-2700-428B-9FCA-67CC1F6BDE85">
        <ProgId Id='RenderDoc.RDCSettings.1' Description='RenderDoc Capture Settings (.cap)'>
          <Extension Id='cap' />
        </ProgId>
      </Component>

    </Directory>

    <DirectoryRef Id="TARGETDIR">
      <Merge Id="VCRedist32" DiskId="1" Language="0" SourceFile="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\v142\MergeModules\Microsoft_VC142_CRT_x64.msm"/>
      <Merge Id="VCRedist64" DiskId="1" Language="0" SourceFile="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\v142\MergeModules\Microsoft_VC142_CRT_x86.msm"/>
    </DirectoryRef>

    <!-- check if the runtime is installed -->
    <Property Id="VCRT64INSTALLED" Value="0">
      <RegistrySearch Id="VCRT64Key"
        Root="HKLM"
        Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x64"
        Name="Installed"
        Win64="yes"
        Type="raw" />
    </Property>

    <Property Id="VCRT32INSTALLED" Value="0">
      <RegistrySearch Id="VCRT32Key"
        Root="HKLM"
        Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x86"
        Name="Installed"
        Win64="no"
        Type="raw" />
    </Property>

    <!-- grab the major/minor version numbers, as we need to check if 2019 is installed or only an older version -->
    <Property Id="VCRT64MAJOR" Value="0">
      <RegistrySearch Id="VCRT64MajorKey"
        Root="HKLM"
        Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x64"
        Name="Major"
        Win64="yes"
        Type="raw" />
    </Property>

    <Property Id="VCRT64MINOR" Value="0">
      <RegistrySearch Id="VCRT64MinorKey"
        Root="HKLM"
        Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x64"
        Name="Minor"
        Win64="yes"
        Type="raw" />
    </Property>

    <Property Id="VCRT32MAJOR" Value="0">
      <RegistrySearch Id="VCRT32MajorKey"
        Root="HKLM"
        Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x86"
        Name="Major"
        Win64="no"
        Type="raw" />
    </Property>

    <Property Id="VCRT32MINOR" Value="0">
      <RegistrySearch Id="VCRT32MinorKey"
        Root="HKLM"
        Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x86"
        Name="Minor"
        Win64="no"
        Type="raw" />
    </Property>

    <!-- the versions are stored in DWORDs which windows installer returns as #14 etc. We need to strip the # to actually compare :( -->
    <CustomAction Id="RemoveHash" Script="jscript">
      <![CDATA[
        Session.Property("VCRT64MAJOR") = Session.Property("VCRT64MAJOR").replace("#","")
        Session.Property("VCRT64MINOR") = Session.Property("VCRT64MINOR").replace("#","")
        Session.Property("VCRT32MAJOR") = Session.Property("VCRT32MAJOR").replace("#","")
        Session.Property("VCRT32MINOR") = Session.Property("VCRT32MINOR").replace("#","")
        ]]>
    </CustomAction>

    <InstallExecuteSequence>
      <Custom Action="RemoveHash" Before="LaunchConditions"/>
    </InstallExecuteSequence>
    <InstallUISequence>
      <Custom Action="RemoveHash" Before="LaunchConditions"/>
    </InstallUISequence>

    <Feature Id='Complete' Title='RenderDoc' Description='Everything included.' AllowAdvertise='no' Absent='disallow' Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
      <Feature Id='MainProgram' Title='Program' Description='The main executable with everything needed to capture and replay.' AllowAdvertise='no' Absent='disallow' Level='1'>
        <ComponentRef Id='QRenderDoc' />
        <ComponentRef Id='RenderDocCPP' />
        <ComponentRef Id='RenderDocCMD' />

        <ComponentRef Id='Qt' />
        <ComponentRef Id='Python' />
        <ComponentRef Id='qt_imgplugin' />
        <ComponentRef Id='qt_platplugin' />

        <ComponentRef Id='PySide2Deps' />

        <ComponentRef Id='LICENSE' />

        <ComponentRef Id='gcn_plugin' />
        <ComponentRef Id='rgp_plugin' />
        <ComponentRef Id='ags_plugin' />
        <ComponentRef Id='gpa_plugin' />
        <ComponentRef Id='android_plugin' />
        <ComponentRef Id='spirv_plugin' />
        <ComponentRef Id='d3d12_plugin' />

        <ComponentRef Id='renderdocX86Bins' />

        <ComponentRef Id='ProgramMenuDir' />

        <ComponentRef Id='ImageOpenWith' />

      </Feature>

      <Feature Id='VCRedist32' Title='Visual C++ 2019 Runtime (x86)' AllowAdvertise="no" Display="hidden" Level="1">
        <!-- install the redist either if it's not installed at all, or if it's too old (14.20 is the first VS2019 redist) -->
        <Condition Level='0'>
          <![CDATA[Installed OR (VCRT32INSTALLED <> "0" AND VCRT32MAJOR >= "14" AND VCRT32MINOR >= "20")]]>
        </Condition>

        <MergeRef Id="VCRedist32"/>
      </Feature>

      <Feature Id='VCRedist64' Title='Visual C++ 2019 Runtime (x64)' AllowAdvertise="no" Display="hidden" Level="1">
        <Condition Level='0'>
          <![CDATA[Installed OR (VCRT64INSTALLED <> "0" AND VCRT64MAJOR >= "14" AND VCRT64MINOR >= "20")]]>
        </Condition>

        <MergeRef Id="VCRedist64"/>
      </Feature>

      <Feature Id='Docs' Title='Documentation' Description='CHM file with local help.' Level='1'>
        <ComponentRef Id='Documentation' />
      </Feature>

      <Feature Id='FileExts' Title='File Associations' Description='Associate .rdc (Capture logs) and .cap (Capture settings) files with RenderDoc.' Level='1'>
        <ComponentRef Id='ImageThumbnailProvider' />
        <ComponentRef Id='FileExtensionRDC' />
        <ComponentRef Id='FileExtensionCAP' />
      </Feature>

    </Feature>

    <UIRef Id="WixUI_Mondo" />
    <UIRef Id="WixUI_ErrorProgressText" />

    <WixVariable Id="WixUILicenseRtf" Value="util/installer/LICENSE.rtf" />

    <WixVariable Id="WixUIBannerBmp" Value="util/installer/bannrbmp.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="util/installer/dlgbmp.bmp" />

    <Icon Id="chm.ico"  SourceFile="util/installer/chm.ico" />
    <Icon Id="icon.ico" SourceFile="qrenderdoc/Resources/icon.ico" />
    <Property Id="ARPPRODUCTICON" Value="icon.ico" />
    <Property Id="ARPHELPLINK" Value="http://renderdoc.org/" />

  </Product>
</Wix>
