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  01ee277892e7846f2998f8101d4ea40596dcdc26 (commit)
       via  c2f0f41f6372a6a810f43cab3ebba70261231c70 (commit)
      from  56f7811ded77e0bed029b0232655ed4d4f4971d5 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01ee277892e7846f2998f8101d4ea40596dcdc26
commit 01ee277892e7846f2998f8101d4ea40596dcdc26
Merge: 56f7811 c2f0f41
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Sep 16 10:41:05 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Sep 16 10:41:05 2016 -0400

    Merge topic 'ifw-user-interfaces' into next
    
    c2f0f41f CPackIFW: Add USER_INTERFACES option


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2f0f41f6372a6a810f43cab3ebba70261231c70
commit c2f0f41f6372a6a810f43cab3ebba70261231c70
Author:     Pierluigi Taddei <pierluigi.tad...@gmail.com>
AuthorDate: Thu Sep 15 21:26:52 2016 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Sep 16 10:29:00 2016 -0400

    CPackIFW: Add USER_INTERFACES option
    
    Add to CPackIFW the capability of accepting a list of
    USER_INTERFACES that are copied to the meta folder and
    added to the component description.

diff --git a/Help/release/dev/ifw-user-interfaces.rst 
b/Help/release/dev/ifw-user-interfaces.rst
new file mode 100644
index 0000000..26e241a
--- /dev/null
+++ b/Help/release/dev/ifw-user-interfaces.rst
@@ -0,0 +1,7 @@
+ifw-user-interfaces
+-------------------
+
+* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and
+  :command:`cpack_ifw_configure_component_group` commands gained a new
+  ``USER_INTERFACES`` option to add a list of additonal pages to the IFW
+  installer.
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index ebc5c90..c502099 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -195,7 +195,8 @@
 #                       [SCRIPT <script>]
 #                       [PRIORITY <priority>]
 #                       [DEPENDS <com_id> ...]
-#                       [LICENSES <display_name> <file_path> ...])
+#                       [LICENSES <display_name> <file_path> ...]
+#                       [USER_INTERFACES <file_path> <file_path> ...])
 #
 # This command should be called after :command:`cpack_add_component` command.
 #
@@ -221,6 +222,8 @@
 # ``LICENSES`` pair of <display_name> and <file_path> of license text for this
 # component. You can specify more then one license.
 #
+# ``USER_INTERFACES`` a list of <file_path> representing pages to load
+#
 # --------------------------------------------------------------------------
 #
 # .. command:: cpack_ifw_configure_component_group
@@ -234,7 +237,8 @@
 #                       [VERSION <version>]
 #                       [SCRIPT <script>]
 #                       [PRIORITY <priority>]
-#                       [LICENSES <display_name> <file_path> ...])
+#                       [LICENSES <display_name> <file_path> ...]
+#                       [USER_INTERFACES <file_path> <file_path> ...])
 #
 # This command should be called after :command:`cpack_add_component_group`
 # command.
@@ -254,6 +258,8 @@
 # ``LICENSES`` pair of <display_name> and <file_path> of license text for this
 # component group. You can specify more then one license.
 #
+# ``USER_INTERFACES`` a list of <file_path> representing pages to load
+#
 # --------------------------------------------------------------------------
 #
 # .. command:: cpack_ifw_add_repository
@@ -543,6 +549,22 @@ macro(_cpack_ifw_resolve_lisenses _variable)
   endif()
 endmacro()
 
+# Resolve full path to a list of provided files
+macro(_cpack_ifw_resolve_file_list _variable)
+  if(${_variable})
+    set(_ifw_list_fix)
+    foreach(_ifw_file_arg ${${_variable}})
+      get_filename_component(_ifw_file_arg "${_ifw_file_arg}" ABSOLUTE)
+      if(EXISTS ${_ifw_file_arg})
+        list(APPEND _ifw_list_fix "${_ifw_file_arg}")
+      else()
+        message(WARNING "CPack IFW: page file \"${_ifw_file_arg}\" does not 
exist. Skipping")
+      endif()
+    endforeach(_ifw_file_arg)
+    set(${_variable} "${_ifw_list_fix}")
+  endif()
+endmacro()
+
 # Macro for configure component
 macro(cpack_ifw_configure_component compname)
 
@@ -550,11 +572,12 @@ macro(cpack_ifw_configure_component compname)
 
   set(_IFW_OPT COMMON ESSENTIAL)
   set(_IFW_ARGS NAME VERSION SCRIPT PRIORITY)
-  set(_IFW_MULTI_ARGS DEPENDS LICENSES)
+  set(_IFW_MULTI_ARGS DEPENDS LICENSES USER_INTERFACES)
   cmake_parse_arguments(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME} 
"${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
 
   _cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_SCRIPT)
   
_cpack_ifw_resolve_lisenses(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_LICENSES)
+  
_cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_USER_INTERFACES)
 
   set(_CPACK_IFWCOMP_STR "\n# Configuration for IFW component 
\"${compname}\"\n")
 
@@ -589,11 +612,12 @@ macro(cpack_ifw_configure_component_group grpname)
 
   set(_IFW_OPT)
   set(_IFW_ARGS NAME VERSION SCRIPT PRIORITY)
-  set(_IFW_MULTI_ARGS LICENSES)
+  set(_IFW_MULTI_ARGS LICENSES USER_INTERFACES)
   cmake_parse_arguments(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME} 
"${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
 
   
_cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_SCRIPT)
   
_cpack_ifw_resolve_lisenses(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_LICENSES)
+  
_cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_USER_INTERFACES)
 
   set(_CPACK_IFWGRP_STR "\n# Configuration for IFW component group 
\"${grpname}\"\n")
 
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx 
b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index bc503fc..2d3cf12 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -153,6 +153,7 @@ void cmCPackIFWPackage::DefaultConfiguration()
   ReleaseDate = "";
   Script = "";
   Licenses.clear();
+  UserInterfaces.clear();
   SortingPriority = "";
   Default = "";
   Essential = "";
@@ -229,6 +230,12 @@ int 
cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
     Script = option;
   }
 
+  // User interfaces
+  if (const char* option = this->GetOption(prefix + "USER_INTERFACES")) {
+    UserInterfaces.clear();
+    cmSystemTools::ExpandListArgument(option, UserInterfaces);
+  }
+
   // CMake dependencies
   if (!component->Dependencies.empty()) {
     std::vector<cmCPackComponent*>::iterator dit;
@@ -322,6 +329,12 @@ int 
cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup* group)
     Script = option;
   }
 
+  // User interfaces
+  if (const char* option = this->GetOption(prefix + "USER_INTERFACES")) {
+    UserInterfaces.clear();
+    cmSystemTools::ExpandListArgument(option, UserInterfaces);
+  }
+
   // Licenses
   if (const char* option = this->GetOption(prefix + "LICENSES")) {
     Licenses.clear();
@@ -417,6 +430,23 @@ void cmCPackIFWPackage::GeneratePackageFile()
     xout.Element("Script", name);
   }
 
+  // User Interfaces (copy to meta dir)
+  std::vector<std::string> userInterfaces = UserInterfaces;
+  for (size_t i = 0; i < userInterfaces.size(); i++) {
+    std::string name = cmSystemTools::GetFilenameName(userInterfaces[i]);
+    std::string path = Directory + "/meta/" + name;
+    cmsys::SystemTools::CopyFileIfDifferent(userInterfaces[i].data(),
+                                            path.data());
+    userInterfaces[i] = name;
+  }
+  if (!userInterfaces.empty()) {
+    xout.StartElement("UserInterfaces");
+    for (size_t i = 0; i < userInterfaces.size(); i++) {
+      xout.Element("UserInterface", userInterfaces[i]);
+    }
+    xout.EndElement();
+  }
+
   // Dependencies
   std::set<DependenceStruct> compDepSet;
   for (std::set<DependenceStruct*>::iterator ait = AlienDependencies.begin();
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h 
b/Source/CPack/IFW/cmCPackIFWPackage.h
index 579eeb8..739ae3e 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.h
+++ b/Source/CPack/IFW/cmCPackIFWPackage.h
@@ -99,6 +99,9 @@ public:
   /// List of license agreements to be accepted by the installing user
   std::vector<std::string> Licenses;
 
+  /// List of pages to load
+  std::vector<std::string> UserInterfaces;
+
   /// Priority of the component in the tree
   std::string SortingPriority;
 

-----------------------------------------------------------------------

Summary of changes:
 Help/release/dev/ifw-user-interfaces.rst |    7 +++++++
 Modules/CPackIFW.cmake                   |   32 ++++++++++++++++++++++++++----
 Source/CPack/IFW/cmCPackIFWPackage.cxx   |   30 ++++++++++++++++++++++++++++
 Source/CPack/IFW/cmCPackIFWPackage.h     |    3 +++
 4 files changed, 68 insertions(+), 4 deletions(-)
 create mode 100644 Help/release/dev/ifw-user-interfaces.rst


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to