Makes sure to convert it to unix style path on the target and use the
correct capitalisation on the host
Change-Id: I0c6dff47c34c1844a8198c3215ea857fdb6375c7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Using the shell for short running processes that do not
modify the container environment is recommended as it
avoids starting up another process.
Change-Id: I32a1f348bfa56ee4094599cff1af17525a6d2a98
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
And use it to report a hard error when docker devices don't have
a shared directory set. While this is possibly too harsh in the
long run it fits the current situation where we want to use the
container for building projects.
Change-Id: I1430716b5722fba537bb964463ce25c7001be6a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Can be used to easily reproduce the current windows state that has no
way to map the remote file system to a local path on other systems like
linux.
Change-Id: I32cd1852dd0b4fc0890a503c244f34065c29e18c
Reviewed-by: hjk <hjk@qt.io>
Add some indication which container the log messages belong to.
Change-Id: Iafdc7f9c77e58649f2922aefd2a109cf17db78ff
Reviewed-by: David Schulz <david.schulz@qt.io>
Passing the DISPLAY variable differently on Windows allows to
even run a gui application on the docker image if there is an
XServer (e.g. vcxsrv) running on the Windows host that can be used.
Change-Id: I36f849c4efc6e53ef92fcea96b4b256fd92a01c6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Some images have convenience entrypoints set, these get into the way
when we want to run a shell deterministically.
Change-Id: Ifedb9924456b80a9a3cdca64b5431c457b052f1a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use 'find' on a docker image to search for diretory entries
if it is available.
If the find call fails we still may fallback to using 'ls'.
This silences currently active soft asserts regarding the
usage of sort or file filters when we are able to use 'find'.
Only support the most common and currently used options and
bark if some unsupported option is in use.
Task-number: QTCREATORBUG-26258
Change-Id: I9a082ea7aca1b6db7dcb668cfe40ed0ed48cd567
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
The type is implicitly given by the command's executble FilePath.
Also, rename the rarely used addArgs(const CommandLine &) overload
to addCommandLineAsArgs() and make it strip scheme and host from
the wrapped executable as there are no uses expected where keeping
them would be the right thing.
Change-Id: Id0b76778e7e01ac16e477f36bf30bb28d96bb177
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
And implement it for the direct access docker case.
Change-Id: I5c91402630a5b010fdbcaab96c435f66a36f2e3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.
At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.
Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This patch needs to be applied together with the parent change.
There are 3 basic cases:
1. The user doesn't write anything to the write channel:
You don't need to call closeWriteChannel manually anymore.
By default the QtcProcess you create is in ProcessMode::Reader mode.
Internally it opens the process in ReadOnly mode and
closes the write channel just after starting.
2. The user writes some initial data (after being started)
and then closes the write channel:
All what is needed now it to set the write data
(QtcProcess::setWriteData) before calling start.
You also use the default ProcessMode::Reader mode.
Internally it opens the process in ReadWrite mode
and writes the writeData asynchonously when the process
already started. After writing the data it closes the
write channel automatically.
3. The user writes the data also after calling start.
All you need now is to create a process with
ProcessMode::Writer mode. In this mode the write
channel is not closed.
Internally it opens the process in ReadWrite mode
as some writers also read the data from the process.
All the code base is adapted here to the above rules.
Change-Id: Id103019d1d71a3012fd1eade226fe96b9aaa48c2
Reviewed-by: hjk <hjk@qt.io>
If there is no filter accept all instead of nothing.
Fixes e.g. ABI detection on docker image running
on Windows.
Change-Id: I17588f71018952b1087b5b8f700b6c158bf5b89d
Reviewed-by: hjk <hjk@qt.io>
And implement it locally and for docker.
Change-Id: I362f4cae95560836d9300473a286429eb4569329
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Provide way to clean QtcProcess environment which is needed as
e.g. toolchains, build tools, and debugger otherwise run
inside a wrong environment when using docker exec for the
respective process calls.
Change-Id: Ia6de1c90f2134fce260d293a2f6937ab3cfca2ce
Reviewed-by: hjk <hjk@qt.io>
Currently only used inside DockerDevice and it fails to build
when building sdktool with old Qt which is still necessary.
Change-Id: Ic48414f0cb8f0955e7561f7484e3ea1c726c816a
Reviewed-by: hjk <hjk@qt.io>
If there is no local access for the docker container we
create lots of explicit docker calls which take time
to be created and executed as this always fires up
another connection to the container.
Currently we expect the container to have a shell and
we already have it in place, so re-use the shell to
execute at least a couple of commands.
This heavily increases the performance of these commands.
Change-Id: Ic778a250a2b3b8c5ce2a8dd6b7fa8c532bc6d4bf
Reviewed-by: hjk <hjk@qt.io>