summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-07-21 14:15:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-07-21 14:15:09 (GMT)
commitb7e8b0e2604f36294f34228b912d94f321ec381d (patch)
treed65781843df5251d57ce7ff1c881496882a9dae5 /Source
parent5e3b29f03af342f301c301abddf7a9af868ce211 (diff)
parent351c1b1ad6d68c9c029ae9d92f656b467cd350d0 (diff)
downloadCMake-b7e8b0e2604f36294f34228b912d94f321ec381d.zip
CMake-b7e8b0e2604f36294f34228b912d94f321ec381d.tar.gz
CMake-b7e8b0e2604f36294f34228b912d94f321ec381d.tar.bz2
Merge topic 'cpack-dmg-applescript-argv'
351c1b1a CPack: Pass volume mount name to AppleScript instead of volume name. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1069
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 9864cf3..d4d2fdb 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -447,6 +447,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
cmsys::RegularExpression mountpoint_regex(".*(/Volumes/[^\n]+)\n.*");
mountpoint_regex.find(attach_output.c_str());
std::string const temp_mount = mountpoint_regex.match(1);
+ std::string const temp_mount_name =
+ temp_mount.substr(sizeof("/Volumes/") - 1);
// Remove dummy padding file so we have enough space on RW image ...
std::ostringstream dummy_padding;
@@ -480,7 +482,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
std::ostringstream setup_script_command;
setup_script_command << "osascript"
<< " \"" << cpack_dmg_ds_store_setup_script << "\""
- << " \"" << cpack_dmg_volume_name << "\"";
+ << " \"" << temp_mount_name << "\"";
std::string error;
if (!this->RunCommand(setup_script_command, &error)) {
cmCPackLogger(cmCPackLog::LOG_ERROR,