aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* setup-qt: Fix detection for 32-bit MSVCChristian Kandeler2019-02-131-1/+3
| | | | | | | | The installer directory names do not contain the architecture in that case. Change-Id: I072df4260eefff7dd15d90770c73e1187e7f72cc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Set the default platform toolset for VS 2019 to v142Joerg Bornemann2019-02-121-3/+8
| | | | | Change-Id: I1fb773d9aaa527f4bead263626c604a47d9f4568 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Detect Qt via a module providerChristian Kandeler2019-02-1239-4687/+368
| | | | | | | | | | | | | | | | | Creation of qbs modules for Qt is now done on demand during project resolving. The qmake executable(s) are looked up via PATH or taken from the Qt.qmakeFilePaths provider property. As a result, Qt projects can now be built without a profile. The qtprofilesetup library is gone; its code is now in the module provider. I kept the C++ -> JavaScript conversion as straightforward as possible and mostly resisted the temptation to "optimize". The setup-qt tool still exists and mainly sets Qt.qmakeFilePaths. [ChangeLog] It is no longer required to call setup-qt before building Qt projects. Change-Id: I5b7e4711ec47b996911c499f29d8129d90e4731e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Module providers: Always remember that a provider was runChristian Kandeler2019-02-111-2/+6
| | | | | | | | ... even if it did not succeed. Otherwise, other products will try again, even though we know it won't succeed. Change-Id: I6c4f14df33ecbc9b38ec8cae7e1c2d6bfc99816a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Module providers: Fix some change tracking problemsChristian Kandeler2019-02-1111-31/+63
| | | | | | | | | | | - We must not remember our temporary files. - We need to use a different reference time stamp for the created modules. - Collecting the results of File.exists() & friends can lead to false positives, so we disable it for now. Change-Id: Id64685b510606f1991e83eb825c36a1b3ec4a4e1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Qt: Allow users to explicitly tag files as mocableChristian Kandeler2019-01-291-1/+11
| | | | | | | | | This is helpful for declaring a QObject-derived class via a macro, in which case the moc scanner will not help. Fixes: QBS-1410 Change-Id: I19ee30eac670228686b5528888159220cf39abd3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ModuleLoader: Do not validate property bindings in non-present modulesChristian Kandeler2019-01-241-0/+21
| | | | | | | | | | The check for the "not-present" condition was not thorough enough: If a module was successfully loaded, but its validate script failed, then we'd still check property assignments if they happened from within a higher-level module instance. Change-Id: I9d7281eb5603deaa04db008ab9fc340847d83151 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Introduce module providersChristian Kandeler2019-01-2327-24/+460
| | | | | | | | | | | | | | | | | | | | | | If a dependency is not found, we now search for a matching module provider that can generate one for us. We also provide a generic fall-back provider which uses pkg-config to locate the dependency (but could be extended to incorporate other methods in the future). This is the most important part of this change for practical purposes, as it makes hundreds of popular libraries available for use in qbs projects without users having to write any boilerplate code. In a future patch, a module provider could also be used to implement the functionality of the qtprofilesetup library, relieving users of the need to create a profile for building Qt applications. [ChangeLog] The Depends item now falls back to pkg-config to locate dependencies whose names do not correspond to a qbs module. Fixes: QBS-1107 Change-Id: Ifd4f05c237cf58cd9fe707c3da648d3dbb33e82b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not ignore file dependencies in the Scanner itemChristian Kandeler2019-01-186-17/+27
| | | | | | | We used to look only at artifacts when scanning recursively. Change-Id: I39f968c05dd3e6af362bf3bb98380814b01de172 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* C++ scanner: Register for rc filesChristian Kandeler2019-01-171-1/+1
| | | | | | | | Windows resource files can have #include statements. This was either overlooked from the beginning or we broke it at some point. Change-Id: I3483e8caf352f557768429cf3c4f9b3293fec38d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Scanner item: Do not re-use the searchPaths value for other inputsChristian Kandeler2019-01-154-3/+21
| | | | | | | | | | | For the C++ scanner, the search paths depend on module properties, not on the actual input file. This assumption does not generally hold for Scanner items, which was not taken into account when this feature was originally introduced. As a result, the first input to get scanned by a Scanner item erroneously provided the search paths for all others. Change-Id: I0159d826dac1f5605494d54cfe96fe468044ca34 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Qt support: Use gold linker if Qt is configured that wayChristian Kandeler2019-01-1410-0/+19
| | | | | | | Fixes: QBS-1421 Change-Id: I1f6d749eba38c9a4caa60341f19ee5e89e89d28a Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Darwin support: Work around issue with canonical pathsChristian Kandeler2019-01-111-1/+10
| | | | | | | | | | | When built with Qt >= 5.12, we pass a canonical output directory to macOS' actool, but amazingly, it somehow manages to list the file paths it created there in the non-canonical version. So we need to re- canonicalize these paths. Fixes: QBS-1417 Change-Id: I2cfcf7cdef0a16a1e69e0320651eabf4f3355307 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.12 into masterChristian Kandeler2019-01-113-2/+6
|\ | | | | | | Change-Id: Id535625f198f10a920f32e198d39b38d46b35668
| * ModuleLoader: Fix possible crash in verbose mode1.12Christian Kandeler2019-01-071-2/+4
| | | | | | | | | | | | | | | | The assumption in the code that a value is always a JSSourceValue is not (anymore?) true. Change-Id: Ie1056913d4817776f5ce483f4fb0f60144cda9c6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Make setup-toolchains and setup-android behave like setup-qtChristian Kandeler2018-12-182-0/+2
| | | | | | | | | | | | | | | | | | | | | | ... with regards to handling dots in the profile name. We don't allow dots to appear in profile names. setup-qt auto-replaces them with hyphens, while setup-toolchains and setup-android did not. Now they all do. Fixes: QBS-1413 Change-Id: I567e07e64a5e18fe50ead700d3584d60da276dae Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Do not use the PathProbe.platformSearchPaths inside our project sourcesChristian Kandeler2019-01-091-1/+1
| | | | | | | | | | | | | | | | | | The qbs project file must work with older qbs versions, so we can't use newly introduced properties right away. This partially reverts d6345df9d5. Change-Id: I3074aa1460e9f8897820be5b6f70b61636b14be5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | ModuleLoader: Fix compiler warningChristian Kandeler2019-01-081-1/+1
| | | | | | | | | | | | | | | | | | Recent GCC warnings emitted a warning about an unneeded copy in a template. Fix this by using std::forward(). Change-Id: I9b52c10d19a09c169d7d354aa6b79c51874f74e9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | SetupProjectParameters: Remove invalid assertionChristian Kandeler2019-01-071-5/+0
| | | | | | | | | | | | | | It prevented users from overriding variant properties. Change-Id: I37c3e0a127048d7a6c6d396b20b424003ac25903 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Add atEnd() function to the Process serviceOla Røer Thorsen2019-01-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to use readLine in a while loop until the complete stream is read, even when reading empty lines. [ChangeLog] Added atEnd() function to the Process service, to make it possible to use readLine() in a while loop until the complete stream is read. Change-Id: Ie5f047651977195d6a93c4575bd7a8796b83ab5d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add FileInfo.canonicalPathJoerg Bornemann2018-12-201-0/+13
| | | | | | | | | | | | | | | | | | [ChangeLog] Added the canonicalPath() function to the FileInfo extension. Task-number: QBS-742 Change-Id: I8490b1bbdb3ac4ce84b80e82ca9f37bd2816e150 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-12-172-4/+5
|\| | | | | | | Change-Id: I44f8e2c5f3fbe8fc67deada65a4136257572239e
| * Fix bogus error about duplicate source filesChristian Kandeler2018-12-132-4/+5
| | | | | | | | | | | | | | | | | | There is no conflict if the same file is pulled in both as a target artifact of a module and a normal source file. Fixes: QBS-1416 Change-Id: Ic7467af5a8728ebb1540381c845ffc0f40e06a9c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Rename PathProbe.pathPrefixes and PathProbe.platformPaths propertiesIvan Komissarov2018-12-101-1/+1
| | | | | | | | | | | | | | | | | | The naming was misleading - prefixes had the same logical meaning as platformPaths, despite the fact completely different PathProbe.pathSuffixes property exists. Change-Id: Ie593b5e03d27de4f8aafed821a3b37cc1b3b0b9e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Support big Qt resourcesJoerg Bornemann2018-11-302-6/+63
| | | | | | | | | | | | | | | | [ChangeLog] Introduced the property Qt.core.enableBigResources for the creation of "big" Qt resources. Change-Id: Ic87aa70132240e67243c1cbe137583a371558261 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | setup-android: Complain about unknown optionsChristian Kandeler2018-11-281-0/+2
| | | | | | | | | | | | | | | | | | ... instead of silently ignoring them. Fixes: QBS-1412 Change-Id: If6687372132a03b3ca04194f7525856eb82b8bb7 Reviewed-by: Erik Schilling <ablu.erikschilling@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Qt.android_support: Fix check for finding the main binaryChristian Kandeler2018-11-281-7/+17
| | | | | | | | | | | | | | | | | | Libraries from the app product should get higher precedence than those from dependencies. Change-Id: Id8bf723fd09e7a798e554f4dbaaae3c73815c1d4 Reviewed-by: Erik Schilling <ablu.erikschilling@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Properly support building Qt apps for AndroidChristian Kandeler2018-11-164-0/+296
| | | | | | | | | | | | | | | | ... via the androiddeployqt tool. Fixes: QBS-991 Change-Id: I4a3abe977fee6a9d1657a4fd6c1b43709429da9f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-11-151-0/+3
|\| | | | | | | Change-Id: I4599ba16caa974c98f694d2d0249bd9522d70b69
| * Fix PlatformToolset for VS 2017 projectsv1.12.2Joerg Bornemann2018-11-151-0/+3
| | | | | | | | | | | | | | | | | | | | The default "platform toolset" is v141, while the VS major version is 15. This case is now hardcoded, because I fail to see a pattern in this nonsense, sorry. Task-number: QBS-1371 Change-Id: I69194a6cbbd072d364b13e69178363bd90632346 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-11-121-0/+2
|\| | | | | | | Change-Id: I0efa484c5010607150e65d9401a0a30781c8c1fb
| * Fix qbs buildChristian Kandeler2018-11-121-0/+2
| | | | | | | | | | | | | | Don't try to bundle libraries of Qt modules that don't have any. Change-Id: I160d5b030db5ecbfa1b8eebb3babdc6ec7f41883 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Fix pluginSupport autotestChristian Kandeler2018-11-121-0/+23
| | | | | | | | | | | | | | | | | | Our test machine does not have the image plugins we hardcoded, so be more flexible. This also tightens the test a bit. Change-Id: I0cc49b3066909ac3e4ec387515e689a00042f4d5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Qt support: Allow users to pull in plugins by typeChristian Kandeler2018-11-0914-10/+136
| | | | | | | | | | | | | | | | | | | | ... and properly set the default values. Fixes: QBS-1409 Change-Id: Ib8f3573fcb48d395d9212ac4b01e5caf910c575f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix qbs buildChristian Kandeler2018-10-311-1/+2
| | | | | | | | | | | | | | Was broken by 38c897a0d4. Change-Id: Id02551fa9e7424075c5a708c3c06a3ce2be5f0e9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add "show progress" support on WindowsAndreas Zieringer2018-10-302-6/+9
| | | | | | | | | | | | | | | | Should work with all console types. Fixes: QBS-1407 Change-Id: I5144469d70d79a263f9960092abda9a3d83462a1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-10-262-15/+38
|\| | | | | | | Change-Id: I5cf41522f027adac0889dc1df96613012216f092
| * qtprofilesetup: Support platforms where qtmain is called qt5mainChristian Kandeler2018-10-221-13/+28
| | | | | | | | | | | | | | Fixes: QBS-767 Change-Id: I5b00c7d13d59cc4f461b0806f22536e595c0a266 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * qtprofilesetup: Call fillEntryPointLibs() only when necessaryChristian Kandeler2018-10-221-2/+8
| | | | | | | | | | | | | | | | | | | | This function is parameterized by build variant. It should only be called if libraries for the respective build variant are present in the Qt installation. Change-Id: Ie43958c54e16bdfedf60a8c0339098eb8d694165 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Do not try to evaluate the properties of non-present modulesChristian Kandeler2018-10-221-0/+2
| | | | | | | | | | | | | | It's unnecessary and potentially harmful. Change-Id: Iff5a9a52a7aeb518617104c5eaa41cfeededbea5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Prevent "dynamic" values from getting assigned to command propertiesChristian Kandeler2018-10-251-1/+3
| | | | | | | | | | | | | | | | | | | | Values such as artifact objects are not plain data and we therefore must not attempt to make deep copies of them. Catch attempts to assign them to command properties. Fixes: QBS-1404 Change-Id: I1fa02720a3543cd8e2c734ed9437d31b5a573d57 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Executor: Increment progress bar after a rule's transformers are doneChristian Kandeler2018-10-224-2/+30
| | | | | | | | | | | | | | | | | | ... rather than after the prepare script has run. This gives a more realistic estimate on average. Fixes: QTCREATORBUG-18523 Change-Id: I61214903936f964e060b92238d5644f0a8414539 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-10-195-13/+29
|\| | | | | | | Change-Id: Id6014173f52d07f1e7c15b19ddf3876bc95708a5
| * qmake build: Opt out of qtquickcompiler functionalityChristian Kandeler2018-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qtprofilesetup library contains a resource file with JavaScript sources. Now if "CONFIG += qtquickcompiler" is set globally, as it happens by default in Qt Creator, qmake believes that we want to compile the js files, which leads to disaster. Arguably, Qt should ignore the qtquickcompiler CONFIG value if the product does not pull in QtQml, but until that happens, let's force- disable the qtquickcompiler. Fixes: QTCREATORBUG-21340 Change-Id: If4802277ab66b550b0c88e5678cadf59a32e68d2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * qtprofilesetup: Understand the mkspec prefix "mingw"Christian Kandeler2018-10-184-13/+27
| | | | | | | | | | | | | | E.g. Fedora provides "mingw-w64-g++". Change-Id: Ife197baa8ddd1b364025056b1ec7895a0b60d5dc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-10-127-42/+191
|\| | | | | | | Change-Id: I96c735aeda89e02f1fa9107ecfc10ebf4b554dbc
| * libqtprofilesetup: Try to find the library when .prl file is missingChristian Kandeler2018-10-121-10/+27
| | | | | | | | | | | | | | Task-number: QBS-1399 Change-Id: Icf2cf11cf50560cc2229240a592d477a39b69d7a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Remove bogus assertion from Properties item handlerChristian Kandeler2018-10-111-1/+0
| | | | | | | | | | | | | | | | | | It does not appear to serve a purpose, and it prevented deriving from the Properties item. Change-Id: Icf71e3358299ea7a0f697637967e65dd0fb9b743 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Android support: Adapt to changes in newer revisionsChristian Kandeler2018-10-111-4/+25
| | | | | | | | | | | | | | | | Revision 17 dropped some architectures, revision 18 removed GCC. We also missed some earlier changes to clang-related paths. Change-Id: Ie2fa1891f7f4de28e18ea6caadce9eac964bb523 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * libqtprofilesetup: Properly handle quoted paths in .pri filesChristian Kandeler2018-10-111-1/+29
| | | | | | | | | | | | | | Fixes: QBS-1399 Change-Id: I52e93a1d80203337c9cedbc09386b0c6c5334f91 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>