Commit Graph

80 Commits

Author SHA1 Message Date
Brad King
e32b49e4de Merge topic 'cpack-nsis-uninstaller'
8721658959 CPack/NSIS: Fix installer not waiting for uninstaller to finish

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7774
2022-10-11 09:48:37 -04:00
Mika Fischer
8721658959 CPack/NSIS: Fix installer not waiting for uninstaller to finish
In commit b795c96727 (CPack/NSIS: Fix uninstall command when run from
installer, 2022-03-21, v3.23.0-rc5~9^2~1) we incorrectly removed the
`_?` parameter when calling the uninstaller during installation.
This parameter is however essential for ExecWait to actually wait for
the uninstaller to finish.  Without it, the uninstaller is started in
the background and installer and uninstaller run at the same time.

See https://nsis.sourceforge.io/Docs/Chapter3.html#installerusageuninstaller

Add back the `_?` parameter to fix this regression.  Use another
approach to solve the problem motivating the original change.

Fixes: #24041
2022-10-10 10:41:45 -04:00
Matteo Martelli
0c638ab597 CPack: re-use paths of tools discovered by CMakeFindBinUtils
`CMakeFindBinUtils.cmake` sets `CMAKE_<TOOL>` variables that in
cross-compilation environments point to the toolchain specific
executables: e.g. `CMAKE_OBJCOPY` might point to
`<path_to_toolchain>/arm-poky-linux-gnueabi-objcopy`.
Pass this information to CPack.
2022-09-06 09:49:54 -04:00
Brad King
48a303e6f4 Merge topic 'cpack-nuget-components-on-windows'
066ff258db CPack/NuGet: Restore component packaging on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7280
2022-05-19 09:39:59 -04:00
Alex Turbov
066ff258db CPack/NuGet: Restore component packaging on Windows
The change from `\` to `/` in commit dade75509f (CPack/NuGet: Fix nuspec
file generation for UNIX-style OS, 2020-12-21, v3.20.0-rc1~243^2) does
not work on Windows.  Use `cmake_path` to form a path to an image
directory with preinstalled files.

Fixes: #22489
2022-05-18 11:12:02 -04:00
Sadie Powell
125f6964ba CPack/NSIS: Fix several typos in the NSIS template 2022-05-03 12:47:27 -04:00
Brad King
a20424e737 Merge topic 'productbuild-rootVolumeOnly'
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
95eb8cbcfc CPack: Avoid space / tab mix in productbuild distribution.xml template
28fdc3a536 productbuild: Simplify internal CPACK_PRODUCTBUILD_DOMAINS usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7092
2022-03-22 08:51:02 -04:00
Brad King
73939fb3cb Merge topic 'productbuild-rootVolumeOnly' into release-3.23
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
95eb8cbcfc CPack: Avoid space / tab mix in productbuild distribution.xml template
28fdc3a536 productbuild: Simplify internal CPACK_PRODUCTBUILD_DOMAINS usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7092
2022-03-22 08:51:01 -04:00
Brad King
c295f4a77e Merge topic 'cpack-nsis-fix-uninstall-quoting'
5d2ceaada8 CPack/NSIS: Add support for unquoted (legacy) uninstaller strings
b795c96727 CPack/NSIS: Fix uninstall command when run from installer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7096
2022-03-22 08:45:04 -04:00
Brad King
21fa99320f Merge topic 'cpack-nsis-fix-uninstall-quoting' into release-3.23
5d2ceaada8 CPack/NSIS: Add support for unquoted (legacy) uninstaller strings
b795c96727 CPack/NSIS: Fix uninstall command when run from installer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7096
2022-03-22 08:45:03 -04:00
Marc Jeanmougin
5d2ceaada8 CPack/NSIS: Add support for unquoted (legacy) uninstaller strings 2022-03-21 14:53:44 -04:00
Marc Jeanmougin
b795c96727 CPack/NSIS: Fix uninstall command when run from installer
The quoting introduced by commit eb3b3bacdc (CPack/NSIS: Fix uninstall
on Windows using "Apps & Features", 2021-09-13, v3.22.0-rc1~136^2)
created two errors in the uninstaller call: double quoting of the
uninstaller executable, and quotes added to the `_?=` argument which
does not support them.  Simplify the command.
2022-03-21 14:53:31 -04: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
95eb8cbcfc CPack: Avoid space / tab mix in productbuild distribution.xml template 2022-03-21 14:31:09 +11:00
Philip Bailey
114a04f89c CPack/RPM: Honor CPACK_RPM_<component>_PACKAGE_ variables when set OFF
Fixes: #23182
2022-02-08 16:23:08 -05:00
Johnny Jazeix
b56e0f4689 CPack/NSIS: Fix description not displayed for components
Fixes: #23151
2022-01-29 18:02:46 +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
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
makise-homura
2b9ef77944 CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecture
"OS Elbrus" (OSL for short), a reference Linux distro for E2K (Elbrus)
platform may have broken dpkg-shlibdeps, that doesn't specify
dependencies correctly. In this case, the only reliable way is to
explicitly set dependencies of libc6 and lcc-libs, and then warn user
to let him know this list may be incomplete. This commit does that.
This fix has no effect on correctly working dpkg-shlibdeps, so when
this bug will be fixed in new versions of OSL, CPack will work as
expected with these distros.
2021-10-15 05:05:18 +03:00
Andras Lasso
eb3b3bacdc CPack/NSIS: Fix uninstall on Windows using "Apps & Features"
According to NSIS documentation [1], uninstaller executable path in
UninstallString must always be quoted.  Quote the uninstall executable
in `NSIS.template.in` so that it works when the path has spaces.

[1] https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs
2021-09-14 09:52:19 -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
a6eadb8031 Merge topic 'cpack-rpm-pre-semicolon'
3cdf23985f CPackRPM: avoid a spurious `;` in the `%pre` and other sections with scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6415
2021-08-03 11:01:08 -04:00
Artur Samarin
3cdf23985f CPackRPM: avoid a spurious ; in the %pre and other sections with scripts
This was accidentally added by commit 34c8a23044 (CPackRPM: add
scriplets tags only if scripts exist, 2021-04-01, v3.21.0-rc1~387^2).

Fixes: #22501
2021-08-02 15:04:22 -04:00
Johnny Jazeix
795e406e3b CPack/NSIS: Add option to not display license page
Fixes: #22215
2021-08-01 18:28:47 +02:00
Brad King
460e812369 Merge topic 'cpack-deb-lib-multiarch'
68b961d361 CPack/DEB: Add postinst/postrm ldconfig for multi-arch lib dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6341
2021-07-13 08:25:20 -04:00
Brad King
ca85c6913d Merge topic 'cpack-deb-post-ops'
805fa791d1 CPack/DEB: Avoid overriding user-provided `postinst` and `postrm`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6335
2021-07-13 08:16:26 -04:00
Alex Turbov
68b961d361 CPack/DEB: Add postinst/postrm ldconfig for multi-arch lib dirs
Fixes: #22411
2021-07-12 17:10:02 -04:00
Alex Turbov
805fa791d1 CPack/DEB: Avoid overriding user-provided postinst and postrm
When a user provides `CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA` or
`CPACK_DEBIAN_<comp>_PACKAGE_CONTROL_EXTRA` variables in
`CMakeLists.txt` and the package contains dynamic libraries, the
`CPackDeb.cmake` sets `CPACK_ADD_LDCONFIG_CALL` to `1`.  Later it
analyzes if defaulted `postinst`/`postrm` should be generated trying to
check if the user provides any in `CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA`
variable. However, the `foreach` loop uses the invalid variable
`PACKAGE_CONTROL_EXTRA` instead, so these files gonna be overridden.
Fix the variable name.

Fixes: #22410
2021-07-12 17:04:29 -04:00
Lisa Welsch
bb5fc38209 CPack/RPM: Add option to set %global __requires_exclude_from 2021-07-09 08:06:00 -04:00
Marc Ruiz
9ce235fe5d CPack/NSIS: Update language list in template
Fixes: #22382
2021-07-07 11:59:49 -04:00
Alex Sweet
9b53eca317 CPack/RPM: Fix weak dep support
RPM 4.11.3 for el7 contains backported support for the RPM weak dep tags.
It only supports querying those tags, but rpmbuild can not make use of them.
Since CPack relies on rpmbuild --querytags to check for support, this
commit switches to rpm --suggests to check for support of weak
dependencies.

Fixes: #22350
2021-06-29 11:14:54 -04:00
Ben Boeckel
ed1f3a5fa5 CPackDeb: output the error message when no description can be made
The `message` command does not support automatic dereferencing.
2021-06-07 07:11:44 -04:00
Markus Israelsson
79f48da5c2 CPack/NSIS: Fix CPACK_NSIS_UNINSTALL_NAME when not Uninstall.exe
If a previous installation was detected by the NSIS script the
uninstaller was not correctly run unless it was still named
`Uninstall.exe`.  This meant that using `CPACK_NSIS_UNINSTALL_NAME`
was simply broken.

Fixes: #22103
2021-04-27 14:06:42 -04:00
Domen Vrankar
34c8a23044 CPackRPM: add scriplets tags only if scripts exist
Scriplet tags should not be added to generated
spec files if scripts weren't provided as those
tags are otherwise present in generated rpm file
even if the script wasn't provided thereby
generating unneeded dependency on shell.

Fixes: #21345
2021-04-01 22:28:24 +02:00
Brad King
ac79fd8a0e Merge topic 'cpackrpm-debuginfo-single-package-install-erase-scripts'
31c184ad69 CPackRPM: handle scripts in debuginfo single package mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5953
2021-04-01 10:25:28 -04:00
Domen Vrankar
31c184ad69 CPackRPM: handle scripts in debuginfo single package mode
Enabling CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE while
using rpm install or erase scripts resulted in
resulted missing scripts for non default components.

Fixes: #21974
2021-03-30 23:24:16 +02:00
Domen Vrankar
d0adb2386a CPackRPM: correctly handle empty dir in single package mode
Enabling CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE while
having an empty directory in non main component
resulted in packaging error that the directory
does not exist.

Fixes: #21951
2021-03-29 01:26:58 +02:00
Johnny Jazeix
0aabeb0c30 CPack/NSIS: Add option for setting branding text
See https://nsis.sourceforge.io/Reference/BrandingText
for more information.

Fixes: #21479
2021-02-07 16:10:57 +01:00
Deniz Bahadir
d586a4ad60 CPackDeb: dpkg-shlibdeps now supports searching for private shared libs
The new CPack variable `CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS`
can be set to a list of directories. If `CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
or `CPACK_DEBIAN_<component>_PACKAGE_SHLIBDEPS` are set to `ON` these
directories will be searched by `dpkg-shlibdeps` in order to find
private shared library dependencies of the libraries/executables that
shall be packed.
2021-01-22 08:33:01 -05:00
iorikyu
dade75509f CPack/NuGet: Fix nuspec file generation for UNIX-style OS
Use forward slashes, which should work on both UNIX and Windows.
2020-12-22 09:30:33 -05:00
Andrew Fuller
c826745f5a CPack/DEB: Do not crash when asked for debug symbols when there are none
Fixes: #21356
2020-11-16 14:03:07 -05:00
Bob Apthorpe
41ae7c4e51 CPack/NuGet: Add settings for the license, icon, and language
Also update the XML Schema.

Fixes: #21348
2020-11-05 10:49:25 -05:00
Johnny Jazeix
c92b96234a CPack/NSIS: Template file in UTF-8 BOM to support Unicode
Fixes: #21318
2020-10-19 19:53:56 +02:00
Fritz Elfert
267de3ba30 CPack/WiX: Add support for custom XML namespaces
Add a `CPACK_WIX_CUSTOM_XMLNS` option to specify these.

Fixes: #21098
2020-08-18 07:50:49 -04:00
Jean-Christophe Fillion-Robin
207373802e Fix typos identified using codespell
See https://github.com/codespell-project/codespell#readme

The following command was used:

```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
2020-07-22 12:44:47 -04:00
Brad King
a1af643291 Merge topic 'fix-cpack-deb-generating-empty-paragraph'
6ba842163c CPack-deb: don't add a line with a dot to pkg desc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4806
2020-05-28 06:50:40 -04:00
Jonathan Verner
6ba842163c CPack-deb: don't add a line with a dot to pkg desc
Currently, if the package description ends with a newline
(typically if it is read from a file) cpack -deb adds a single line
with a dot at the end which leads to a violation of the
`extended-description-contains-empty-paragraph` debian policy.

This commit fixes the above behaviour.

Fixes: #20763
2020-05-27 14:44:28 -04:00
Johnny Jazeix
d6840a4f3c CPack/NSIS: Add option for setting DPI-aware
See https://nsis.sourceforge.io/Reference/ManifestDPIAware
for more information.

Fixes: #17724
2020-04-14 13:47:49 +02:00
Sarang Joshi
c0534c4a68 CPackRPM: Add PRE_/POST_TRANS scripts
Add variables for PRE_TRANS and POST_TRANS scripts.

Fixes: #18917
2020-02-24 14:31:38 -05:00
Yacoub Hossain
e6c470997f CPack/NuGet: Provide more granular errors
Address the problem of not knowing when cpack fails to create a nuget
package which occurs when creating multiple nupkgs.

Fixes: #20094
2020-02-17 11:01:08 -05:00