2de09d4001
The background idea is that, while CalamaresUtils::System::runCommand() is a useful general API, it is - still missing flexibility - lacking a way to process output from the command "as it happens" Waiting until the process ends, and then reading all stdout, is inconvenient for processes that produce a **lot** of output, and also makes it impossible to report progress. One module in calamares-extensions has its own run-a-process implementation for reading output, and this branch aims to introduce something similar into Calamares core.
39 lines
608 B
C++
39 lines
608 B
C++
/* === This file is part of Calamares - <https://calamares.io> ===
|
|
*
|
|
* SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*
|
|
* Calamares is Free Software: see the License-Identifier above.
|
|
*
|
|
*
|
|
*/
|
|
|
|
#include "Runner.h"
|
|
|
|
namespace
|
|
{
|
|
}
|
|
|
|
namespace Calamares
|
|
{
|
|
namespace Utils
|
|
{
|
|
|
|
struct Runner::Private
|
|
{
|
|
QStringList m_command;
|
|
};
|
|
|
|
Runner::Runner() {}
|
|
Runner::Runner( const QStringList& command )
|
|
: d( std::make_unique< Private >() )
|
|
{
|
|
d->m_command = command;
|
|
}
|
|
|
|
Runner::~Runner() {}
|
|
|
|
|
|
} // namespace Utils
|
|
} // namespace Calamares
|