Commit Graph

1061 Commits

Author SHA1 Message Date
Brad King
09f4edbcef Fix Clang -Wbitwise-instead-of-logical warnings 2021-10-13 10:00:08 -04:00
Brad King
90e56da9e7 Merge topic 'ifw-refactor-packagefiles'
c50329d3ed CPackIFW: Refactor cmCPackIFWGenerator::PackageFiles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6617
2021-10-13 09:02:06 -04:00
Brad King
d7e9ad926a Merge topic 'ifw-product-images'
6d39c845ee CPackIFW: Add support for ProductImages config option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6611
2021-10-13 09:00:02 -04:00
Vasileios Anagnostopoulos
ed9dbe9218 CPack/WiX: Add option to skip the WixUIExtension
Fixes: #22747
2021-10-12 20:41:00 +02:00
Erlend E. Aasland
c50329d3ed CPackIFW: Refactor cmCPackIFWGenerator::PackageFiles
Split PackageFiles() into four methods, for increased readability:

- cmCPackIFWGenerator::BuildRepogenCommand
- cmCPackIFWGenerator::BuildBinaryCreatorCommand
- cmCPackIFWGenerator::RunRepogen
- cmCPackIFWGenerator::RunBinaryCreator

Fixes: #22744
2021-10-11 12:16:04 +02:00
Erlend E. Aasland
6d39c845ee CPackIFW: Add support for ProductImages config option 2021-10-08 22:20:06 +02:00
Erlend E. Aasland
5447dc655e CPackIFW: Add version guard for configuration attributes
Fixes: #22736
2021-10-08 18:31:00 +02:00
Sean McBride
f4387c197d CPack/OSXX11: Fix Clang 13 Wunused-but-set-variable
Use the success/fail flag for the function return value.
2021-10-05 11:52:35 -04:00
Marc Chevrier
cc56dc7468 Rename cmProp in cmValue 2021-09-21 17:14:04 +02:00
Marc Chevrier
7e154ebd59 cmSystemTools::VersionCompare: use std::string for arguments 2021-09-17 11:58:46 +02:00
Marc Chevrier
7fce78982b Use new SetOption signatures 2021-09-15 18:30:49 +02:00
Marc Chevrier
7aeb262278 cmCPackGenerator::SetOption accepts cmProp or std::string 2021-09-15 18:30:41 +02:00
Marc Chevrier
79362cf117 cmProp: cm::string_view cast operator must be explicit
To avoid ambiguity on std::string assigment between the following two
cmProp cast operators:
* operator const std::string&() const noexcept
* operator cm::string_view() const noexcept
2021-09-14 17:42:02 +02:00
Marc Chevrier
202a65759b cmCPackGenerator::GetOption returns cmProp 2021-09-13 09:54:27 -04:00
Brad King
20fec15204 cmArchiveWrite: Check for construction errors on Open
Also update call sites to report the error.

Issue: #19666
2021-08-20 11:23:20 -04:00
Brad King
a3ddcdb911 Merge topic 'nsis_ignore_license_page'
795e406e3b CPack/NSIS: Add option to not display license page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6422
2021-08-03 11:06:45 -04:00
Brad King
1524505e12 Merge topic 'minimal_nsis'
c0572a15d6 CPack/NSIS: Bump minimal version of NSIS to 3.03

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6425
2021-08-03 11:05:39 -04:00
Johnny Jazeix
c0572a15d6 CPack/NSIS: Bump minimal version of NSIS to 3.03
Fixes: #22508
2021-08-02 21:28:30 +02:00
Johnny Jazeix
795e406e3b CPack/NSIS: Add option to not display license page
Fixes: #22215
2021-08-01 18:28:47 +02:00
Russell Greene
051da997da CPack/DEB: Add zstd compression for deb packages 2021-07-29 13:40:40 -04:00
Alex Turbov
9dc007e17c Refactor: Drop redundand std::endl calls in the middle of output 2021-07-13 16:42:04 +03:00
Alex Turbov
afcc5449e8 Refactor: Use cmStrToLong instead of std::strtol 2021-07-13 08:56:39 -04:00
Alex Turbov
13549674cc Refactor: Avoid duplicate calls to GetOption("GEN_DBGSYMDIR") 2021-07-13 08:36:12 -04:00
Alex Turbov
7add10f288 Refactor: Deduplicate code of createDebPackages()
Also, fix incorrect `retval` accumulation.
2021-07-13 08:36:12 -04:00
Alex Turbov
593ff734b0 CPack/DEB: dbgsym package not generated for non-component packaging
Fix: #19735
2021-07-13 08:36:12 -04:00
Alex Turbov
c8f298ae08 Refactor: Extract packaged files finder into a function 2021-07-13 08:36:12 -04:00
Alex Turbov
7fd3134ea1 Refactor: cmCPackDebGenerator::PackageComponents handle else first
Also, return early to reduce nesting level of the function body.
2021-07-13 08:35:27 -04:00
Alex Turbov
008321595a Refactor: Change return value to bool for private members
The `cmCPackDebGenerator::createDeb()` and `cmCPackDebGenerator::createDbgsymDDeb()`
in fact have boolean return value.
2021-07-13 08:35:27 -04:00
Alex Turbov
45a6fa0c33 Refactor: Drop unnecessary if before return 2021-07-13 08:35:27 -04:00
Alex Turbov
700abe7bca Refactor: Drop useless assignments of retval before return 2021-07-13 08:35:27 -04:00
Alexey Rogachevskiy
9028195a22 CPackDeb: sort package files before generating deb file
This should make the order in which the files are added to md5sums
and archives is stable, thus making package files more reproducible.

Fixes: #22361
2021-06-30 08:47:59 -04:00
Craig Scott
445c73d3fa Merge topic 'cpack-install-opts'
26e36111d3 CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6141
2021-05-26 18:53:40 -04:00
Jason Erb
a50db66bbd CPack/WIX: Use language en-US, font Consolas, size 14
Improve rendering of text from `CPACK_RESOURCE_FILE_LICENSE`.

Fixes: #22228
2021-05-24 12:34:03 -04:00
Nils Gladitz
26e36111d3 CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLES
The new variable allows projects to define custom key=value pairs of
variables to be set in CPack cmake_install.cmake script invocations.
This allows install(SCRIPT|CODE) to be parameterized at runtime.
2021-05-24 08:21:49 +10:00
Brad King
4281cd15db clang-tidy: fix bugprone-redundant-branch-condition 2021-05-11 15:08:08 -04:00
Josef Angstenberger
5950e54325 Source: Fix typos and spelling in comments 2021-05-07 17:00:18 +02:00
friendlyanon
4dd4e9dd6c cmGlobalGenerator: Add parallel parameter to GenerateCMakeBuildCommand 2021-05-01 16:08:21 +02:00
Brad King
f881b4e4cc cmCPackDebGenerator: Remove unused local variable 2021-04-28 10:09:52 -04:00
Nils Gladitz
c5c130e675 cmArchiveWrite: Consolidate multiple ways to set thread count
Merge use of SetFilterOption() into more abstract thread count
in cmArchiveWrite constructor.

libarchive defaulting of threads for threads == 0 seems to be
configuration dependent. Preemptively default thread count via
std::thread::hardware_concurrency().

Also allow negative values for the thread count in which case
the detected hardware concurrency is also used but the given
absolute thread count is used as an upper limit.
2021-04-22 15:40:13 -04:00
Brad King
ec1b6157cb Update CMake code using KWSys to account for Status return values
KWSys as of 2021-04-14 changed the return type of `SystemTools`
operations from `bool` to `Status`.  Update our call sites.
This may improve error reporting accuracy in a few places.
2021-04-14 13:14:09 -04:00
Brad King
d9b8acd238 Merge topic 'ifw-depends-name-version-parsing'
a43783a08d CPackIFW: Fix parsing of name and version in component DEPENDS
f536e6f3fb CPackIFW: Remove redundant variable assignment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5929
2021-03-30 09:56:31 -04:00
Craig Scott
a43783a08d CPackIFW: Fix parsing of name and version in component DEPENDS
The DEPENDS or DEPENDENCIES arguments in a call to
cpack_ifw_configure_component() or cpack_ifw_configure_component_group()
specify a name and optionally a version constraint as a single string.
QtIFW also allows a colon (requires QtIFW 3.1 or later) or a hyphen to
separate the name and version. The version may optionally contain a
leading operator, with = being assumed when no operator is present.

The previous code was not handling : as a separator at all and was
erroneously dropping the version part when no operator was given.
Fix both of those non-conforming behaviors and also warn if trying
to use a hyphen in a name with a QtIFW version that isn't recent enough
to support it.

Fixes: #21697
2021-03-27 07:44:00 +11:00
Craig Scott
f536e6f3fb CPackIFW: Remove redundant variable assignment
This was showing up in cppcheck results.
2021-03-24 18:23:06 +11:00
Craig Scott
f226a1678f Merge branch 'master' into nsis-branding-trim-position 2021-03-24 16:35:49 +11:00
Craig Scott
a6a5256395 CPack: Validate and document NSIS branding text trim positions 2021-03-24 16:35:29 +11:00
Olivier Iffrig
c456b09513 CPack: Fix symbolic link detection for directories
In the case where the current path is a symlink to a directory, a
trailing slash causes the link to be dereferenced, which means that any
subsequent `FileIsSymlink` on it will return false.

Fixes: #21886
2021-03-05 08:21:13 -05:00
Kevin Ushey
e3ac388738 cpack: add CPACK_DMG_FILESYSTEM
Allow users to configure the filesystem format of the generated `.dmg`
via the `CPACK_DMG_FILESYSTEM` option.

Fixes: #21874
2021-03-02 10:11:15 -05:00
Brad King
ec5f76753a Merge topic 'cpack_nsis_executable_custom'
8e8b99d01a CPack/NSIS: Add option for setting custom makensis executable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5839
2021-02-23 08:11:05 -05:00
Johnny Jazeix
8e8b99d01a CPack/NSIS: Add option for setting custom makensis executable
It allows users to set a custom one without changing the PATH environment variable.

Fixes: #21733
2021-02-22 17:59:04 +01:00
Craig Scott
90c2f138ee CPackIFWInstaller: Avoid potential null pointer dereference
In d16830324f (CPackIFW: Improve warning and docs for show page list
option, 2021-02-14), code was added to report the current QtIFW version.
That code didn't check that there was a Generator object before using it,
resulting in a scanbuild warning about a potential null pointer dereference.
Add a check and output a more general warning message if we don't have
the current QtIFW version available to report.
2021-02-19 17:11:53 +11:00