summaryrefslogtreecommitdiffstats
path: root/src/tools/macdeployqt/shared
Commit message (Collapse)AuthorAgeFilesLines
* macdeployqt: wait forever for otoolMorten Sørvig2024-03-251-1/+1
| | | | | | | | | | | The QProcess default wait time of 30s may be too short in e.g. CI environments where processes may be blocked for a longer time waiting for CPU or IO. Task-number: QTBUG-117598 Change-Id: I27dbe83ddbe811ae4ff28767de67cb0ceaab267e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: Fix codesigning with @loader_pathJonas Kvinge2023-10-171-0/+4
| | | | | | | | | | | When the -executable parameter is specified, macdeployqt uses @loader_path instead of @rpath. This case was not handled in getBinaryDependencies() used for the code signing. Fixes: QTBUG-118075 Pick-to: 6.6 Change-Id: Ie1e0d0781305e1849df9ec0d5fb1c3ce6713a62b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: Also look for app libraries with .so extensionJonas Kvinge2023-09-271-1/+1
| | | | | | | | Fixes deploying glib-networking gio modules which uses .so file extension. Change-Id: I6b4c4e9c3bb5745ffa33d7e83c5853a9372f1ca6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tools: use const methods moreAnton Kudryavtsev2023-09-081-2/+2
| | | | | | | to avoid implicit detach Change-Id: I6268d4397631a2a2ff54263dfd0b28a7990c5993 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macdeployqt: port away from Q_FOREACH and mark the tool free of itMarc Mutz2023-08-051-7/+10
| | | | | | | | | As a drive-by, fix a detach attempt in an existing ranged for-loop by making the container const, and don't re-construct the same QDir three times, just once, at beginning of the function. Change-Id: I5031c4b63dd939ae93dd119b01d1cad5e655f733 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* macdeployqt: Consider debug libs when looking for module dependenciesTor Arne Vestbø2023-05-051-1/+4
| | | | | | | | | | Otherwise we will fail to add plugins such as the SQL plugins, because we think that the Sql module is not in the list of module dependencies. Pick-to: 6.5 Change-Id: Ie03d2506e8d86904f51b4198641ad61a6977e592 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macdeployqt: Detect debug dylibs, not just debug frameworksTor Arne Vestbø2023-05-051-1/+4
| | | | | | | | A debug dylib has a binary name like libQt6Core_debug.6.dylib Pick-to: 6.5 Change-Id: I54a7a7017b880c734777d0738acf46c19689148d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Doc: Remove duplicate wordsAndreas Eliasson2023-02-281-1/+1
| | | | | | Change-Id: Ia7a38a1035bd34d00f20351a0adc3927e473b2e7 Pick-to: 6.5 6.4 6.2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* macdeployqt: Don't remove rpaths more than onceTor Arne Vestbø2023-01-101-1/+2
| | | | | | | | | | | In a universal build the tool will find multiple duplicated rpaths, but the install_name tool doesn't like it if we try to remove it more than once. Fixes: QTBUG-109738 Pick-to: 6.5 6.4 6.2 Change-Id: I4a8bea0ad3e47b28e6384ceead551edc83e30d26 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macdeployqt: Add networkinformation as plugins to be deployedMårten Nordheim2022-12-071-1/+3
| | | | | | | | | This was missed during original patch Pick-to: 6.4 Fixes: QTBUG-108677 Change-Id: Icd8960f2f41468dc12c3269b12df777acd962753 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macdeployqt: Fix QtMultimedia plugins deploymentVladimir Belyavsky2022-11-251-1/+1
| | | | | | | | | | | | | It was not updated accordingly after QtMultimedia redesign in Qt 6. This wasn't a real problem because multimedia plugins were eliminated in principle. But it was true only until Qt 6.4, where plugins system for multimedia backends has been reintroduced. Fixes: QTBUG-108742 Fixes: QTBUG-107057 Pick-to: 6.4 Change-Id: I31be5fc20e5bdf8050c04a30492e80d96eb437fb Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Reland macdeployqt: Don't copy .prl files into the Resources folderMichael Brüning2022-09-021-3/+9
| | | | | | | | | | | | | | QRegularExpression::isValid returns true on default constructed objects, so the filter was always matching even though it was not meant to be applied at all. Fix this by checking that there is a non-empty pattern string set and applying the filter only then. Fixes: QTBUG-87764 Pick-to: 6.4 Change-Id: If37f8abaecacba3dc6f0b14da681a6e025367c10 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Correct typo in destination path variable namesMichael Brüning2022-09-021-6/+6
| | | | | | | A couple of variables contained "Destianation" instead of "Destination" Change-Id: I98a15652347d1b0dad640bc49925ec296830147b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: Fix deploying libraries with `reexport`Jonas Kvinge2022-09-011-1/+1
| | | | | | | | | | | | | Fixes deploying libgcc, currently it fails to change the rpaths with the following error: ERROR: Could not parse otool output line: "\t/usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib (compatibility version 1.0.0, current version 1.1.0, reexport)" Pick-to: 6.3 6.4 Change-Id: I5c866a375f88e3b222cbdbebc167b04174f753b2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: macdeployqt process some libraries(e.g. ffmpeg) incorrectGuineng Ni2022-06-151-1/+7
| | | | | | | | | | | ffmpeg and nettle are different from other libraries, they use symbol link as their inner module dependencies. Calling one more install_name_tool can handle this case. Fixes: QTBUG-100093 Pick-to: 6.2 6.3 6.4 Change-Id: I12cdd53bd5aa3120910070ba283178686deb3eb0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-162-54/+4
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Tools: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-031-8/+6
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I6d4712a71b5ebf3f379f1f98ea476557bce963ef Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Tools: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-05-021-18/+18
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: Ib9e01ede4e0d7869fc95414d36f37df4a30b16b4 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* macdeployqt: Ignore repeated references to binary when parsing otool -LTor Arne Vestbø2022-04-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | macdeployqt doesn't know or care about universal build (yet), and will just scan all the lines produced by otool -L as if they were for a single architecture, ignoring any lines it doesn't recognize. This fails when the second arch starts off with a reference to the binary we're processing, which then gets interpreted as a dependency of itself. If that binary doesn't have a path, we end up looking for a match in /usr/lib, which we can't find in the best case, or actually end up deploying from an incompatible Qt version in the worst case. Ideally we'd teach macdeployqt about the multiple slices, bur for now we work around it by skipping any references to dependent libraries that match the binary itself. Fixes: QTBUG-102607 Pick-to: 6.2 6.3 5.15 Change-Id: Ia039fafdce90896e61aab90b9c8ac52543cc2c8c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+2
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macdeployqt: don’t err on unexpected otool outputMorten Johan Sørvig2021-12-151-2/+2
| | | | | | | | | | | | | | | | | Binaries with multiple slices (e.g. arm64, x86_64) will have an extra line for the slice, like: “/path/to/QtGui.framework/QtGui (architecture arm64)” The parsing code will skip this line since it does not match the regexp. In other words the parsing works by looking for lines which matches, and finding lines which don’t match is not an error condition. Pick-to: 6.3 Task-number: QTBUG-98466 Change-Id: I0afebdc0dd19e76de00157518f3409d690f18fc0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move macdeployqt and windeployqt from qttools to qtbaseJoerg Bornemann2021-11-232-0/+1745
Having all *deployqt tools in qtbase will allow us to couple deployment support more tightly with the build system. Change-Id: I299efdacfa6b66a303bb3996ff3ff84e723210a5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>