diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2014-09-18 17:59:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-11-13 13:43:50 (GMT) |
commit | 9c1dfbfd600819a751d4c5058fd939650ee6d6b4 (patch) | |
tree | 90b66d5c5e9094115dd88fd1963effe126495484 | |
parent | 47302038c1021f0b6b0d9977f5bccaa795045805 (diff) | |
download | CMake-9c1dfbfd600819a751d4c5058fd939650ee6d6b4.zip CMake-9c1dfbfd600819a751d4c5058fd939650ee6d6b4.tar.gz CMake-9c1dfbfd600819a751d4c5058fd939650ee6d6b4.tar.bz2 |
CPack/DragNDrop: Place the background image file in a hidden folder
By using a hidden folder we avoid the need to mark the file as hidden
from finder, and it makes it easier for future work to refer to the
background image file.
-rw-r--r-- | Source/CPack/cmCPackDragNDropGenerator.cxx | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 3d1e4ea..eff302c 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -400,6 +400,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, // Optionally add a custom background image ... // Make sure the background file type is the same as the custom image + // and that the file is hidden so it doesn't show up. if(!cpack_dmg_background_image.empty()) { const std::string extension = @@ -409,7 +410,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, std::ostringstream package_background_destination; package_background_destination << staging.str() - << "/background" << extension; + << "/.background/background" << extension; if(!this->CopyFile(package_background_source, package_background_destination)) @@ -421,21 +422,6 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } - - std::ostringstream temp_background_hiding_command; - temp_background_hiding_command << this->GetOption("CPACK_COMMAND_SETFILE"); - temp_background_hiding_command << " -a V \""; - temp_background_hiding_command << package_background_destination.str(); - temp_background_hiding_command << "\""; - - if(!this->RunCommand(temp_background_hiding_command)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error setting attributes on disk volume background image." - << std::endl); - - return 0; - } } // Create a temporary read-write disk image ... |