Commit Graph

63 Commits

Author SHA1 Message Date
Christian Stenger
8c7c655356 SdkTool: Fix build with Qt5
Amends c246caf7a9.

Change-Id: I5835751f7312acbe8f171c3e61d4836111849421
Reviewed-by: hjk <hjk@qt.io>
2022-04-05 06:24:20 +00:00
Marcus Tillmanns
c246caf7a9 sdktool: Change tests to use QTest
* Moved all sdktool code into a static library, allowing us to link against the actual functionality in unittests
* Convert all tests to proper unittests

Change-Id: I5c93be0faecbd8b68e0923655483c870a2f408b5
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 14:27:46 +00:00
hjk
a8c36bd547 SdkTool: Change style of test initialization for devices
Easier to see what's going on and easier to extend.

Change-Id: I3c95d4b56fef8ae9dfd017ad98f9c12dbeae2242
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-28 11:17:53 +00:00
hjk
79726e52d6 SdkTool: Add --builddevice option
Useful in a docker context.

Change-Id: I297654a9d65da2ce7d89b4ed8322d2ea0c80b3a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-25 09:32:35 +00:00
hjk
b178e407a4 SdkTool: Make auto test easier maintainable
Adding new kit items so far required touching test code in several
places.

Also, use more but simpler individual tests to find failing tests
quicker.

Change-Id: I540b93c01a6bdbb85353928713995c262dfc919e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-25 08:41:05 +00:00
hjk
44493857c2 SdkTool: Use slightly less repetitive approach for operation interface
Change-Id: I4d1d205c610df39be6a810dfda3049ae14a06806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-10 15:06:36 +00:00
Christian Stenger
37a10f4a2b SdkTool: Fix path handling and adjust expectation
Amends 1a6e6825e6.

Change-Id: I0e0c1bf46951a05d360032e01c15ff8adb31ac33
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-23 10:59:24 +00:00
hjk
1a6e6825e6 SdkTool: Allow remote paths in various operations
QDir::cleanPath() doesn't work well with the scheme://... syntax.

Change-Id: I2d2a86e416251ea2396b67ab1e5831444d4a979a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-19 13:56:01 +00:00
Eike Ziller
24739515e5 sdktool: Use newest toolchain key when writing kit
No need to write these settings with the old key from
Qt Creator 4.3 anymore.

Change-Id: If6ece7277abea20945a56917f4bb55826f4ea769
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-04-30 12:26:52 +00:00
Tobias Hunger
1183810506 SDKtool: Do not add empty CMake configuration values
Do not add the empty string as CMake configuration. People are
apparently trying to use the empty string to make sure nothing
is set up.

Task-number: QTCREATORBUG-21696
Change-Id: I702e26bc135e30c36f770210f885a4680d4b0359
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-07-22 07:44:19 +00:00
Christian Stenger
6a811936d8 Tools: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I16d8928689d208c13776b76cabd663c006a0eb51
Reviewed-by: hjk <hjk@qt.io>
2020-07-15 12:08:09 +00:00
Tobias Hunger
56b82c41c4 SDKTool: Allow for explicitly unsetting Qt in addKitOperation
Treat a empty string passed in as argument to --qt as "No Qt" by
forcing that to "-1".

Fixes: QTCREATORBUG-23168
Change-Id: I03c536d0cc0f7bc2ad291a2bbcc5297df509b524
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-09 10:31:30 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02:00
Eike Ziller
e9e4c27e3a sdktool: Do not fiddle with display names
sdktool made the "display names" unique by potentially adding a number.
This has multiple drawbacks:
- The display name can contain variables that lead to
  unique _expanded_ names
- Adding a number doesn't really help for distinguishing things
- That number is then hard-baked into the install settings

Installers should take care that they register identifiable names.
And if we really want to ensure unique names, then Qt Creator can do that
itself, or even better leave the user to do it, because a number doesn't
really help anyhow.

Fixes: QTCREATORBUG-17909
Change-Id: Id0f44c0cbe457047a0713bda4980fb5d4bc5bcaa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-07 08:09:56 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 11:55:01 +00:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
Tobias Hunger
527484bba9 QtVersion: Allow to override ABIs via SDKtool
Allow for overriding the ABIs detected for a Qt version from the
sdktool.

Leave the default at "auto-detect ABI".

Change-Id: Ibe2625b0a321a9541512d36a91aa2e42611a959b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-26 08:19:33 +00:00
Tobias Hunger
4ef01c961e app_version.h: Make IDE name configurable
Change-Id: I993f452c8d09cf89e9a2958fc8e36b7d2c17ee6f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-05 10:19:48 +00:00
Robert Loehning
d23f4cff84 SDKtool: Provide default values in Operation objects
Change-Id: I3d121e4bee891309f455a67ade76f0ea4f26c77c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-02 12:17:44 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Tobias Hunger
aaf86ae636 SDKtool: Fix cmake related options to addKit
Change-Id: Ib51656957593b2f159bd4ef31e3be9840938cd81
Reviewed-by: Richard Pannek <richard.pannek@pelagicore.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-12-21 15:43:52 +00:00
Tobias Hunger
2d777a8082 SDKtool: Make AddKit handle cmake related settings
--cmake <ID>, --cmake-generator <GEN>:<EXTRA>:<TOOLSET>:<PLATFORM>
and --cmake-config "<KEY>:<TYPE>=<VALUE>" are now supported.

When using --cmake-generator <GEN> must be set, the rest is optional.

--cmake-config may be repeated several times. All will end up in the
kit in the sequence they appear on the command line.

Task-number: QTCREATORBUG-17290
Change-Id: Ida79d65095682331f53d0fbb36d606ad16e6c4ac
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:06:08 +00:00
Tobias Hunger
a185250529 SDKtool: Keep old syntax for toolchain registration working
Keep the old syntax for registering toolchains for new kits
via the SDK tool working.

This should make for smoother sailing for our users, as we can
not foretell which combinations of Qt Creator and Qt installer
(with SDKtool calls) will end up on the machines of our users.

Change-Id: Ib0fb99759ab9dcd75c64c556e18c27e900bf6236
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-22 12:38:43 +00:00
Tobias Hunger
396ee16635 SDKtool: Add toolchain language support
Change-Id: I882cc129a603c758369446f947a961ccd2fd4490
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-21 15:21:45 +00:00
Christian Stenger
2281386199 SDKTool: Fix compile for Qt5.6
Change-Id: I9154ffbc09187a851c409b2b1ae9d2d8109f1c15
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-20 09:17:42 +00:00
Tobias Hunger
a1020cc299 SDKtool: De-noise addkitoperation
Change-Id: I362b5dcda37631e746311f2ed13264ba97ba232c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-20 08:20:39 +00:00
Tobias Hunger
1b4321279f Update License according to agreement with Free Qt Foundation
* Update files in src/share* and src/tools

Change-Id: I78aa5d4a1d76212964e467de7676c1fcb2b777d6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:48:57 +00:00
Tobias Hunger
cc817d508f SDKtool: Make sure to use '/' as path separator
All internal paths in Qt Creator are using '/' as path separator.
Make sure to normalize paths set via the SDKtool to that convention.

Change-Id: If7ef250d49686a0f60d08516b718eb7c84a059ef
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-19 15:15:57 +00:00
Orgad Shaneh
ec2b006d29 Sdktool: Avoid setting invalid debugger entry in kit
Change-Id: Ia8f8e7a5bdc8ab4e9d50fd5f7bca379ec3e3e4f0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-07-22 11:29:07 +00:00
Tobias Hunger
b2e3f0262b Sdktool: Add switch to set environment for kits.
Use --env TEST=somevalue or --env TEST (to unset TEST) once per
environment variable you want to set/unset.

Task-number: QTCREATORBUG-14342
Change-Id: Ia968aeb55a9702d12bc0beb9a38bdd8309a18559
Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-05-04 13:50:34 +00:00
Tobias Hunger
5aba7fb095 Sdktool: Fix default kit handling
The default kit is addressed by its id, not its number for a long
time now. Update sdktool accordingly.

Change-Id: Iad0d0c6eda2aa824fa8add99871db7efebb30e75
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-05-04 13:49:19 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Orgad Shaneh
ac33df0d7a SDKTool: Change DeviceType from QByteArray to QString
Change-Id: I224b6723891df4a8073fae327def13c0b41e8541
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-08-04 10:38:48 +02:00
Orgad Shaneh
382b1d43eb SdkTool: Use Qt Creator doctypes
Simplify filename conversion while at it

Change-Id: I0a7473aa42626a04214887f1cc82abe536233a78
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-08 12:44:16 +02:00
Orgad Shaneh
1e8047877f SdkTool: Fix capitalization
Change-Id: I1085dc89216ad37019227c967ddddbe999486cb1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-03 10:43:13 +02:00
Tobias Hunger
966f2aebc4 SDKtool: Only write values into kit that were set on the commandline
Do not put empty values for settings into the kits: These will prevent
data from being editable in Qt Creator.

Task-number: QTCREATORBUG-12017
Change-Id: I10f67ed0038ba7e1a79cbf7b5658247a2d18b8eb
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-04-09 17:14:14 +02:00
Tobias Hunger
8332e66529 SDKtool: Correctly handle mac ABIs
Task-number: QTCREATORBUG-11983

Change-Id: Id70bd18b1b5494db19adb9928277356c4d4a4688
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-04-07 11:34:00 +02:00
Tobias Hunger
4dbfd2883d SDKtool: Fix test case and compiler warning
Do check for toolchains not defined in the toolchains.xml file again,
but also allow for toolchain IDs to be ABIs.

This partially reverts a commit from Kai made earlier.

Change-Id: Idad004f0bff655bc136bc43de5837d61a045e311
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-04-04 15:26:23 +02:00
Kai Koehne
cc6dd54379 sdktool: Fix addKit complaining about unknown toolchains
Fixes a regression in 07f7dd9c14
that caused the Qt SDK installer to complain e.g. with

  Toolchain x86-linux-generic-elf-86bit does not exist.

Qt Creator has code to automatically detect toolchains, so
it's not necessary for every toolchain to be explicitly registered.

Task-number: QTBUG-37875
Change-Id: I1e8909da2ff919a8cccdf86bb3a2f7a5cc79a257
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-31 14:32:58 +02:00
Rainer Keller
07f7dd9c14 SDKtool: Check for existing objects when creating kits
Check for existing Qt versions, toolchains and devices if
those ids are given.

Change-Id: I0447d55e01cc40e43669ba7999126b0260974c0b
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-04 17:29:31 +01:00
Tobias Hunger
6db3893b16 SDKtool: Add --device option to addKit operation
Change-Id: I5403ae8b7a238f24aadd26c1db3a1b8b4c83fdb2
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
2014-03-04 17:29:22 +01:00
Tobias Hunger
fd2c2df87c SDKtool: Rename findValues method to findValue
It only searches for one value.

Change-Id: If780de3a919c41a03c9c0a978688fd1ea0411eb9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-20 14:37:30 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Tobias Hunger
27143283bf SDKtool: Do not require --debugger "" when using --debuggerid
Change-Id: I9d1c7e5c16d492163d1f6459903096f3b9fb0758
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-30 12:06:37 +01:00
Tobias Hunger
85997b0bc1 SDKtool: Consistently use const char X[] for constants in .cpp files
Change-Id: Iee70ddb526a1751120be40bfd8d2ae01b27b80b8
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-29 18:11:13 +01:00
Tobias Hunger
63f7e76f6d SDKtool: Add support for debugger.xml
Add support to add/remove debugger entries to debuggers.xml

This is in addition to the existing mode of writing the debugger
path/debugger engine into the kit. This works reasonably well, but
the new mode offers better control as how the debugger is called, etc.

addKit also got a --debuggerid switch to set the debugger id instead
of using the old configuration format.

Change-Id: Id4be0366d2c126252419cf1ba87cd0e117204e54
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-29 18:11:01 +01:00
Kai Koehne
108899ef8f Don't return negative numbers in sdktool
Negative return values are interpreted as 'process crashed' on
Windows: QTBUG-28735 . This in turn means the installer framework
always shows an error dialog.

By using positive numbers even for error conditions the installer
can decide to ignore certain errors instead.

Change-Id: Ib5cdd461372ac13fe417feb6ff43a7424c159f68
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 11:33:32 +02:00
Eike Ziller
ef5d3796d5 Merge remote-tracking branch 'origin/2.7' into 2.8 2013-05-23 07:25:34 +02:00
Daniel Teske
4bb73adad6 sdktool: Add operations: Fix adding to a empty map, check the right map
Change-Id: Iddcf85d3a19bed28baa9bd4c5f964c370f8c9c42
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-17 12:33:58 +02:00