[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6402-g5c4133a

Nils Gladitz nilsgladitz at gmail.com
Wed Dec 25 18:15:24 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  5c4133a6f3a2250ca4b1da95239ee1cbc676af9b (commit)
       via  44a7543c530cad64c429e85c679c481ee587f929 (commit)
      from  df72653f18191723a1e4ee2407761195eb3f3ee6 (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=5c4133a6f3a2250ca4b1da95239ee1cbc676af9b
commit 5c4133a6f3a2250ca4b1da95239ee1cbc676af9b
Merge: df72653 44a7543
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Wed Dec 25 18:15:22 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Dec 25 18:15:22 2013 -0500

    Merge topic 'wix-read-only' into next
    
    44a7543 CPackWiX: transfer file read only flag during installation


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44a7543c530cad64c429e85c679c481ee587f929
commit 44a7543c530cad64c429e85c679c481ee587f929
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Thu Dec 26 00:14:44 2013 +0100
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Thu Dec 26 00:14:44 2013 +0100

    CPackWiX: transfer file read only flag during installation

diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index c1749ac..78e7339 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -27,6 +27,9 @@
 
 #include <rpc.h> // for GUID generation
 
+#include <sys/types.h>
+#include <sys/stat.h>
+
 int cmCPackWIXGenerator::InitializeInternal()
 {
   componentPackageMethod = ONE_PACKAGE;
@@ -920,6 +923,14 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons(
       fileDefinitions.AddAttribute("Source", fullPath);
       fileDefinitions.AddAttribute("KeyPath", "yes");
 
+      mode_t fileMode = 0;
+      cmSystemTools::GetPermissions(fullPath.c_str(), fileMode);
+
+      if(!(fileMode & S_IWRITE))
+        {
+        fileDefinitions.AddAttribute("ReadOnly", "yes");
+        }
+
       ApplyPatchFragment(fileId, fileDefinitions);
       fileDefinitions.EndElement("File");
 

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

Summary of changes:
 Source/CPack/WiX/cmCPackWIXGenerator.cxx |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list