summaryrefslogtreecommitdiffstats
path: root/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/WiX/cmWIXFilesSourceWriter.cxx')
-rw-r--r--Source/CPack/WiX/cmWIXFilesSourceWriter.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
index ca37699..d4698a7 100644
--- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
@@ -28,16 +28,21 @@ cmWIXFilesSourceWriter::cmWIXFilesSourceWriter(cmCPackLog* logger,
void cmWIXFilesSourceWriter::EmitShortcut(
std::string const& id,
cmWIXShortcut const& shortcut,
- std::string const& shortcutPrefix)
+ std::string const& shortcutPrefix,
+ size_t shortcutIndex)
{
- std::string shortcutId = shortcutPrefix;
+ std::stringstream shortcutId;
+ shortcutId << shortcutPrefix << id;
- shortcutId += id;
+ if(shortcutIndex > 0)
+ {
+ shortcutId << "_" << shortcutIndex;
+ }
std::string fileId = std::string("CM_F") + id;
BeginElement("Shortcut");
- AddAttribute("Id", shortcutId);
+ AddAttribute("Id", shortcutId.str());
AddAttribute("Name", shortcut.label);
std::string target = "[#" + fileId + "]";
AddAttribute("Target", target);