aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove `import qbs` from all project filesDenis Shienkov2021-08-0430-44/+0
| | | | | | | | | | | | | | ... because we don't need in this inclusion at all. But for some cases it is impossible to remove that inclusions (and even to move on next lines) because then the some tests are failed by unknown reason. For those tests were added the following comments on the inclusion lines: `// FIXME: Don't remove this import because then the test fails!` Change-Id: I9153fd0e38b94af08168e499ee46a23889ee4d73 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QtScript: set cxx standard to c++17Ivan Komissarov2021-08-023-4/+0
| | | | | | | The code was ported to c++17 so there is no reason to use c++14. Change-Id: Ie57d660c92f17a6ae1f25ede564b7da494306fe2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qt6: fix build with Qt >= 6.1Ivan Komissarov2021-07-313-5/+15
| | | | | | | | | | | syncqt.pl was moved to the libexec directory This change requires Qbs 1.19 when compiling with Qt >= 6.1 (but not with earlier versions) to work as Qt.core.libExecPath was only introduced in 1.19. Change-Id: Ifa998ca5ee536d63d625c0647eaab74120fdda82 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Build scriptengine as a shared objectIvan Komissarov2021-07-305-51/+23
| | | | | | | | Otherwise, we have an ODR violation when global static object is instantiated twice - one in qbscore and one in tst_language. Change-Id: Ib27d403da70ed16be3eb7ca2d979a67ae8a2259e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* cmake: fix QtC buildIvan Komissarov2021-07-291-2/+0
| | | | | Change-Id: I4f5ac22c5a58af984598d772c4f95cf1c9a465cf Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Always build with project file updates supportIvan Komissarov2021-07-278-41/+10
| | | | | | | | Since QtGui dependency was removed, there is no reason not to Change-Id: Ib8975451f3c36a77e22a077bba18b5659f414767 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Do not modify the global state after running providerIvan Komissarov2021-07-275-51/+36
| | | | | | | | | | | Instead, cache the result of the provider in a QHash using the provider/ module name and config as the key. This allows to have a clean state for each Depends item, so the order in which they appear does not influence which modules are generated. This is required for the later patch that implements "named" providers. Change-Id: Ia395cc94430763ed33d7ff5f2ee39e36d64f195e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Wrap ModuleProviderInfoList in a structIvan Komissarov2021-07-2712-23/+38
| | | | | | | Required for ongoing patchsets - later patches will add more members. Change-Id: Iad57e17139b104e55221059eedb8c0f057f6f4e0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use the fallback mode from parametersIvan Komissarov2021-07-271-1/+3
| | | | | | | | | | | | ... when looking for transitive deps It makes sense to use the same logic for both scoped and fallback providers when looking for transitive deps. In any case, providers should have been run during normal dependency search and we should not execute any new providers here. Change-Id: I2053fe84adab327b8ab5fcb414ce53d7cf83bdb7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Long live Digital Mars toolchainDenis Shienkov2021-07-277-0/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an experimental support for the Digital Mars C/C++ compiler for Windows: * https://www.digitalmars.com/ This compiler is only distributed for Windows host platform, but allows to create the binaries for Win32, Win16, DOS32 and DOS targets. This patch implements only the Win32 targets and has the following limitations: * Support for precompiled headers is not implemented yet (but which is supported by the compiler). * There is no support for the CI autotests due to the fact that the compiler has the following restrictions: - it needs a separate masm386 assembler. - it needs a special format of DLL library sources (required the DLL main function). - it needs the `kernel32.lib` to be always explicitly linked. - and, maybe other unexpected stuff. The following features are currently supported: * Compiling a source files in the C or the C++ mode. * Compiling the source resource (RC) files. * Creation of an applications (both console and GUI). * Creation of an dynamic (DLL) libraries with its import files. * Creation of a static libraries. Task-number: QBS-1598 Change-Id: I5a6ac05a7e7513a1c6d2403db037c309b0f12b90 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Give more details on a property values mismatchChristian Kandeler2021-07-221-2/+17
| | | | | | | | The user might not remember which properties were originally passed on the command line, so show them if they don't match the new ones. Change-Id: I41fbfc84832c0bf56a950a6b546bccca50c88564 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Add hashing functions for QVariantIvan Komissarov2021-07-022-0/+74
| | | | | | | | | | Required for faster hash lookups of the providers by their config. Only small subset of types included in the hash function - types that can appear in Qbs properties Change-Id: I0ef80c7c4117b048596f307dcccb0a94d030b48a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add hashing functions for tuplesIvan Komissarov2021-06-232-0/+59
| | | | | | | | Also, add hashRange function that allows to implement hashing functions for complex containers such as vectors and maps. Change-Id: Ib0af1e15bf59b5f845eafae6424afb30b9702db4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Implement Persistence::store/load functions for tuplesIvan Komissarov2021-06-221-0/+27
| | | | | Change-Id: Idf14c56e88624efe63cff0a502d6d46f7fce49c8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* cmake: fix build on mac with unit testsIvan Komissarov2021-06-151-1/+1
| | | | | | | Foundation framework should be public dep Change-Id: I11160159ae28dbc5b34b175aabcbd840e56f5047 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove some unused codeIvan Komissarov2021-06-031-11/+0
| | | | | | | This amends 2f8a1b03cb047d95b74aab4301f78eaf7cbdee12. Change-Id: Idd894af891731d048d9f8c48d7fd2dcd2c43837b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Move provider instantiation to a separate functionIvan Komissarov2021-06-022-39/+65
| | | | | Change-Id: I9d9bb55c4341405d488a9d96e8c91cc90b719c4f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Extract provider file search to a separate functionIvan Komissarov2021-06-022-80/+93
| | | | | Change-Id: I123b6a524cba1e250a70859b2529df7aba6e6a51 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Long live COSMIC toolchain for COLDFIRE architectureDenis Shienkov2021-05-311-2/+5
| | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Also the COSMIC toolchain has been added to the Github CI. Fixes: QBS-1648 Change-Id: I39dfeef1c5696e69bed8969890cf4f8fdb3c2741 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for HCS12 architectureDenis Shienkov2021-05-301-1/+3
| | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Also the COSMIC toolchain has been added to the Github CI. Fixes: QBS-1640 Change-Id: I7ab0c8099437fce962632ff87177e37fd04f82d2 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for HCS08 architectureDenis Shienkov2021-05-291-1/+4
| | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Also the COSMIC toolchain has been added to the Github CI. Fixes: QBS-1641 Change-Id: I755fcd3b2a89d0d40fda8b7f9da3d72ee1918df5 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for STM8 architectureDenis Shienkov2021-05-281-1/+3
| | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Also the COSMIC toolchain has been added to the Github CI. Fixes: QBS-1639 Change-Id: Iffba0bc550c5d168fb453c7a325b2c9be06d4195 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for STM32 ARM architectureDenis Shienkov2021-05-286-0/+244
| | | | | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Right now this patch implements support for ARM architecture for STM32 microcontrollers. But in the future it is simple to extend it and for other architectures (e.g. for STM8, HC08 and so on). Also the COSMIC toolchain has been added to the Github CI. Change-Id: Iabdfd61cc427155117730db46e067004ceb07102 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Add profiling timer for module providersIvan Komissarov2021-05-202-0/+7
| | | | | Change-Id: Ia1c79675a20fb3d97ae2a1aa65091fb87a03cc21 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Move module providers code to the separate classIvan Komissarov2021-05-199-211/+411
| | | | | | | | | | | | | ModuleLoader is too big and more logic will be added to module providers, so it make sense to extract some code to a separate class. Unfortunately, it is hard to break the dependency between types completely - it is tempting to pass ModuleLoader::ProductContext into new class functions. Alternative would be to pass all necessary data via function parameters which will make the code less readable. Change-Id: Ida61192348ef7db89b21f0d58f05e61969e2d01c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix using extraSearchPaths stackIvan Komissarov2021-05-184-16/+25
| | | | | | | | | | | | | | | | | | | | | We push productContext->searchPaths via SearchPathsManager in the setupProductDependencies() and then add some paths via providers. This results to the fact that SearchPathsManager pops providers path but not the one added in setupProductDependencies(). Fix that by restoring the state completely where it was before resolveDependencies() call. This is fine, since providers paths are also added to productContext->searchPaths and second Dependency resolution pass will use it. This allows to get rid of the newlyAddedModuleProviderSearchPaths which seems to be needed only to count elemets in the stack correctly. This is implemented be remembering the extraSearchPathsStack.size() in SearchPathsManager object. Change-Id: I8f2352e652d27f2a0b770c2a026f115e5a4ded9a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* cmake: Add Qt6 buildIvan Komissarov2021-05-184-9/+14
| | | | | | | Also, switch Linux CMake job to build Qbs with Qt6 Change-Id: I188845a7cc086a8c87dbb7445ea95f99b26d94ef Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* cmake: Add bundled QtScript buildIvan Komissarov2021-05-183-1/+368
| | | | | | | | | | | | Also, make QtScript dependency optional like we do in the Qbs build. Tested on macOS, Linux and Windows. CMake 3.15 is now required for the CMP0092 policy which removes default warning flags from CMAKE_CXX_FLAGS. Change-Id: I199fb802d5ad72d1ac8d5a89c05372c43581c95d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use smart pointers in Qt scannerIvan Komissarov2021-05-131-7/+6
| | | | | Change-Id: I5ed9a9d97eeabff70b5a67f3e7fcfbe49fb13675 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Do not use manual memory management for d-pointersIvan Komissarov2021-05-1316-52/+44
| | | | | Change-Id: Ifde88ede2f9ac65f2406ef62b4115534f6fe7135 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Use std::unique_ptr in BinaryFile and TextFileIvan Komissarov2021-05-132-24/+8
| | | | | Change-Id: I74fae5409155eda7bbaa762bfc55c4caf3b89790 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Use std::unique_ptr in qbs::Internal::ProcessIvan Komissarov2021-05-131-10/+3
| | | | | | | Allows to make dtor trivial Change-Id: I08e8ab2559a6b6314c6bbb523869deb9d20f53d9 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Replace "product" variable by "exportingProduct" in Export itemsRaphael Cotty2021-05-073-7/+8
| | | | | | | | | | | | "product" variable in an Export item will point to the "importingProduct" in 1.21. This patch prepares the change by replacing "product" by "importingProduct" when necessary. Task-number: QBS-1576 Change-Id: I215d46484754e76771039a750dc4beb33d8a0c9c Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge branch '1.19' into masterIvan Komissarov2021-05-051-1/+1
|\ | | | | | | Change-Id: Id2691bd6a49ca6c2886cf5f460351e3d1daad9e6
| * Fix compiler warning on MSVC64Orgad Shaneh2021-04-281-1/+1
| | | | | | | | | | | | | | C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data Change-Id: I8bc3f90bc27f7142f6095123e30b956f07b1b618 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Update QtScript submoduleChristian Kandeler2021-05-031-0/+0
| | | | | | | | | | | | | | To be able to build against Qt 6. Change-Id: I9db65a214252b0378511800e09ab9711b44044e2 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Merge branch '1.19' into masterIvan Komissarov2021-04-2410-31/+172
|\| | | | | | | Change-Id: Ic6087168a1d93c2a2b46de825f5c3b9655634e8e
| * msvc: Pass -vcvars_ver to vcvarsall.bat when detecting environmentIvan Komissarov2021-04-235-8/+41
| | | | | | | | | | | | | | | | | | This is required to properly support multiple MSVC toolchains (also now supported). Fixes: QBS-1498 Change-Id: I1274379496d47ebf7842eaed05f498b7af111b5b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Use binary search in Set::find()Ivan Komissarov2021-04-212-2/+17
| | | | | | | | | | Change-Id: I5ed154633233dfeedf6b69b52fc5339fef3a956a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix build with older compilersIvan Komissarov2021-04-201-1/+1
| | | | | | | | | | | | | | | | This amends d38fd9fa9. Change-Id: I55661497de04749dfd27134ef7c8c9cc436053e2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * Allow to specify windowsSdkVersionIvan Komissarov2021-04-193-13/+31
| | | | | | | | | | | | | | | | | | Previously, it was not possible to use older windows SDK version. Fix that by introducing the new property that is passed to vcvarsall.bat Task-number: QBS-1498 Change-Id: Ic526eabb8ff82ddd85c93e90fd20421595a121f4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix detecting MSVC via Probe when multiple versions are presentIvan Komissarov2021-04-192-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, Qbs iterated over different versions in the ascending order. During the setup-toolchains this means that the newest one will be written in the settings as only the last one is actually written. When running ClBinaryProbe, the first one (i.e. the oldest was picked up) which did not work well with vcvarsall (without -vcvars_ver parameter, it uses the newest one). So, pick up the newest compiler both when running setup-toolchains and when detecting via Probe. Task-number: QBS-1498 Change-Id: Ib1b433ca7e17747dee986ba383a3c01ee91851fb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * update dmgbuild to master branchIvan Komissarov2021-04-191-13/+66
| | | | | | | | | | | | | | | | | | | | This contains fixes for Python 3.9 Change-Id: I087e21a4208c9091aab4cd9fcb9b3c2d1bf9945a Fixes: QBS-1642 Reviewed-by: Max Bespalov <bespalov.maxim.a@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Do not try to generate FwdHeaders when not using bundled Qt.ScriptIvan Komissarov2021-04-121-0/+7
| | | | | | | | | | | | | | | | | | Apparently, if the submodule is not present, the Rule is not invoked at all, but it fails on Windows when submodule is there but Perl is not found in PATH Change-Id: I3edb4d3679f4528f05996c630c55c052c8202369 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | qbs-config: Add convenience command for adding a profile in one goChristian Kandeler2021-04-093-7/+38
|/ | | | | | Task-number: QTCREATORBUG-25463 Change-Id: I2d18ea5f7d53efc0762d34cf4845b49533ca6fbf Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* qt6: do not use QHash in adjustDefiningItemsInGroupModuleInstancesIvan Komissarov2021-03-191-1/+1
| | | | | Change-Id: Ibee969b9811e964569aa437e15e7c239f41d5918 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Remove QTextCursor API from ChangeSetIvan Komissarov2021-03-175-31/+3
| | | | | | | | | | | It appears that neither Qbs not QtCreator use that API. Also, remove QtGui dependency in corelib and enable project files updates by default. Change-Id: I2eb90d0a7bc74bca4f1007eb63164111f52adb1b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* qt6: Fix installing Qt on LinuxIvan Komissarov2021-03-171-2/+9
| | | | | Change-Id: Id9aa640f013271ff9f3a7f4e0cd70f974efcc116 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Do not use QTextDocument for project file updatesIvan Komissarov2021-03-172-21/+8
| | | | | | | | This class is used simply to include an empty line before Group we are removing. Change-Id: Ie7a5224c1f29dd67615cea70667a6c91cc2fee82 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* qt6: do not use QString::fromUtf16(ushort*) overloadIvan Komissarov2021-03-031-2/+2
| | | | | | | This amends 05b74ff72. Change-Id: I18b8006d246355a49b669b097b1e14d776f0cbac Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>