Commit Graph

122 Commits

Author SHA1 Message Date
hjk
e3c03fd3c5 Utils: Implement FilePath::writeFileContents()
Including a docker version of it.

Change-Id: Ib2ac6073cc2b39818fb77a7d9d608386f9d17285
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-16 09:00:37 +00:00
hjk
a5b16f8137 Utils: Support remote FilePath::{lastModified,{remove,copy}File}
And implement the Docker variant.

Change-Id: Iee7cd0aaaf3d5c7dbb4ff995ac6889f31cb2f505
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-14 11:19:31 +00:00
hjk
c9ffce8e50 Docker: Make device creation dialog a bit more verbose
Some more visible logging since toolchain detection takes long.

Change-Id: I565a5b0051f485ddf18c2cb034283287d6185190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-14 06:51:08 +00:00
hjk
71db2d9c4f Docker: Warn if file access through merged dir is impossible
Even when the fallbacks via 'docker exec' work this will cause a
significant performance hit. Better inform the user.

Change-Id: If369dcc498bffa2ef422dab3e69325c4122b45ad
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-11 10:37:04 +00:00
hjk
18245dcf10 Utils/ProjectExplorer: Add IDevice::searchInPath
Change-Id: Ibc7cc7bd6bf3a7776681f7cd2fff051525b19f60
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-10 05:05:58 +00:00
hjk
18a9df8b4a Docker: De-register some auto-detected items on device removal
Kit and QtVersion for now, ToolChains seem to lack easy access.

Change-Id: I657cb075dd3b4f6fd8ebfd3d6d20b1cdd4dce831
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-09 12:00:22 +00:00
hjk
a7cd9bda3a ProjectExplorer: Implement (Docker)Device::exists(filePath)
While the original plan was to use more specific functions like
'isReadableFile' to cut down the number of accesses, it is
unrealistic to re-write all occurrences in reasonable time.
So make the basic building blocks accessible, too.

Change-Id: I2586ebd19e1e7ae2c884fd2a4180869421293e3a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-07 12:16:38 +00:00
hjk
accb1e6e08 Utils: Make QtcProcess::{setW,w}orkingDirectory use FilePath
But keep the old setter for a while to ease transition.

Change-Id: If02b79b1fcd31fbf8b06ef26876c41af891127f9
Reviewed-by: hjk <hjk@qt.io>
2021-06-03 10:31:13 +00:00
hjk
08040e4e94 Utils: Move QProcess base to QtcProcessPrivate
Change-Id: I4c6811d42e051fadfcf32edb664ff3bc09e692e6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-02 13:21:08 +00:00
hjk
a490745ae0 Docker: Remove some toUrl/path indirection in FilePath access
Change-Id: I8528f28fe64c99d251b20d486438fcd594b55824
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-01 06:01:42 +00:00
hjk
9ba5d9d8a8 Docker: Fix indentation
Change-Id: Ice8634c7de27a10dcb4ad7d25fdc3c5933146815
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-31 09:29:23 +00:00
hjk
e8286088b1 Docker: Implement DockerDevice::systemEnvironment() function
For synchronous retrieval of the system environment of the device.

Change-Id: I057f9591866b72e37733d495a2a6b203fae91ac4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-27 11:28:36 +00:00
hjk
984d992abf Docker: Fix DockerDevice::runProcess again
We need the on-device path in "docker exec", not the global version of it.

This was not visible earlier as some more places used local paths,
accidentally matching the on-device path.

Change-Id: If1d7e94d2cf0730e85e5a89972d7eaa309743fa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-25 12:59:26 +00:00
hjk
bc58589dee Docker: Use new FilePath API directly
No need to take the QUrl detour.

Change-Id: Ia8245f671411f58729834777413b4749f14b128e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-20 09:29:09 +00:00
hjk
83ae140e8c Docker: Create a partial kit on device creation
Device, Toolchain, and Qt; no Debugger, cmake, ...

Change-Id: Icca660aef62470dda638050fddb74fb1a3032af2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-19 08:10:13 +00:00
hjk
8ffeecc633 Docker: Simple Auto-detection for cmake binaries
Change-Id: Ia7e6f648c99c87786604cb8801c1408b9e231d3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-19 08:10:03 +00:00
hjk
ad5b34ab3e Utils: Remove QtcProcess::{is,set}Synchronous
This reverts a bit of fe8fbf1a4a which was over-shooting API-wise.

Change-Id: Iac4c2b9fa550f7ec0b0aa8deea8c3fc6b6ddcfba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 12:49:08 +00:00
hjk
d71c725453 Utils: Delete QtcProcess::{setP,p}rocessEnvironment
Enforces the use of {setE,e}nvironment for better control.

Change-Id: Iffd9ee4604a6735ee886ecc7623a58729ecd245a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-07 07:49:04 +00:00
hjk
43636e3cb3 Docker: Suppress a warning if logging is not enabled
Change-Id: Ifad1dd0b720d910cf0fc0c200517563f3ba0897c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-05 12:54:22 +00:00
hjk
fe8fbf1a4a Utils: Add a synchronous property to QtcProcess interface
Use it to avoid IDevice interface clutter.

Change-Id: I4a04f04e2c343593d937a402060e56ef94fcabf1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-30 09:16:12 +00:00
hjk
ba36cbfdaa Docker: Implement some DockerDevice functions
Container file system accesses are primarily done through the host
file system by prepending the appropriate path.

This is Linux-only, and only in case the volumes are mounted to
the same relative location in the container.

As a fallback, provide the functionality also via 'docker exec'.
This is, however, too slow to be used in the future.

Change-Id: I23185ae45184cb7b1de7c723a01ab96fe9c0801e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-30 09:15:08 +00:00
hjk
ef108d7a06 Docker: Add DockerDevice and a simple run config
The "Docker Container" runconfig executes 'docker run <image>' without
further attributes, and "works" with docker's hello-world example image.

Change-Id: Ib9417d238ac0757db16be1fc21af40c81db02f05
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-04-13 08:54:17 +00:00