c++wixfirebreath

FireBreath and ICE38


I have started to get ICE38 (Component installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file.) error when building my firebreath plugin. This the file that causes it:

<w:Fragment>
    <w:DirectoryRef Id="INSTALLDIR" />
</w:Fragment>
<w:Fragment>
    <w:ComponentGroup Id="PluginDLLGroup">
        <w:Component Id="cmp53DB29233E32657DBB1B18A8A6AC46CF" Guid="{28E01B1F-714F-1111-B021-111111837CAA}" Directory="INSTALLDIR">
            <w:File Id="fil5103252FF582E67B8ED35C6633BD4B7B" Source="$(var.BINSRC)\npiPlugin.dll" />
        </w:Component>
    </w:ComponentGroup>
</w:Fragment>

the problem is that this file looks different when I build the previous code version. It has numerous TypeLib, App, Class, Interface and RegistryValue entries.
I have compared build environments generated by FireBreath for working and not working commits and they look identical (besides generated GUID for VS stuff). But after I build the solutions they produce different npiPlugin_auto.wixobj and npiPlugin_auto.wxs files. There were no changes made to cmake or wix files in the broken commit, so it seems the only thing that could cause this is the source code.
So, is it possible that such behavior was cause by source code changes and how can I track these changes?


Solution

  • This file indicates that heat was unable to harvest any of the registration data from the plugin. Usually that happens because a DLL is needed to load the plugin and is unavailable when the installer is built.

    You can copy the needed DLL to the output directory in a POST_BUILD command in order to fix this.

    add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy "${DLLFILE_PATH}" "${FB_BIN_DIR}/${PLUGIN_NAME}/${CMAKE_CFG_INTDIR}/"
    )
    

    This is an untested example; DLLFILE_PATH would need to be set to the path of your DLL file that is needed. This will ensure that it is copied into location before the installer is built.