Commit Graph

1050 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
98a10290a8 cmSystemTools: Fix 'ErrorOccurred' spelling
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.

Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
2022-06-13 09:05:24 -04:00
Ben Boeckel
6ff03d463f clang-tidy: address google-readability-casting lints
At least those involving `static_cast`.
2022-05-24 09:09:43 -04:00
Ben Boeckel
a5f8cbe8b1 clang-tidy: address modernize-use-default-member-init lints 2022-05-24 09:09:43 -04:00
Ben Boeckel
f1d55ff7e9 style: use cmStrCat in some more locations 2022-05-19 15:54:28 -04:00
Brad King
7d78dcbebb Merge topic 'cpack-wix-arch'
cae7e5e38d CPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7236
2022-05-05 09:31:46 -04:00
jakoblover
cae7e5e38d CPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installers 2022-05-05 09:11:57 -04:00
Craig Scott
c150f89f4d CPack: Remove the deprecated PackageMaker generator
This CPack generator has been deprecated since commit 7bf187499f
(CPack: Deprecate PackageMaker generator, 2020-01-31).

Fixes: #23344
2022-05-05 08:36:44 +10:00
Brad King
e253e57fe3 Merge topic 'restore-CPACK_PACKAGEMAKER_CHOICES'
d099136add productbuild: Restore CPACK_PACKAGEMAKER_CHOICES variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7220
2022-05-03 11:24:11 -04:00
Craig Scott
d099136add productbuild: Restore CPACK_PACKAGEMAKER_CHOICES variable
In 2a8df7e7db (productbuild: Don't write rootVolumeOnly attribute if
writing domains, 2022-03-21), the variable holding the main contents
of the distribution.dist XML file was renamed from
CPACK_PACKAGEMAKER_CHOICES to CPACK_APPLE_PKG_INSTALLER_CONTENT.
This reflected the fact that the PackageMaker generator is deprecated.
The new variable also includes more details than the old one held.
Some projects were relying on the old variable name, so we need to still
set that to the same contents as it would have previously provided.

Neither of these variables were previously documented, but the older
variable was mentioned in enough semi-official places that it essentially
became semi-supported. Document both variables and highlight that the
older one is deprecated.

Fixes: #23467
2022-04-30 00:28:05 +10:00
Kyle Edwards
87c762d435 CPack: Use cmCommandLineArgument instead of cmsys::CommandLineArguments 2022-04-20 11:45:28 -04:00
Jean-Philippe Lebel
331c5d458e CPackIFW: Fix regression in icon file names
Changes in commit 761b6e2466 (CPackIFW: Avoid colliding names for icons
/ logos, 2021-10-08, v3.23.0-rc1~546^2) accidentally left an extra `.`
in computed file names.  Remove it.

Fixes: #23423
2022-04-14 09:45:35 -04:00
Craig Scott
e41f1ef6ff CPack/IFW: Add missing referenced source file validation 2022-03-25 22:53:19 +11:00
Craig Scott
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
The rootVolumeOnly attribute is deprecated. Apple docs say to use
domains instead.

Fixes: #23343
2022-03-21 15:43:46 +11:00
Craig Scott
28fdc3a536 productbuild: Simplify internal CPACK_PRODUCTBUILD_DOMAINS usage
There's no benefit to storing the CPACK_PRODUCTBUILD_DOMAINS
prefix in a variable and appending to it in the C++ code. It has the
disadvantage of making it harder to find usages of the variables with
a suffix appended to that string. Expand out the strings at the places
they are used so that they are easier to spot.
2022-03-21 13:36:48 +11:00
Brad King
9e38bfa915 CPack/DMG: Add explicit option to use CPACK_RESOURCE_FILE_LICENSE for SLA
Since macOS 12.0, the ``hdiutil udifrez`` and ``hdiutil udifderez``
commands to embed and extract resources in a disk image are deprecated.
The CPack DragNDrop Generator uses these to attach the SLA specified by
the `CPACK_RESOURCE_FILE_LICENSE` option.  Since that option is shared
by multiple CPack generators, we cannot deprecate it.  Instead, add an
explicit option to control the behavior.  This will give projects a way
to package on future macOS versions that remove the commands.

In order to provide a long-term transition away from attaching SLAs to
disk images, update `cpack` to default this behavior to OFF.  To retain
compatibility for CMake projects, teach the CPack module to default the
option to ON.  Later a policy can be added to change the default.

Issue: #22978
2022-01-18 15:39:51 -05:00
David Wosk
da737d34e0 CPack/productbuild: add options to control domains element
The domains element determines the required authorization level needed
for the install. The auth attribute of the pkg-ref element has been
deprecated in favor of domains, so if the domains options are
specified, the auth attribute is omitted.

Fixes: #23030
2022-01-06 11:33:25 -05:00
Adriaan de Groot
c3715e08e4 FreeBSD: tidy up
- mismatched comments and code,
- remove superfluous log of the "Real package" (which can
  still change! log the changed filename if it does),
- the "fix up the package name" code was replacing the
  pkg 1.17 suffix by the pkg 1.17 suffix, so it wasn't
  really being useful. Whether **any** of the backwards-
  compatibility packaging code is useful is another thing.
2021-12-21 14:29:59 +01:00
Adriaan de Groot
a76f19d5e8 FreeBSD: handle new package-file-suffix 2021-12-21 13:59:27 +01:00
Adriaan de Groot
d5ae2f9754 FreeBSD: fix up the package name
When using libpkg, the output filename is determined by libpkg
itself, based on information in the manifest: package name and
version, basically. This doesn't necessarily match the name that
CMake has determined via CPACK_TEMPORARY_PACKAGE_FILE_NAME or
CPACK_PACKAGE_FILE_NAME. So reset the CMake-determined list
to match what libpkg will do.
2021-12-21 13:59:27 +01:00
Adriaan de Groot
0ac1ac798e FreeBSD: migrate to newer pkg_create(3) API
The pkg_create_from_manifest() function was never really intended as
stable API, and bapt@ has asked me to stop using it so the public
API can be stabilized.

Port to pkg_create() with its attendant settings struct.
Since we already have a complete manifest file, we can hand
that (including the embedded plist) to pkg_create().

While here, reintroduce pkg_init(), which lived in downstream patches
for a while and then went away again.
2021-12-21 13:59:27 +01:00
Brad King
2d4c3cf684 Merge topic 'ifw-sign-installer'
e8e07a90c1 CPackIFW: add support for signing the generated app bundles on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6754
2021-12-02 12:32:01 -05:00
Erlend E. Aasland
e8e07a90c1 CPackIFW: add support for signing the generated app bundles on macOS
Adds the CPACK_IFW_PACKAGE_SIGNING_IDENTITY CPackIFW variable.

This variable mirrors the --sign option of the binarycreator tool.

Fixes: #22927
2021-11-22 23:30:57 +01:00
Greg Fiumara
7213ceb869 CPack/productbuild: Add option to customize product identifier
This adds a new option, CPACK_PRODUCTBUILD_IDENTIFIER, which allows
for customization of the productbuild product identifier within the
CPack productbuild generator.

Fixes: #20830
2021-11-18 13:01:35 -05:00
Brad King
4ef974e6cb CPack: Remove undocumented deprecated OSXX11 generator
This CPack generator was never documented, and has been deprecated since
commit 2ed00e8ef8 (CPack: Deprecate OSXX11 generator, 2020-01-31,
v3.17.0-rc1~45^2).

Issue: #20235
2021-11-05 12:39:22 -04:00
Rose
b86b6aaa4a Source: Cleanup and simplify some code 2021-11-04 09:20:48 -04:00
Rose
6f4727aaa0 Source: Replace C headers with C++ ones
In applicable areas only, of course.
2021-11-02 14:45:29 -04:00
Erlend E. Aasland
62ef2729ee CPackIFW: add support for archive format and compression level options
Adds the following CPackIFW variables:

- CPACK_IFW_ARCHIVE_FORMAT
- CPACK_IFW_ARCHIVE_COMPRESSION

These variables control mirror the --archive-format and --compression
options of the QtIFW binarycreator and repogen tools.

Fixes: #22803

Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
Co-authored-by: Awen Autret
2021-10-28 15:46:22 +02:00
Brad King
9bb7982a15 Merge topic 'purge-sprintf'
b7e9cd05cd Replace the only non-standard _snprintf with snprintf
5ba6e8ac59 Source: Replace most calls to sprintf with snprintf

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6649
2021-10-27 09:23:17 -04:00
Sean McBride
5ba6e8ac59 Source: Replace most calls to sprintf with snprintf 2021-10-25 18:23:13 -04:00
Rose
dd918c517d Source: Simplify some boolean expressions 2021-10-23 11:30:27 -04:00
Brad King
9f1ab65806 Merge topic 'ifw-run-program'
f2f4e66f64 CPackIFW: Add support for RunProgram* config variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
Merge-request: !6610
2021-10-19 09:02:07 -04:00
Brad King
3c855b167f Merge topic 'fix-ifdef-windows'
40e73c5ac4 Source: Fix typo in _WIN32 preprocessor checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6631
2021-10-18 09:29:20 -04:00
Erlend E. Aasland
f2f4e66f64 CPackIFW: Add support for RunProgram* config variables
This patch adds support for specifying <RunProgram>,
<RunProgramArguments>, and <RunProgramDescription> in the IFW
configuration file.
2021-10-17 21:15:57 +02:00
Brad King
40e73c5ac4 Source: Fix typo in _WIN32 preprocessor checks
Since CMake's default compiler flags with MSVC include `-DWIN32` for
historical reasons, a few preprocessor conditions were accidentally
checking for `WIN32` instead of `_WIN32`.  The corresponding blocks
were left out when compiling official binaries for `cmake.org` because
we hard-code compiler flags without `-DWIN32`.

Fixes: #22764
2021-10-15 11:39:04 -04:00
Craig Scott
c5ae200d94 Merge topic 'ifw-installer-icon-filenames'
761b6e2466 CPackIFW: Avoid colliding names for icons / logos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6613
2021-10-15 08:38:58 -04:00
Konstantin Podsvirov
6b12edfe82 CPackIFW: Add support for DisableCommandLineInterface config attribute 2021-10-14 11:57:38 -04:00
Erlend E. Aasland
761b6e2466 CPackIFW: Avoid colliding names for icons / logos
Fixes: #16515
2021-10-15 00:06:19 +11:00
Brad King
f40380077e Merge topic 'clang-warnings'
09f4edbcef Fix Clang -Wbitwise-instead-of-logical warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6623
2021-10-14 07:51:31 -04:00
Brad King
fb35854484 Merge topic 'wix_extension'
ed9dbe9218 CPack/WiX: Add option to skip the WixUIExtension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6619
2021-10-14 07:50:29 -04:00
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