summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2015-02-21 17:07:36 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2015-02-21 17:07:36 (GMT)
commite6731f486e466ddd58550851fb935dbda7939cac (patch)
tree1d91fa4fe37496d82738b0837e5d2c3f4da283cc /Source/CPack
parent279605f560312aab4dfeef4cce1c8c67d4083b4e (diff)
downloadCMake-e6731f486e466ddd58550851fb935dbda7939cac.zip
CMake-e6731f486e466ddd58550851fb935dbda7939cac.tar.gz
CMake-e6731f486e466ddd58550851fb935dbda7939cac.tar.bz2
CPackWIX: Add new CPACK_STARTUP_SHORTCUTS property.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx20
-rw-r--r--Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx8
-rw-r--r--Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h2
-rw-r--r--Source/CPack/WiX/cmWIXShortcut.cxx7
-rw-r--r--Source/CPack/WiX/cmWIXShortcut.h3
5 files changed, 39 insertions, 1 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index c6daeda..4b8daf8 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -557,6 +557,12 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
directoryDefinitions.EmitDesktopFolder();
}
+ if(emittedShortcutTypes.find(cmWIXShortcuts::STARTUP) !=
+ emittedShortcutTypes.end())
+ {
+ directoryDefinitions.EmitStartupFolder();
+ }
+
directoryDefinitions.EndElement("Directory");
directoryDefinitions.EndElement("Fragment");
@@ -714,6 +720,17 @@ bool cmCPackWIXGenerator::CreateShortcuts(
}
}
+ if(!shortcuts.empty(cmWIXShortcuts::STARTUP))
+ {
+ if(!this->CreateShortcutsOfSpecificType(cmWIXShortcuts::STARTUP,
+ cpackComponentName, featureId, "STARTUP",
+ shortcuts, false,
+ fileDefinitions, featureDefinitions))
+ {
+ return false;
+ }
+ }
+
return true;
}
@@ -736,6 +753,9 @@ bool cmCPackWIXGenerator::CreateShortcutsOfSpecificType(
case cmWIXShortcuts::DESKTOP:
directoryId = "DesktopFolder";
break;
+ case cmWIXShortcuts::STARTUP:
+ directoryId = "StartupFolder";
+ break;
default:
return false;
}
diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx
index a93f89b..7bd4315 100644
--- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx
@@ -41,6 +41,14 @@ void cmWIXDirectoriesSourceWriter::EmitDesktopFolder()
EndElement("Directory");
}
+void cmWIXDirectoriesSourceWriter::EmitStartupFolder()
+{
+ BeginElement("Directory");
+ AddAttribute("Id", "StartupFolder");
+ AddAttribute("Name", "Startup");
+ EndElement("Directory");
+}
+
size_t cmWIXDirectoriesSourceWriter::BeginInstallationPrefixDirectory(
std::string const& programFilesFolderId,
std::string const& installRootString)
diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h
index f51fdb4..f8c8166 100644
--- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h
@@ -32,6 +32,8 @@ public:
void EmitDesktopFolder();
+ void EmitStartupFolder();
+
size_t BeginInstallationPrefixDirectory(
std::string const& programFilesFolderId,
std::string const& installRootString);
diff --git a/Source/CPack/WiX/cmWIXShortcut.cxx b/Source/CPack/WiX/cmWIXShortcut.cxx
index aef2b08..d721872 100644
--- a/Source/CPack/WiX/cmWIXShortcut.cxx
+++ b/Source/CPack/WiX/cmWIXShortcut.cxx
@@ -52,6 +52,10 @@ bool cmWIXShortcuts::EmitShortcuts(
shortcutPrefix = "CM_DS";
registrySuffix = "_desktop";
break;
+ case STARTUP:
+ shortcutPrefix = "CM_SS";
+ registrySuffix = "_startup";
+ break;
default:
return false;
}
@@ -96,6 +100,9 @@ void cmWIXShortcuts::CreateFromProperties(
CreateFromProperty("CPACK_DESKTOP_SHORTCUTS",
DESKTOP, id, directoryId, installedFile);
+
+ CreateFromProperty("CPACK_STARTUP_SHORTCUTS",
+ STARTUP, id, directoryId, installedFile);
}
void cmWIXShortcuts::CreateFromProperty(
diff --git a/Source/CPack/WiX/cmWIXShortcut.h b/Source/CPack/WiX/cmWIXShortcut.h
index 5e18bdd..5945e43 100644
--- a/Source/CPack/WiX/cmWIXShortcut.h
+++ b/Source/CPack/WiX/cmWIXShortcut.h
@@ -34,7 +34,8 @@ public:
enum Type
{
START_MENU,
- DESKTOP
+ DESKTOP,
+ STARTUP
};
typedef std::vector<cmWIXShortcut> shortcut_list_t;