summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPackDMG.cmake2
-rw-r--r--Modules/CPackIFW.cmake53
-rw-r--r--Packaging/CMakeDMGSetup.scpt19
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx11
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.h3
-rw-r--r--Source/cmSystemTools.cxx48
-rwxr-xr-xUtilities/Scripts/clang-format.bash47
8 files changed, 130 insertions, 55 deletions
diff --git a/Modules/CPackDMG.cmake b/Modules/CPackDMG.cmake
index e34f8cd..1959f22 100644
--- a/Modules/CPackDMG.cmake
+++ b/Modules/CPackDMG.cmake
@@ -19,7 +19,7 @@
#
# The disk image format. Common values are UDRO (UDIF read-only), UDZO (UDIF
# zlib-compressed) or UDBZ (UDIF bzip2-compressed). Refer to hdiutil(1) for
-# more information on other available formats.
+# more information on other available formats. Defaults to UDZO.
#
# .. variable:: CPACK_DMG_DS_STORE
#
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index 4cfc9d2..083fc28 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -4,8 +4,8 @@
#
# .. _QtIFW: http://doc.qt.io/qtinstallerframework/index.html
#
-# This module looks for the location of the command line utilities supplied with
-# the Qt Installer Framework (QtIFW_).
+# This module looks for the location of the command line utilities supplied
+# with the Qt Installer Framework (QtIFW_).
#
# The module also defines several commands to control the behavior of the
# CPack ``IFW`` generator.
@@ -31,7 +31,8 @@
# Variables
# ^^^^^^^^^
#
-# You can use the following variables to change behavior of CPack ``IFW`` generator.
+# You can use the following variables to change behavior of CPack ``IFW``
+# generator.
#
# Debug
# """"""
@@ -65,7 +66,8 @@
#
# .. variable:: CPACK_IFW_PACKAGE_WINDOW_ICON
#
-# Filename for a custom window icon in PNG format for the Installer application.
+# Filename for a custom window icon in PNG format for the Installer
+# application.
#
# .. variable:: CPACK_IFW_PACKAGE_LOGO
#
@@ -80,7 +82,8 @@
# .. variable:: CPACK_IFW_TARGET_DIRECTORY
#
# Default target directory for installation.
-# By default used "@ApplicationsDir@/:variable:`CPACK_PACKAGE_INSTALL_DIRECTORY`"
+# By default used
+# "@ApplicationsDir@/:variable:`CPACK_PACKAGE_INSTALL_DIRECTORY`"
#
# You can use predefined variables.
#
@@ -186,7 +189,7 @@
#
# ::
#
-# cpack_ifw_configure_component(<compname> [COMMON]
+# cpack_ifw_configure_component(<compname> [COMMON] [ESSENTIAL]
# [NAME <name>]
# [VERSION <version>]
# [SCRIPT <script>]
@@ -194,20 +197,23 @@
# [DEPENDS <com_id> ...]
# [LICENSES <display_name> <file_path> ...])
#
-# This command should be called after cpack_add_component command.
+# This command should be called after :command:`cpack_add_component` command.
#
# ``COMMON`` if set, then the component will be packaged and installed as part
# of a group to which it belongs.
#
+# ``ESSENTIAL`` if set, then the package manager stays disabled until that
+# component is updated.
+#
+# ``NAME`` is used to create domain-like identification for this component.
+# By default used origin component name.
+#
# ``VERSION`` is version of component.
# By default used :variable:`CPACK_PACKAGE_VERSION`.
#
# ``SCRIPT`` is a relative or absolute path to operations script
# for this component.
#
-# ``NAME`` is used to create domain-like identification for this component.
-# By default used origin component name.
-#
# ``PRIORITY`` is priority of the component in the tree.
#
# ``DEPENDS`` list of dependency component identifiers in QtIFW_ style.
@@ -223,21 +229,23 @@
#
# ::
#
-# cpack_ifw_configure_component_group(<grpname>
-# [VERSION <version>]
+# cpack_ifw_configure_component_group(<groupname>
# [NAME <name>]
+# [VERSION <version>]
# [SCRIPT <script>]
# [PRIORITY <priority>]
# [LICENSES <display_name> <file_path> ...])
#
-# This command should be called after cpack_add_component_group command.
+# This command should be called after :command:`cpack_add_component_group`
+# command.
+#
+# ``NAME`` is used to create domain-like identification for this component
+# group.
+# By default used origin component group name.
#
# ``VERSION`` is version of component group.
# By default used :variable:`CPACK_PACKAGE_VERSION`.
#
-# ``NAME`` is used to create domain-like identification for this component group.
-# By default used origin component group name.
-#
# ``SCRIPT`` is a relative or absolute path to operations script
# for this component group.
#
@@ -260,8 +268,8 @@
# [PASSWORD <password>]
# [DISPLAY_NAME <display_name>])
#
-# This macro will also add the <reponame> repository
-# to a variable :variable:`CPACK_IFW_REPOSITORIES_ALL`
+# This command will also add the <reponame> repository
+# to a variable :variable:`CPACK_IFW_REPOSITORIES_ALL`.
#
# ``DISABLED`` if set, then the repository will be disabled by default.
#
@@ -289,9 +297,8 @@
# [PASSWORD <password>]
# [DISPLAY_NAME <display_name>])
#
-# Specified will
-# This macro will also add the repository action
-# to a variable :variable:`CPACK_IFW_REPOSITORIES_ALL`
+# This command will also add the <reponame> repository
+# to a variable :variable:`CPACK_IFW_REPOSITORIES_ALL`.
#
# ``URL`` is points to a list of available components.
#
@@ -541,8 +548,8 @@ macro(cpack_ifw_configure_component compname)
string(TOUPPER ${compname} _CPACK_IFWCOMP_UNAME)
- set(_IFW_OPT COMMON)
- set(_IFW_ARGS VERSION SCRIPT NAME PRIORITY)
+ set(_IFW_OPT COMMON ESSENTIAL)
+ set(_IFW_ARGS NAME VERSION SCRIPT PRIORITY)
set(_IFW_MULTI_ARGS DEPENDS LICENSES)
cmake_parse_arguments(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
diff --git a/Packaging/CMakeDMGSetup.scpt b/Packaging/CMakeDMGSetup.scpt
index c7ddcfb..37e7bd1 100644
--- a/Packaging/CMakeDMGSetup.scpt
+++ b/Packaging/CMakeDMGSetup.scpt
@@ -4,6 +4,21 @@ on run argv
tell application "Finder"
tell disk image_name
+ -- wait for the image to finish mounting
+ set open_attempts to 0
+ repeat while open_attempts < 4
+ try
+ open
+ delay 1
+ set open_attempts to 5
+ close
+ on error errStr number errorNumber
+ set open_attempts to open_attempts + 1
+ delay 10
+ end try
+ end repeat
+ delay 5
+
-- open the image the first time and save a DS_Store with just
-- background and icon setup
open
@@ -12,7 +27,7 @@ on run argv
set background picture of theViewOptions to file ".background:background.tif"
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 128
- delay 1
+ delay 5
close
-- next setup the position of the app and Applications symlink
@@ -28,7 +43,7 @@ on run argv
set position of item "Applications" to { 378, 200 }
end tell
update without registering applications
- delay 1
+ delay 5
close
-- one last open and close so you can see everything looks correct
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 7e180d3..cd74594 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 5)
-set(CMake_VERSION_PATCH 20160521)
+set(CMake_VERSION_PATCH 20160524)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index 5bc1a0b..df612e5 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -146,6 +146,7 @@ void cmCPackIFWPackage::DefaultConfiguration()
Licenses.clear();
SortingPriority = "";
Default = "";
+ Essential = "";
Virtual = "";
ForcedInstallation = "";
}
@@ -267,6 +268,11 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
// Default
Default = component->IsDisabledByDefault ? "false" : "true";
+ // Essential
+ if (this->IsOn(prefix + "ESSENTIAL")) {
+ Essential = "true";
+ }
+
// Virtual
Virtual = component->IsHidden ? "true" : "";
@@ -452,6 +458,11 @@ void cmCPackIFWPackage::GeneratePackageFile()
xout.Element("Default", Default);
}
+ // Essential
+ if (!Essential.empty()) {
+ xout.Element("Essential", Essential);
+ }
+
// Priority
if (!SortingPriority.empty()) {
xout.Element("SortingPriority", SortingPriority);
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h
index 8a566cb..55b07ec 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.h
+++ b/Source/CPack/IFW/cmCPackIFWPackage.h
@@ -101,6 +101,9 @@ public:
/// Set to true to preselect the component in the installer
std::string Default;
+ /// Marks the package as essential to force a restart of the MaintenanceTool
+ std::string Essential;
+
/// Set to true to hide the component from the installer
std::string Virtual;
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index bb52441..ed83069 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2135,37 +2135,33 @@ bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath,
std::string::size_type cmSystemToolsFindRPath(std::string const& have,
std::string const& want)
{
- // Search for the desired rpath.
- std::string::size_type pos = have.find(want);
-
- // If the path is not present we are done.
- if (pos == std::string::npos) {
- return pos;
- }
+ std::string::size_type pos = 0;
+ while (pos < have.size()) {
+ // Look for an occurrence of the string.
+ std::string::size_type const beg = have.find(want, pos);
+ if (beg == std::string::npos) {
+ return std::string::npos;
+ }
- // Build a regex to match a properly separated path instance.
- std::string regex_str = "(^|:)(";
- for (std::string::const_iterator i = want.begin(); i != want.end(); ++i) {
- int ch = *i;
- if (!(('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') ||
- ('0' <= ch && ch <= '9'))) {
- // Escape the non-alphanumeric character.
- regex_str += "\\";
+ // Make sure it is separated from preceding entries.
+ if (beg > 0 && have[beg - 1] != ':') {
+ pos = beg + 1;
+ continue;
}
- // Store the character.
- regex_str.append(1, static_cast<char>(ch));
- }
- regex_str += ")(:|$)";
- // Look for the separated path.
- cmsys::RegularExpression regex(regex_str.c_str());
- if (regex.find(have)) {
+ // Make sure it is separated from following entries.
+ std::string::size_type const end = beg + want.size();
+ if (end < have.size() && have[end] != ':') {
+ pos = beg + 1;
+ continue;
+ }
+
// Return the position of the path portion.
- return regex.start(2);
- } else {
- // The desired rpath was not found.
- return std::string::npos;
+ return beg;
}
+
+ // The desired rpath was not found.
+ return std::string::npos;
}
#endif
diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash
index 2090a1a..760a8d4 100755
--- a/Utilities/Scripts/clang-format.bash
+++ b/Utilities/Scripts/clang-format.bash
@@ -17,7 +17,34 @@
usage='usage: clang-format.bash [<options>] [--]
- --clang-format <tool> Use given clang-format tool.
+ --help Print usage plus more detailed help.
+
+ --clang-format <tool> Use given clang-format tool.
+
+ --amend Filter files changed by HEAD.
+ --cached Filter files locally staged for commit.
+ --modified Filter files locally modified from HEAD.
+ --tracked Filter files tracked by Git.
+'
+
+help="$usage"'
+Example to format locally modified files:
+
+ Utilities/Scripts/clang-format.bash --modified
+
+Example to format locally modified files staged for commit:
+
+ Utilities/Scripts/clang-format.bash --cached
+
+Example to format the current topic:
+
+ git filter-branch \
+ --tree-filter "Utilities/Scripts/clang-format.bash --amend" \
+ master..
+
+Example to format all files:
+
+ Utilities/Scripts/clang-format.bash --tracked
'
die() {
@@ -28,9 +55,15 @@ die() {
# Parse command-line arguments.
clang_format=''
+mode=''
while test "$#" != 0; do
case "$1" in
+ --amend) mode="amend" ;;
+ --cached) mode="cached" ;;
--clang-format) shift; clang_format="$1" ;;
+ --help) echo "$help"; exit 0 ;;
+ --modified) mode="modified" ;;
+ --tracked) mode="tracked" ;;
--) shift ; break ;;
-*) die "$usage" ;;
*) break ;;
@@ -59,8 +92,18 @@ if ! type -p "$clang_format" >/dev/null; then
exit 1
fi
+# Select listing mode.
+case "$mode" in
+ '') echo "$usage"; exit 0 ;;
+ amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ;;
+ cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ;;
+ modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ;;
+ tracked) git_ls='git ls-files' ;;
+ *) die "invalid mode: $mode" ;;
+esac
+
# Filter sources to which our style should apply.
-git ls-files -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
+$git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
# Exclude lexer/parser generator input and output.
egrep -z -v '^Source/cmCommandArgumentLexer\.' |