Using WiX Toolset 3.10, and trying to create shortcuts to certain files that have been harvested with the heat.exe utility, as by:
"%WIX%\bin\heat.exe" dir SourceDir -nologo -platform x64 ^
-ke -gg -g1 -suid -srd -scom -sreg -dr INSTALLDIR ^
-cg ProjFiles -out ProjFiles.wxs
My issues:
I know by now that I'm supposed to use an XSLT file to transform ProjFiles.wxs (the
-t
option in heat.exe) but WiX-specific documentation on how to write it is non-existent: can someone please provide an example that adds aShortcut
on the Desktop for anId
of "Prog.exe"?Because of the
-g1
flag, files which share the same basename (e.g. "SourceDir\dirA\file.txt" and "SourceDir\dirZ\file.txt") will share the sameId
(i.e. "file.txt"); how come this isn't a conflict, seen how the .MSI builds and runs OK?
The WiX-specific information is documented but learning just enough XSL is a bit of a challenge. This should get you started. You might have to adapt to your names, heat arguments, etc.
More specific and earlier templates match before more general or later ones. So, the base is to copy every element, attribute, text and comment AS IS, except the ones you want to change. For the ones you want to change, you reconstruct everything—in this case by copying everything the Component element had and then adding the Shortcut and RemoveFolder elements.