Qmake: Enhance remote parsing

When parsing remote .pro files the parsers needs to pretend it runs
on the remote device.

All internal data are now "local on the remote", so that string
manipulation in .pro files "just works", and a 'device root'
string is passed around to relevant functions which then use
it to construct FilePath::toFSPathString()-style paths that
our custom FSEngineImpl can then map to the real device.

Remote $$system() calls are intercepted by the local parser and
redirected using the usual QtcProcess mechanims.

Quite a bit of the ProParser needed adjustments, so there's some
potential for regression.

Task-number: QTCREATORBUG-28242
Task-number: QTCREATORBUG-28161
Task-number: QTCREATORBUG-28355
Change-Id: I6100e7aca4e1db35f5e9689004110aab57e2c595
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-11-30 16:39:21 +01:00
parent 0a0dd9ea31
commit c7884a2b17
28 changed files with 386 additions and 225 deletions

View File

@@ -299,7 +299,11 @@ bool AbstractProcessStep::setupProcessParameters(ProcessParameters *params) cons
const FilePath executable = params->effectiveCommand();
QTC_ASSERT(executable.ensureReachable(workingDirectory), return false);
// E.g. the QMakeStep doesn't have set up anything when this is called
// as it doesn't set a command line provider, so executable might be empty.
const bool looksGood = executable.isEmpty() || executable.ensureReachable(workingDirectory);
QTC_ASSERT(looksGood, return false);
params->setWorkingDirectory(workingDirectory.onDevice(executable));
return true;