[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5803-g986d82b
Nils Gladitz
nilsgladitz at gmail.com
Mon Nov 25 17:49:41 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 986d82b31d94c96701ce3860ade6316b29655f77 (commit)
via 03bf3cba833d6289d81ea202c8d64956d0b4229c (commit)
from a0177ea15e1e39f69a15ab81b3a9555847b0e98f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=986d82b31d94c96701ce3860ade6316b29655f77
commit 986d82b31d94c96701ce3860ade6316b29655f77
Merge: a0177ea 03bf3cb
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Mon Nov 25 17:49:37 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 25 17:49:37 2013 -0500
Merge topic 'wix-components' into next
03bf3cb Revert topic 'wix-components'
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=03bf3cba833d6289d81ea202c8d64956d0b4229c
commit 03bf3cba833d6289d81ea202c8d64956d0b4229c
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Mon Nov 25 23:48:23 2013 +0100
Commit: Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Mon Nov 25 23:48:23 2013 +0100
Revert topic 'wix-components'
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
index 237c5bc..3f0978d 100644
--- a/Modules/CPackWIX.cmake
+++ b/Modules/CPackWIX.cmake
@@ -63,14 +63,6 @@
#
# If set, this icon is used in place of the default icon.
#
-# .. variable:: CPACK_WIX_UI_REF
-#
-# This variable allows you to override the Id of the ``<UIRef>`` element
-# in the WiX template.
-#
-# The default is ``WixUI_InstallDir`` in case no CPack components have
-# been defined and ``WixUI_FeatureTree`` otherwise.
-#
# .. variable:: CPACK_WIX_UI_BANNER
#
# The bitmap will appear at the top of all installer pages other than the
diff --git a/Modules/WIX.template.in b/Modules/WIX.template.in
index 59a75c7..0bc7e10 100644
--- a/Modules/WIX.template.in
+++ b/Modules/WIX.template.in
@@ -39,6 +39,6 @@
<FeatureRef Id="ProductFeature"/>
- <UIRef Id="$(var.CPACK_WIX_UI_REF)" />
+ <UIRef Id="WixUI_InstallDir" />
</Product>
</Wix>
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 8bfe4bf..1d7681b 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -198,18 +198,6 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration()
<< std::endl);
}
- if(GetOption("CPACK_WIX_UI_REF") == 0)
- {
- std::string defaultRef = "WixUI_InstallDir";
-
- if(Components.size())
- {
- defaultRef = "WixUI_FeatureTree";
- }
-
- SetOption("CPACK_WIX_UI_REF", defaultRef.c_str());
- }
-
CollectExtensions("CPACK_WIX_EXTENSIONS", candleExtensions);
CollectExtensions("CPACK_WIX_CANDLE_EXTENSIONS", candleExtensions);
@@ -308,7 +296,6 @@ bool cmCPackWIXGenerator::CreateWiXVariablesIncludeFile()
SetOptionIfNotSet("CPACK_WIX_PROGRAM_MENU_FOLDER",
GetOption("CPACK_PACKAGE_NAME"));
CopyDefinition(includeFile, "CPACK_WIX_PROGRAM_MENU_FOLDER");
- CopyDefinition(includeFile, "CPACK_WIX_UI_REF");
return true;
}
@@ -414,43 +401,40 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
featureDefinitions.BeginElement("Feature");
featureDefinitions.AddAttribute("Id", "ProductFeature");
- featureDefinitions.AddAttribute("Display", "expand");
- featureDefinitions.AddAttribute("ConfigurableDirectory", "INSTALL_ROOT");
-
- std::string cpackPackageName;
- if(!RequireOption("CPACK_PACKAGE_NAME", cpackPackageName))
- {
- return false;
- }
- featureDefinitions.AddAttribute("Title", cpackPackageName);
-
+ featureDefinitions.AddAttribute("Title", Name);
featureDefinitions.AddAttribute("Level", "1");
-
- CreateFeatureHierarchy(featureDefinitions);
-
featureDefinitions.EndElement("Feature");
- if(Components.empty())
- {
- AddComponentsToFeature(toplevel, "ProductFeature",
- directoryDefinitions, fileDefinitions, featureDefinitions);
- }
- else
+ featureDefinitions.BeginElement("FeatureRef");
+ featureDefinitions.AddAttribute("Id", "ProductFeature");
+
+ std::vector<std::string> cpackPackageExecutablesList;
+ const char *cpackPackageExecutables = GetOption("CPACK_PACKAGE_EXECUTABLES");
+ if(cpackPackageExecutables)
{
- for(std::map<std::string, cmCPackComponent>::const_iterator
- i = Components.begin(); i != Components.end(); ++i)
+ cmSystemTools::ExpandListArgument(cpackPackageExecutables,
+ cpackPackageExecutablesList);
+ if(cpackPackageExecutablesList.size() % 2 != 0 )
{
- cmCPackComponent const& component = i->second;
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_PACKAGE_EXECUTABLES should contain pairs of <executable> and "
+ "<text label>." << std::endl);
+ return false;
+ }
+ }
- std::string componentPath = toplevel;
- componentPath += "/";
- componentPath += component.Name;
+ AddDirectoryAndFileDefinitons(
+ toplevel, "INSTALL_ROOT",
+ directoryDefinitions, fileDefinitions, featureDefinitions,
+ cpackPackageExecutablesList);
- AddComponentsToFeature(componentPath, "CM_C_" + component.Name,
- directoryDefinitions, fileDefinitions, featureDefinitions);
- }
+ if(!CreateStartMenuShortcuts(
+ directoryDefinitions, fileDefinitions, featureDefinitions))
+ {
+ return false;
}
+ featureDefinitions.EndElement("FeatureRef");
featureDefinitions.EndElement("Fragment");
fileDefinitions.EndElement("Fragment");
@@ -491,149 +475,6 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
return true;
}
-bool cmCPackWIXGenerator::CreateFeatureHierarchy(
- cmWIXSourceWriter& featureDefinitions)
-{
- for(std::map<std::string, cmCPackComponentGroup>::const_iterator
- i = ComponentGroups.begin(); i != ComponentGroups.end(); ++i)
- {
- cmCPackComponentGroup const& group = i->second;
- if(group.ParentGroup == 0)
- {
- if(!EmitFeatureForComponentGroup(featureDefinitions, group))
- {
- return false;
- }
- }
- }
-
- for(std::map<std::string, cmCPackComponent>::const_iterator
- i = Components.begin(); i != Components.end(); ++i)
- {
- cmCPackComponent const& component = i->second;
-
- if(!component.Group)
- {
- if(!EmitFeatureForComponent(featureDefinitions, component))
- {
- return false;
- }
- }
- }
-
- return true;
-}
-
-bool cmCPackWIXGenerator::EmitFeatureForComponentGroup(
- cmWIXSourceWriter& featureDefinitions,
- cmCPackComponentGroup const& group)
-{
- featureDefinitions.BeginElement("Feature");
- featureDefinitions.AddAttribute("Id", "CM_G_" + group.Name);
-
- if(group.IsExpandedByDefault)
- {
- featureDefinitions.AddAttribute("Display", "expand");
- }
-
- featureDefinitions.AddAttributeUnlessEmpty(
- "Title", group.DisplayName);
-
- featureDefinitions.AddAttributeUnlessEmpty(
- "Description", group.Description);
-
- for(std::vector<cmCPackComponentGroup*>::const_iterator
- i = group.Subgroups.begin(); i != group.Subgroups.end(); ++i)
- {
- if(!EmitFeatureForComponentGroup(featureDefinitions, **i))
- {
- return false;
- }
- }
-
- for(std::vector<cmCPackComponent*>::const_iterator
- i = group.Components.begin(); i != group.Components.end(); ++i)
- {
- if(!EmitFeatureForComponent(featureDefinitions, **i))
- {
- return false;
- }
- }
-
- featureDefinitions.EndElement("Feature");
-
- return true;
-}
-
-bool cmCPackWIXGenerator::EmitFeatureForComponent(
- cmWIXSourceWriter& featureDefinitions,
- cmCPackComponent const& component)
-{
- featureDefinitions.BeginElement("Feature");
- featureDefinitions.AddAttribute("Id", "CM_C_" + component.Name);
-
- featureDefinitions.AddAttributeUnlessEmpty(
- "Title", component.DisplayName);
-
- featureDefinitions.AddAttributeUnlessEmpty(
- "Description", component.Description);
-
- if(component.IsRequired)
- {
- featureDefinitions.AddAttribute("Absent", "disallow");
- }
-
- if(component.IsHidden)
- {
- featureDefinitions.AddAttribute("Display", "hidden");
- }
-
- featureDefinitions.EndElement("Feature");
-
- return true;
-}
-
-bool cmCPackWIXGenerator::AddComponentsToFeature(
- std::string const& rootPath,
- std::string const& featureId,
- cmWIXSourceWriter& directoryDefinitions,
- cmWIXSourceWriter& fileDefinitions,
- cmWIXSourceWriter& featureDefinitions)
-{
- featureDefinitions.BeginElement("FeatureRef");
- featureDefinitions.AddAttribute("Id", featureId);
-
- std::vector<std::string> cpackPackageExecutablesList;
- const char *cpackPackageExecutables = GetOption("CPACK_PACKAGE_EXECUTABLES");
- if(cpackPackageExecutables)
- {
- cmSystemTools::ExpandListArgument(cpackPackageExecutables,
- cpackPackageExecutablesList);
- if(cpackPackageExecutablesList.size() % 2 != 0 )
- {
- cmCPackLogger(cmCPackLog::LOG_ERROR,
- "CPACK_PACKAGE_EXECUTABLES should contain pairs of <executable> and "
- "<text label>." << std::endl);
- return false;
- }
- }
-
- AddDirectoryAndFileDefinitons(
- rootPath, "INSTALL_ROOT",
- directoryDefinitions, fileDefinitions, featureDefinitions,
- cpackPackageExecutablesList);
-
- if(!CreateStartMenuShortcuts(
- directoryDefinitions, fileDefinitions, featureDefinitions))
- {
- return false;
- }
-
- featureDefinitions.EndElement("FeatureRef");
-
- return true;
-}
-
bool cmCPackWIXGenerator::CreateStartMenuShortcuts(
cmWIXSourceWriter& directoryDefinitions,
cmWIXSourceWriter& fileDefinitions,
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h
index f298896..481a07d 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.h
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.h
@@ -56,7 +56,7 @@ protected:
virtual bool SupportsComponentInstallation() const
{
- return true;
+ return false;
}
private:
@@ -79,24 +79,6 @@ private:
bool CreateWiXSourceFiles();
- bool CreateFeatureHierarchy(
- cmWIXSourceWriter& featureDefinitions);
-
- bool EmitFeatureForComponentGroup(
- cmWIXSourceWriter& featureDefinitions,
- cmCPackComponentGroup const& group);
-
- bool EmitFeatureForComponent(
- cmWIXSourceWriter& featureDefinitions,
- cmCPackComponent const& component);
-
- bool AddComponentsToFeature(
- std::string const& rootPath,
- std::string const& featureId,
- cmWIXSourceWriter& directoryDefinitions,
- cmWIXSourceWriter& fileDefinitions,
- cmWIXSourceWriter& featureDefinitions);
-
bool CreateStartMenuShortcuts(
cmWIXSourceWriter& directoryDefinitions,
cmWIXSourceWriter& fileDefinitions,
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx
index c8a3922..214b8ac 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx
@@ -123,15 +123,6 @@ void cmWIXSourceWriter::AddAttribute(
file << " " << key << "=\"" << EscapeAttributeValue(utf8) << '"';
}
-void cmWIXSourceWriter::AddAttributeUnlessEmpty(
- const std::string& key, const std::string& value)
-{
- if(value.size())
- {
- AddAttribute(key, value);
- }
-}
-
std::string cmWIXSourceWriter::WindowsCodepageToUtf8(const std::string& value)
{
if(value.empty())
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h
index 670d4c0..0c7803c 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXSourceWriter.h
@@ -40,9 +40,6 @@ public:
void AddAttribute(
const std::string& key, const std::string& value);
- void AddAttributeUnlessEmpty(
- const std::string& key, const std::string& value);
-
static std::string WindowsCodepageToUtf8(const std::string& value);
private:
-----------------------------------------------------------------------
Summary of changes:
Modules/CPackWIX.cmake | 8 -
Modules/WIX.template.in | 2 +-
Source/CPack/WiX/cmCPackWIXGenerator.cxx | 209 ++++--------------------------
Source/CPack/WiX/cmCPackWIXGenerator.h | 20 +---
Source/CPack/WiX/cmWIXSourceWriter.cxx | 9 --
Source/CPack/WiX/cmWIXSourceWriter.h | 3 -
6 files changed, 27 insertions(+), 224 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list