summaryrefslogtreecommitdiff
path: root/src/macdeployqt/shared/shared.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove macdeployqt and windeployqtJoerg Bornemann2021-11-261-1603/+0
| | | | | | | | | | | These tools have been moved to qtbase. Change-Id: Idaf799d44be399040f9058252675c0ee3eecc39b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* macdeployqt: Write Paths/QmlImports to qt.confJoerg Bornemann2021-11-261-1/+1
| | | | | | | | | ...instead of the deprecated Paths/Qml2Imports key. Task-number: QTBUG-98335 Change-Id: I43f73ba6e6fc15d7bce3839faea3b0fc31d8e065 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io>
* macdeployqt: Don't write Paths/Imports to qt.confJoerg Bornemann2021-11-231-1/+0
| | | | | | | | This key is outdated. Change-Id: I106980cecd63b9929551cbc81cf39f91a813a8ef Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io>
* macdeployqt: Use static QFile::exists() and QFileInfo::exists()Jonas Kvinge2021-11-011-6/+6
| | | | | Change-Id: If2fd409fbd53535cf4823bed831217c196a070ba Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macdeployqt: don’t stop qmlimportscanner after 30sMorten Johan Sørvig2021-10-221-1/+1
| | | | | | | | | | | Process::waitForFinished() has a default timeout of 30 seconds, but qmlimportscanner can in some cases run for longer than that. Pick-to: 5.15 6.2 Fixes: QTBUG-97104 Change-Id: Ie40d052ad6a4dc8643860163eb9a0c8f5859c3ae Reviewed-by: Liang Qi <liang.qi@qt.io>
* macdeployqt: Fix typosJonas Kvinge2021-10-111-3/+3
| | | | | Change-Id: I778f3548bb43d4e5a70d4681e97853b7affcd9e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: process rpaths in deterministic orderMorten Johan Sørvig2021-09-091-23/+29
| | | | | | | | | | | | | | | | | Use QList<QString> instead of QSet<QString> to make macdeployqt process rpaths in deterministic order instead of arbitrary order based on the QString hash value. Make sure that the fallback QLibraryInfo::LibrariesPath is added last in order to give preference to the actual rpaths. (Use of LibrariesPath was added in an earlier commit to cover cases where the app binary did not have an rpath set that points to the Qt libs) Task-number: QTBUG-53533 Change-Id: Ic8d91e196f50b8b43e6c09d5c64b7cdb01b8a8b2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Replace foreach with C++11 for loopJonas Kvinge2021-08-301-25/+27
| | | | | Change-Id: Icf6905fb19696e3216a6467495909f89756156fd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: deploy plugins also when QtCore5Compat existsMorten Johan Sørvig2021-08-271-1/+2
| | | | | | | | | | | | | | | macdeployqt determines Qt's libinfix by examining the naming of QtCore.framework, looking for the infix between "QtCore" and ".framework". This worked well until we added QtCore5Compat.framework. Add check to make sure we don't pick "5Compat" as the infix. Fixes: QTBUG-94796 Pick-to: 6.1 6.2 Change-Id: I79b355c19e3826fe1e2a3677e8ec26e1abada11f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: fix network plugin deploymentMorten Johan Sørvig2021-08-251-1/+1
| | | | | | | | | The bearer plugin is no more; the tls implementations are now proper plugins. Change-Id: I153e425164089c6d26a0ca642c86c231bb728509 Pick-to: 6.1 6.2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: Remove misplaced whitespaceJonas Kvinge2021-08-241-1/+1
| | | | | Change-Id: I30a4542abfa5757985b3ee278c57eaba4af8caa6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Use qmlimportscanner from libexec folderAlexandru Croitor2021-05-251-2/+4
| | | | | | | | Adapts to qtdeclarative's c4425426278c1f5e94d51b465a746ab6a5ff74d7 Task-number: QTBUG-88791 Change-Id: I26d090818a17b194a4a206e184f406a43d259e3b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macdeployqt: Fix bug parsing otool output when deploying pluginsSeth Parker2021-04-271-4/+10
| | | | | | | | | | | | Fixes bug where a dependency would get skipped if otool didn't return the plugin lib as the first entry. [ChangeLog][macOS][macdeployqt] Fix plugin deployment bug caused by otool parsing Fixes: QTBUG-91644 Change-Id: Ibbfa40efcd046f386f9001f92bf956518176ecc7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Use QLibraryInfo::QmlImportsPath rather than Qml2ImportsPathUlf Hermann2021-02-091-2/+2
| | | | | | | | The "2" is meaningless, and we get a better name now. Task-number: QTBUG-85064 Change-Id: Ia4b98a3fdcd9aea3ac9f9009c6eecd64020f8c24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove macchangeqt from Qt 6Morten Johan Sørvig2020-10-051-32/+0
| | | | | | | | | | | | This is macdeployqt’s lesser known cousin, which implemented support for changing which Qt build an app would load. Today, this can be accomplished by changing the LC_RPATH loader command, or by writing a small script which automates the necessary otool usage. Change-Id: I01d8e3f89551d2becc2865be68728ca57870ac9c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix compile warning: QLibraryInfo::path instead of locationVolker Hilsheimer2020-09-281-4/+4
| | | | | Change-Id: I701bbffaea2ea4c9237980cf18383038045fe28e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Revert "macdeployqt: Don't copy .prl files into the Resources folder"Morten Johan Sørvig2020-09-221-8/+2
| | | | | | | | | | | | This was skipping other files from Resources/ as well, such as “en-GB.pak” and “QtWebEngineProcess”. This reverts commit aabba72f7965e06e2e6ed960d8cf8078249dac8c. Fixes: QTBUG-86759 Pick-to: 5.15 Change-Id: I6d27e3a32b479e1b6765783af71dd16826b181ca Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macdeployqt: Don't copy .prl files into the Resources folderAndy Shaw2020-08-031-2/+8
| | | | | | | | | | Since the prl files are now in the Resources folder for a framework, then we should avoid copying these as they are not needed in the deployed framework. Pick-to: 5.15 Change-Id: I0c728a647784b3d770bdd289c6deb8ff3d5ec9bd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macdeployqt: add Qt3D renderer plugins to deploymentPaul Lemire2020-06-291-1/+1
| | | | | | Change-Id: I25ce1be2f9b9d72e37513593ce2da3c7415f8ee2 Pick-to: 5.15 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Parse the otool line when it has ", weak" as part of the itAndy Shaw2020-04-171-1/+1
| | | | | | | | | | With Xcode 11.4, in some cases it will have ", weak" as part of the framework description when running otool. Therefore we need to account for this so it still sees it as a valid entry. Change-Id: I4018d42aa54f4e6434ee6defa119f3c913893819 Pick-to: 5.15 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAlexandru Croitor2020-04-151-1/+7
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: a bunch of .pro and configure.json file adjustments and some conflicting cherry-picks from dev -> 5.15 that are merged into dev again src/assistant/assistant/main.cpp Change-Id: I174c00b6a300c6d46c4e081bdcb2f15f23ae9ef2
| * [macdeployqt] Add option to include secure timestamp when signingMichael Brüning2020-03-311-1/+7
| | | | | | | | | | | | | | | | | | | | Apple now requires the developer to include a secure timestamp in the application's signature in order for notarization to succeed. Add an option to do this to macdeployqt. Change-Id: Ia884de80822661abcf65a287e4dc8429ec24b766 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Remove unnecessary includeLars Knoll2020-04-081-1/+0
| | | | | | | | | | Change-Id: Icea8323a6070f31234839ad56e36b73bcaec83bb Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-031-1/+1
|\ \ | |/ | | | | Change-Id: Iff33dc736e4844af2c1c8e227ef1145d77fc1d85
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-021-1/+1
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I7137cf8339bfe9fdcf4cb7cc695cb146aef410fb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-011-0/+24
|\ \ | |/ | | | | Change-Id: I674982e1a1f7d47bb1541f544ff1506a7cbe3a72
| * [macdeployqt] Use entitlements from file for signing if presentMichael Brüning2020-01-281-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the option to place a file with the suffix .entitlements into the Contents/Resources subdirectory of an application bundle. The entitlements listed in the file will be used for signing. Bundles that are depoloyed as part of another bundle (e.g. Helpers) can specify a separate set of entitlements from the main bundle by including an entitlements file of their own. Only the first entitlement file per bundle will be used for signing as the codesign tool will only use one entitlements file even when multple are specified. Task-number: QTBUG-77442 Change-Id: Iea356c1a70713f3a4b07281245a17fd7c87f6b11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-221-3/+11
|\ \ | |/ | | | | Change-Id: I5f916f50d54ba36f9dd5b6c2c9aa6ce7fa2172bb
| * macdeployqt: Add option for enabling hardened runtimeMorten Johan Sørvig2019-10-171-3/+11
| | | | | | | | | | | | | | | | | | | | Hardened runtime will be required when code signing for app notarization, at some point in the future. [ChangeLog][macdeployqt] Added "-hardened-runtime" option to support app notarization. Change-Id: I4a3686ae01366c1e78372bb3b5e725db8e8061fd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into devSimon Hausmann2019-10-041-5/+6
|\ \ | |/ |/| | | | | | | | | | | Conflicts: .qmake.conf src/windeployqt/main.cpp Change-Id: I446b51332eaaec91f502fcc2ceca52291b0b0468
| * Fix Qt6 buildAlexandru Croitor2019-07-291-5/+6
| | | | | | | | | | | | Change-Id: Ie413ca2e2f81ac0e92628ffd2f3e93047a91bd0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Eradicate the last Java-style iterators and mark the module free of themMarc Mutz2019-07-121-5/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and of QLinkedList. The change in QDesignerAbstractPropertySheetFactory is straight-forward. The rest are little buggers: - In macdeployqt, the code iterates inside an if. Weird, but portable. - In CppCodeParser, it's still somewhat harmless: just a call to std::remove_if to avoid running into quadratic complexity, even though the original loop had a good idea of iterating backwards, saving at least some copies in the process. Need to take care there that we continue to find the _first_ main.cpp, not the last, so add a check for mainCpp.isEmpty(). - In QtGradientStopsModel, however, needed to work around the absence of QMap::rbegin()/rend(), and it shows why they're missing: QMap's funky op* makes it impossible to just use std::reverse_iterator to do the heavy lifting. Use the recently-added QKeyValueIterator to get an approximation. I say 'approximation', because that one lacks operator->, so we need to use (*it).first, which brings back memories of Qt 2's iterators... Change-Id: I051e64b8d36b04ed2e7cf7695d9b797f08efaccb Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove usages of deprecated qSortSona Kurazyan2019-06-201-1/+1
| | | | | | Task-number: QTBUG-76491 Change-Id: Ied0ecb369697b3cc01fef7a2d91aa3940cdcd771 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-021-0/+10
|\ | | | | | | Change-Id: Id06ccca252abc84720b18909f55019266426eb97
| * macdeployqt: Deploy the platforminputcontext plugins and vkb pluginsAndy Shaw2019-02-271-0/+10
| | | | | | | | | | | | | | | | | | When the gui module is used then the platforminputcontext plugins should be deployed. Additionally if that includes the virtualkeyboard plugin then those should also be deployed with it. Change-Id: I2787792e91a9cfe3603a4e2e29273f682942bf36 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-191-1/+2
|\ \ | |/ | | | | Change-Id: If9dc5f167e9471b4633db73ae5a1cb8c1312b478
| * macdeployqt: Deploy QtSpeech tts pluginSamuel Gaist2019-02-121-1/+2
| | | | | | | | | | | | | | This patch adds deployment of the QtSpeech plugins. Change-Id: Ifc55f40cdc0ed6fd9444993c04f4d76249649daf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Avoid considering symlinks as bundle librariesFilipe Azevedo2019-01-071-4/+5
| | | | | | | | | | | | | | They already point to a regular file that will be hit at some point. Change-Id: Iaa4818090b41bf5a2ecea29f4ae5a8b4f5641059 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-031-1/+2
|\ \ | |/ | | | | Change-Id: Icff4035509596e277f4612cdfa9363cdaa5371bf
| * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-271-1/+2
| |\ | | | | | | | | | Change-Id: I59f4e4643896a857f30a50fb6d0758576e488e21
| | * macOS: Don't overwrite the dylibs with the DWARF copyAndy Shaw2018-10-231-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-57265 Change-Id: I54320275aa614e76b65fdc82bb87a2850648bbdc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Add option to specify qmlimportscanner importPathsIlya Bizyaev2018-10-311-2/+5
|/ / | | | | | | | | | | | | | | | | | | This patch adds a new option, -qmlimport, which enables macdeployqt to pass custom QML module import paths to qmlimportscanner. Fixes: QTBUG-70977 Change-Id: I39edfb88e48e05c42c6c4690efa3e728046baff3 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-111-16/+29
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/macdeployqt/shared/shared.h src/qdoc/sections.cpp Change-Id: I708a20d0061e82b99ecced7d24e7a2b8c475f706
| * macdeployqt: Deploy plugins when -no-framework is usedAndy Shaw2018-09-031-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When it was detecting the plugins to deploy, it would only work when Qt was configured as frameworks. This ensures that this case is accounted for. [ChangeLog][macdeployqt] Now deploys plugins when Qt is configured with -no-framework Fixes: 5.11.3 Fixes: 5.12.0 Task-number: QTBUG-68823 Change-Id: I05997150328a93c15609abc1759846b7a184f82a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | We no longer need a workaround to include PrivateWidgetsAndy Shaw2018-07-051-25/+0
| | | | | | | | | | | | | | | | | | | | The dependencies are in place so it is no longer necessary to include PrivateWidgets manually as it is correctly included automatically when necessary. Task-number: QTBUG-69299 Change-Id: I7cdebf8b3b4375b6f6c9360eb20676f406456ba6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | macdeployqt: Correctly handle bundling debug Qt libraries with @rpathTor Arne Vestbø2018-03-231-25/+35
|/ | | | | | | | | | | | | | | | | After rpath support was introduced, we lost the ability to explicitly bundle the debug version of the Qt libraries. We now make sure to always run install_name_tool so that the library dependencies are updated to the correct version, even in the case of @rpath. After 27239f4fcfa6f64d in qtbase, we also now directly link to the debug versions of Qt libraries when building the application in debug mode, so the code has been taught to handle this case, by not assuming that the library suffix is determined only by the -use-debug-libs command line argument. Task-number: QTBUG-48800 Change-Id: Ia7e058fa4d041fa1a7b8bdedc594750ee1f4cbfd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-1/+7
|\ | | | | | | Change-Id: I1b23f25c7add7a9bcb97c91696bea58a8f9c3b42
| * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-021-1/+7
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/qtattributionsscanner/main.cpp Change-Id: Ic509d457547ec64122b17511563de5ea3e1b1b44
| | * macdeployqt: Implement selection of file system for .dmg fileSamuel Gaist2018-01-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With macOS High Sierra, Apple machines using SSD see their file system changed for APFS automatically. hdiutil by default uses the current file system to build the dmg file which in this case makes them unusable on older version of macOS that don't have support for APFS. This patch adds an additional option to macdeployqt to select the file system to use when building the .dmg. It defaults to HFS+ which was the official file system used until now for all currently supported version of macOS. [ChangeLog][macdeployqt][feature] Added support for selecting the file system type to use when building a .dmg file. Defaults to HFS+ to support a wider range of macOS versions. Task-number: QTBUG-65844 Change-Id: Ic66856344f96c6536b224d13d309715b34eb0874 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | | macdeployqt: Handle deployment of QtWebView's pluginsChristian Strømme2018-01-271-0/+14
|/ / | | | | | | | | | | | | This change makes sure that the plugins are deployed correctly Change-Id: Ia967525bcbdf97f86385b68e5a4039f5b5f8ee20 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>