summaryrefslogtreecommitdiff
path: root/Source/CPack/cmCPackDragNDropGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* CPack/DragNDrop: Re-implement SLA attachment to avoid deprecated toolsBrad King2020-07-071-231/+217
| | | | | | | | | | The `Rez` tool has been deprecated since Xcode 6. The `hdiutil flatten` and `hdiutil unflatten` tools have been deprecated since macOS 10.15 and are removed in macOS 11. Instead use `hdiutil udifrez` to attach the SLA resources to disk images. This tool accepts XML input files, so convert our resource file generation to produce that format. Fixes: #20889
* Merge topic 'cpack-dmg-breaklongline'Brad King2020-01-271-2/+3
|\ | | | | | | | | | | | | 4a3a7d5f5d CPack/DragNDrop: Fix word corruption in BreakLongLines Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4275
| * CPack/DragNDrop: Fix word corruption in BreakLongLinesKoray Kilinc2020-01-241-2/+3
| | | | | | | | When the lines are wrapped the leading characters of the next word were being lost
* | CPack/DragNDrop: Support RTF licensesAndrew Fuller2020-01-241-10/+31
|/
* CPack/DragNDrop: Support CPACK_DMG_<component>_FILE_NAMEAndrew Fuller2020-01-161-0/+5
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-9/+10
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-2/+2
| | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-3/+3
|
* cmSystemTools::RunSingleCommand: Accept std::string argumentVitaly Stakhovsky2019-02-061-2/+2
|
* Merge topic 'copyfile-stdstring'Brad King2019-01-301-2/+1
|\ | | | | | | | | | | | | c31b6e616d cmSystemTools: copy file member functions accept std::string params Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2877
| * cmSystemTools: copy file member functions accept std::string paramsVitaly Stakhovsky2019-01-291-2/+1
| | | | | | | | | | Cleaned up `c_str()`s. `cmSystemTools::CopyFileIfDifferent()` removed as redundant.
* | clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
|/ | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* clang-tidy: Use emplaceRegina Pfeifer2019-01-171-2/+2
|
* clang-tidy: fix warnings in macOS-only codeBrad King2018-11-271-1/+1
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-32/+38
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Make use of std::chrono throughout every componentWouter Klouwen2018-01-231-3/+4
| | | | | | | | This commit continues the changes made in CTest to support std::chrono by applying it throughout every component where a duration was used. No functional change intended.
* cmCPackDragNDropGenerator: Improve error reportingClinton Stimpson2017-10-111-6/+14
| | | | When running hdiutil and other commands, capture errors and log them.
* CPack: Fix .dmg HFS+ creation on macOS APFS hostsBrad King2017-10-021-0/+1
| | | | | | | When running `hdiutil create`, specify the HFS+ filesystem explicitly. Otherwise `hdiutil` may choose a filesystem based on the host. We do not want to create APFS images for `.dmg` packages because they may not mount on macOS versions prior to 10.12.
* CPack: put local variable on the stackRolf Eike Beer2017-09-291-4/+3
|
* Fix some occurrences of readability-braces-around-statementsMatthias Maennich2017-09-281-1/+2
| | | | | | Fix issues diagnosed by clang-tidy [readability-braces-around-statements] Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Convert some leftover loops to C++11 range-based loopMatthias Maennich2017-09-281-11/+11
| | | | | | Fix issues diagnosed by clang-tidy [modern-loop-convert] Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Fix left-over occurrences of else-after-returnMatthias Maennich2017-09-281-6/+6
| | | | | | | | Fix issues diagnosed by clang-tidy [readability-else-after-return] These were mostly only showing up on OSX. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Clean up some C-Style castsMatthias Maennich2017-09-281-1/+1
| | | | | | Fix issues diagnosed by clang-tidy [google-readability-casting] Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Fix some occurrences using string by value rather than by const&Matthias Maennich2017-09-281-1/+2
| | | | | | | | Fix issues diagnosed by clang-tidy - performance-unnecessary-value-param - performance-unnecessary-copy-initialization Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Use C++11 nullptr (cont.)Matthias Maennich2017-09-191-5/+5
| | | | | | | Fix remaining occurrences of the issue addressed in commit 5962db4389 (Use C++11 nullptr, 2017-08-22) that are only showing up on macOS. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Merge topic 'cpack-dmg-iwyu'Brad King2017-08-301-0/+1
|\ | | | | | | | | | | | | 8c51dbdd cmCPackDragNDropGenerator: Add missing include Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1206
| * cmCPackDragNDropGenerator: Add missing includeBrad King2017-08-291-0/+1
| | | | | | | | | | | | We use `std::sort` and so must include `<algorithm>`. Issue: #17233
* | CPack: Pass volume mount name to AppleScript instead of volume name.Gusts Kaksis2017-07-201-1/+3
|/ | | | | | Get the mount name from mount point path returned by hdiutil instead of assuming it is the volume name. They can be different in case of conflict with an already-mounted volume.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* cmCPackDragNDropGenerator: Improving handling of temporary dmg imagesClinton Stimpson2017-02-231-20/+25
| | | | | | | | | | | | | | Adjust the image format to create the initial `dmg`, and convert only when necessary. This eliminates spurious hdiutil create -format UDRW failures I'm seeing which may be related to an anti-virus scanner. Running hdiutil create -format UDRW -verbose indicates a "resource is busy" issue when unmounting an image.
* iwyu: Fix OSX specific issuesDaniel Pfeifer2016-11-231-1/+3
|
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* tidy: Fix readability-redundant-string-cstr issuesGregor Jasny2016-09-041-3/+2
|
* Access std::ios_base with std::iosDaniel Pfeifer2016-06-141-1/+1
| | | | Just because it is shorter.
* CPack/DragNDrop: Optionally disable `/Applications` symlinkHarry Mallon2016-05-251-5/+10
|
* cmCPackDragNDropGenerator: Replace std::{ostringstream => string}Brad King2016-05-171-5/+4
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-440/+316
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* CPack: Avoid using OS X CoreServices if compiler fails on header (#16021)Brad King2016-03-181-0/+6
| | | | | | Some compilers on OS X report errors in the CoreServices framework headers. Check for support of the header ahead of time and compile the relevant code only when the header is available.
* CPack: Avoid requiring Carbon framework on OS X (#16021)Sean McBride2016-03-171-15/+6
| | | | | | | | | | In commit v3.5.0-rc1~232^2 (CPackDMG: Add support for multilingual SLAs, 2015-10-19) we added use of the Carbon framework in order to get access to its APIs to convert Script Manager RegionCode values. This is not necessary. Instead we can use CoreServices. While at it, replace individual CoreFoundation includes with including the entire framework, which is the correct way.
* CPack/DragNDrop: Fix handling of certain license file content (#15899)Andrey Mishchenko2016-01-071-20/+70
| | | | | | | There were issues in the special-character-escaping and line-wrapping code which caused DragNDrop packaging to fail mysteriously at a later step with parsing errors in the `sla.r` file generated by the following code.
* CPack/DragNDrop: Allow single license for multiple languagesSimon Levermann2015-12-021-7/+16
| | | | | | | When both CPACK_DMG_SLA_DIR and CPACK_RESOURCE_FILE_LICENSE are defined, use the license file for all languages instead of looking for a license file for each language. Also expand the documentation on the SLA variables.
* CPack/DragNDrop: Use documented CPACK_DMG_SLA_LANGUAGES variableSimon Levermann2015-11-231-7/+7
| | | | | | | The change in commit f88533cc (CPackDMG: Add support for multilingual SLAs, 2015-10-19) accidentally used CPACK_DMG_LANGUAGES in its implementation instead of the intended CPACK_DMG_SLA_LANGUAGES added to the documentation.
* CPack/DragNDrop: Optionally run an AppleScript when making a packageRobert Maynard2015-11-131-11/+99
| | | | | | | | | | | | | | | | While the DragNDropGenerator supports custom DS_Store and backgrounds, it is still very hard to automatically setup nice looking packages. The primary issue is that the DS_Store embeds the name of the volume in the path to backgrounds, which means that if a package embeds the version in its volume name a new DS_Store must generated for each release. Instead one now can use applescript to setup the DS_Store. This change also ensures that temporary RW image has enough space for these changes, creating 1 MB dummy padding file, that is later removed from the image. Co-Author: Adam Strzelecki <adam.strzelecki@java.pl>
* CPack/DragNDrop: Place the background image file in a hidden folderRobert Maynard2015-11-131-16/+2
| | | | | | 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.
* CPack/DragNDrop: Use source file extension for background imageRobert Maynard2015-11-131-1/+5
| | | | | | | Instead of blindly copying the `CPACK_DMG_BACKGROUND_IMAGE` file to `background.png`, we instead use the same file extension as the source image. This is needed for proper support of multi resolution `tif` backgrounds.