[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-240-g0f8ea1f
Brad King
brad.king at kitware.com
Fri Feb 17 11:47:42 EST 2017
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 0f8ea1fdfa8e8ad51633d17dd0ffc158f619a8fb (commit)
via 734581f49fc0eac4c49e941c0cc450a04c866896 (commit)
from 8cf6ac2226d23ac78cea34ddfae28e1626d289e1 (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=0f8ea1fdfa8e8ad51633d17dd0ffc158f619a8fb
commit 0f8ea1fdfa8e8ad51633d17dd0ffc158f619a8fb
Merge: 8cf6ac2 734581f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 17 11:47:41 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 17 11:47:41 2017 -0500
Merge topic 'productbuild_resources' into next
734581f4 CPack: Add support for CPACK_PRODUCTBULID_RESOURCES_DIR
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=734581f49fc0eac4c49e941c0cc450a04c866896
commit 734581f49fc0eac4c49e941c0cc450a04c866896
Author: Tim Hutt <tim.hutt at ultrahaptics.com>
AuthorDate: Tue Feb 14 10:09:23 2017 +0000
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 17 11:47:00 2017 -0500
CPack: Add support for CPACK_PRODUCTBULID_RESOURCES_DIR
This allows you to copy custom files (e.g. a background image) into the
macOS installer.
Fixes: #16604
diff --git a/Help/release/dev/productbuild_resources.rst b/Help/release/dev/productbuild_resources.rst
new file mode 100644
index 0000000..f381e63
--- /dev/null
+++ b/Help/release/dev/productbuild_resources.rst
@@ -0,0 +1,7 @@
+productbuild_resources
+----------------------
+
+* The :module:`CPackProductBuild` module gained a new
+ :variable:`CPACK_PRODUCTBUILD_RESOURCES_DIR` variable to
+ specify resources to be copied into the ``Resources``
+ directory.
diff --git a/Modules/CPackProductBuild.cmake b/Modules/CPackProductBuild.cmake
index d545d3e..4779b95 100644
--- a/Modules/CPackProductBuild.cmake
+++ b/Modules/CPackProductBuild.cmake
@@ -46,3 +46,11 @@
#
# Specify a specific keychain to search for the signing identity.
#
+#
+# .. variable:: CPACK_PRODUCTBUILD_RESOURCES_DIR
+#
+# If specified the productbuild generator copies files from this directory
+# (including subdirectories) to the ``Resources`` directory. This is done
+# before the :variable:`CPACK_RESOURCE_FILE_WELCOME`,
+# :variable:`CPACK_RESOURCE_FILE_README`, and
+# :variable:`CPACK_RESOURCE_FILE_LICENSE` files are copied.
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index a5a18dc..0e93234 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -59,12 +59,25 @@ int cmCPackProductBuildGenerator::PackageFiles()
}
}
- // Copy or create all of the resource files we need.
std::string resDir = packageDirFileName + "/Contents";
+
+ if (this->IsSet("CPACK_PRODUCTBUILD_RESOURCES_DIR")) {
+ std::string userResDir =
+ this->GetOption("CPACK_PRODUCTBUILD_RESOURCES_DIR");
+
+ if (!cmSystemTools::CopyADirectory(userResDir, resDir)) {
+ cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
+ << std::endl);
+ return 0;
+ }
+ }
+
+ // Copy or create all of the resource files we need.
if (!this->CopyCreateResourceFile("License", resDir) ||
!this->CopyCreateResourceFile("ReadMe", resDir) ||
!this->CopyCreateResourceFile("Welcome", resDir)) {
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Problem copying the License, ReadMe and Welcome files"
<< std::endl);
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
Help/release/dev/productbuild_resources.rst | 7 +++++++
Modules/CPackProductBuild.cmake | 8 ++++++++
Source/CPack/cmCPackProductBuildGenerator.cxx | 17 +++++++++++++++--
3 files changed, 30 insertions(+), 2 deletions(-)
create mode 100644 Help/release/dev/productbuild_resources.rst
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list